Mantid
|
Base class for parameters of an instrument. More...
#include <Geometry/Parameter.h>
Public Member Functions | |
virtual std::string | asString () const |
Returns the value of the property as a string. More... | |
virtual Parameter * | clone () 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... | |
Protected Member Functions | |
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... | |
Private Attributes | |
std::string | m_description |
whether the parameter should be visible in InstrumentViewer More... | |
std::string | m_name |
The name of the property. More... | |
std::string | m_str_value |
Parameter value as a string. More... | |
std::string | m_type |
The type of the property. More... | |
bool | m_visible |
Friends | |
class | ParameterFactory |
class | ParameterMap |
Base class for parameters of an instrument.
Definition at line 37 of file Parameter.h.
|
virtualdefault |
Virtual destructor.
|
inlineprotected |
Constructor.
Definition at line 90 of file Parameter.h.
|
inlinevirtual |
Returns the value of the property as a string.
Reimplemented in Mantid::Geometry::ParameterType< Type >, Mantid::Geometry::ParameterType< Type >, and Mantid::Geometry::ParameterType< Type >.
Definition at line 55 of file Parameter.h.
|
pure virtual |
type-independent clone method;
Implemented in Mantid::Geometry::ParameterType< Type >.
|
inlinevirtual |
Set the value of the property via a string.
Reimplemented in Mantid::Geometry::ParameterType< Type >, and Mantid::Geometry::ParameterType< Type >.
Definition at line 58 of file Parameter.h.
References value.
|
inlinevirtual |
get description
Definition at line 66 of file Parameter.h.
|
virtual |
get short description
If no double LF symbol found in the description string, full string is returned.
Definition at line 63 of file Parameter.cpp.
References m_description.
|
inline |
Parameter name.
Definition at line 45 of file Parameter.h.
Referenced by Mantid::Geometry::ParameterMap::contains().
|
inline |
Parameter name.
Definition at line 47 of file Parameter.h.
|
inline |
|
protected |
Sets the value of type T to the parameter if it has type ParameterType<T> Throws an exception if the types don't match.
Sets the value of the parameter.
t | :: Value to set |
T | The concrete type |
t | :: value of the parameter |
Definition at line 153 of file Parameter.h.
|
inlinevirtual |
set description:
Definition at line 64 of file Parameter.h.
|
inlinevirtual |
set visibility:
Definition at line 70 of file Parameter.h.
|
inline |
Parameter type.
Definition at line 43 of file Parameter.h.
const T & Mantid::Geometry::Parameter::value |
Returns the parameter value of type T if the parameter has type ParameterType<T>
The value of the parameter.
T | The concrete type |
Definition at line 142 of file Parameter.h.
|
inline |
Parameter visibility in InstrumentViewer.
Definition at line 49 of file Parameter.h.
|
friend |
Definition at line 88 of file Parameter.h.
|
friend |
Definition at line 80 of file Parameter.h.
|
private |
whether the parameter should be visible in InstrumentViewer
parameter's description – string containing the description of this parameter
Definition at line 101 of file Parameter.h.
Referenced by getShortDescription().
|
private |
The name of the property.
Definition at line 96 of file Parameter.h.
|
private |
Parameter value as a string.
Definition at line 97 of file Parameter.h.
|
private |
The type of the property.
Definition at line 94 of file Parameter.h.
|
private |
Definition at line 98 of file Parameter.h.