Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Mantid::Geometry::ParameterType< Type > Class Template Reference

Templated class for parameters of type Type. More...

#include <Parameter.h>

Inheritance diagram for Mantid::Geometry::ParameterType< Type >:
Mantid::Geometry::Parameter

Public Member Functions

std::string asString () const
 Specialization for doubles. More...
 
std::string asString () const
 Specialization for V3D. More...
 
std::string asString () const override
 Returns the value of the property as a string. More...
 
Parameterclone () const override
 type-independent clone method; More...
 
void fromString (const std::string &value)
 Specialization for a string. More...
 
void fromString (const std::string &value) override
 Set the value of the property via a string. More...
 
const Type & operator() () const
 Get the value of the parameter. More...
 
 ParameterType ()
 Constructor. More...
 
const Type & value () const
 Returns the value of the parameter. More...
 
- Public Member Functions inherited from Mantid::Geometry::Parameter
virtual std::string asString () const
 Returns the value of the property as a string. More...
 
virtual Parameterclone () const =0
 type-independent clone method; More...
 
virtual void fromString (const std::string &value)
 Set the value of the property via a string. More...
 
virtual const std::string & getDescription () const
 get description More...
 
virtual std::string getShortDescription () const
 get short description More...
 
const std::string & name () const
 Parameter name. More...
 
const char * nameAsCString () const
 Parameter name. More...
 
bool operator== (const Parameter &rhs) const
 Equality operator. More...
 
virtual void setDescription (const std::string &source)
 set description: More...
 
virtual void setVisible (const bool &visible)
 set visibility: More...
 
const std::string & type () const
 Parameter type. More...
 
template<class T >
const T & value ()
 Returns the parameter value of type T if the parameter has type ParameterType<T> More...
 
const bool & visible () const
 Parameter visibility in InstrumentViewer. More...
 
virtual ~Parameter ()=default
 Virtual destructor. More...
 

Private Member Functions

ParameterTypeoperator= (const Type &value)
 Set the value of the parameter via the assignment operator. More...
 
void setValue (const Type &value)
 Set the value of the parameter. More...
 

Private Attributes

Type m_value
 Value. More...
 

Friends

class Parameter
 
class ParameterMap
 

Additional Inherited Members

- Protected Member Functions inherited from Mantid::Geometry::Parameter
 Parameter ()
 Constructor. More...
 
template<class T >
void set (const T &t)
 Sets the value of type T to the parameter if it has type ParameterType<T> Throws an exception if the types don't match. More...
 

Detailed Description

template<class Type>
class Mantid::Geometry::ParameterType< Type >

Templated class for parameters of type Type.

Definition at line 105 of file Parameter.h.

Constructor & Destructor Documentation

◆ ParameterType()

template<class Type >
Mantid::Geometry::ParameterType< Type >::ParameterType ( )
inline

Constructor.

Definition at line 108 of file Parameter.h.

Member Function Documentation

◆ asString() [1/3]

std::string Mantid::Geometry::ParameterType< double >::asString ( ) const
virtual

Specialization for doubles.

Reimplemented from Mantid::Geometry::Parameter.

Definition at line 37 of file Parameter.cpp.

References m_value.

◆ asString() [2/3]

std::string Mantid::Geometry::ParameterType< Kernel::V3D >::asString ( ) const
virtual

Specialization for V3D.

Reimplemented from Mantid::Geometry::Parameter.

Definition at line 45 of file Parameter.cpp.

References m_value.

◆ asString() [3/3]

template<class Type >
std::string Mantid::Geometry::ParameterType< Type >::asString
overridevirtual

Returns the value of the property as a string.

Return the value of the parameter as a string.

Template Parameters
TThe type of the parameter
Returns
A string representation of the parameter

Reimplemented from Mantid::Geometry::Parameter.

Definition at line 30 of file Parameter.cpp.

References m_value.

◆ clone()

template<class Type >
Parameter * Mantid::Geometry::ParameterType< Type >::clone ( ) const
inlineoverridevirtual

type-independent clone method;

Implements Mantid::Geometry::Parameter.

Definition at line 120 of file Parameter.h.

◆ fromString() [1/2]

void Mantid::Geometry::ParameterType< std::string >::fromString ( const std::string &  value)
inlinevirtual

Specialization for a string.

Reimplemented from Mantid::Geometry::Parameter.

Definition at line 177 of file Parameter.h.

References m_value, and value.

◆ fromString() [2/2]

template<class Type >
void Mantid::Geometry::ParameterType< Type >::fromString ( const std::string &  value)
overridevirtual

Set the value of the property via a string.

Set the value of the parameter from a string.

Template Parameters
TThe type of the parameter
Parameters
value:: A string representation of the parameter's value

Reimplemented from Mantid::Geometry::Parameter.

Definition at line 169 of file Parameter.h.

References m_value, and value.

◆ operator()()

template<class Type >
const Type & Mantid::Geometry::ParameterType< Type >::operator() ( ) const
inline

Get the value of the parameter.

Definition at line 118 of file Parameter.h.

References m_value.

◆ operator=()

template<class Type >
ParameterType< Type > & Mantid::Geometry::ParameterType< Type >::operator= ( const Type &  value)
private

Set the value of the parameter via the assignment operator.

Parameters
value:: The value of the parameter
Returns
A reference to the parameter

Definition at line 189 of file Parameter.h.

References value.

◆ setValue()

template<class Type >
void Mantid::Geometry::ParameterType< Type >::setValue ( const Type &  value)
private

Set the value of the parameter.

Set the value of the parameter via the assignment operator.

Template Parameters
Theparameter type
Parameters
value:: The value of the parameter

Definition at line 183 of file Parameter.h.

References m_value, and value.

◆ value()

template<class Type >
const Type & Mantid::Geometry::ParameterType< Type >::value ( ) const
inline

Returns the value of the parameter.

Definition at line 116 of file Parameter.h.

References m_value.

Friends And Related Function Documentation

◆ Parameter

template<class Type >
friend class Parameter
friend

Definition at line 124 of file Parameter.h.

◆ ParameterMap

template<class Type >
friend class ParameterMap
friend

Definition at line 123 of file Parameter.h.

Member Data Documentation

◆ m_value

template<class Type >
Type Mantid::Geometry::ParameterType< Type >::m_value
private

Value.

Definition at line 130 of file Parameter.h.


The documentation for this class was generated from the following files: