Chaste
Build::
|
#include <BaseParameterInstance.hpp>
Public Member Functions | |
BaseParameterInstance () | |
BaseParameterInstance (const std::string &rName, const std::string &rShortDescription, const std::string &rSymbol, const std::string &rBibliographicInfromation) | |
virtual | ~BaseParameterInstance () |
std::string | GetName () |
std::string | GetBibliographicInformation () |
std::string | GetShortDescription () |
std::string | GetSymbol () |
virtual std::string | GetValueAsString () |
void | RegisterWithCollection (const std::string &rCallingClass) |
void | SetBibliographicInformation (const std::string &rSourceInformation) |
void | SetName (const std::string &rName) |
void | SetShortDescription (const std::string &rShortDescription) |
void | SetSymbol (const std::string &rSymbol) |
Static Public Member Functions | |
static boost::shared_ptr< BaseParameterInstance > | Create () |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
std::string | mName |
std::string | mShortDescription |
std::string | mSourceInformation |
std::string | mSymbol |
units::quantity< unit::dimensionless > | mBaseValue |
Friends | |
class | boost::serialization::access |
std::ostream & | operator<< (std::ostream &stream, const boost::shared_ptr< BaseParameterInstance > &rParameter) |
This is a class for storing often used parameters and their metadata, such as a short textual description, bib information from a paper and units. It is templated over unit type. Specific parameter values can inherit from this class, with hard-coded metadata. The main purpose of this class is to allow storage of many derived classes in the same map in a ParameterCollection.
Definition at line 52 of file BaseParameterInstance.hpp.
BaseParameterInstance::BaseParameterInstance | ( | ) |
Constructor
Definition at line 39 of file BaseParameterInstance.cpp.
BaseParameterInstance::BaseParameterInstance | ( | const std::string & | rName, |
const std::string & | rShortDescription, | ||
const std::string & | rSymbol, | ||
const std::string & | rBibliographicInfromation | ||
) |
Constructor
rName | the named by which it will be keyed in the ParameterCollection |
rShortDescription | a short description of the parameter |
rSymbol | a symbol, as it may appear in the literature |
rBibliographicInfromation | a Bibtex formatted literature source. |
Definition at line 49 of file BaseParameterInstance.cpp.
|
virtual |
Destructor
Definition at line 62 of file BaseParameterInstance.cpp.
|
static |
Factory constructor method
Definition at line 67 of file BaseParameterInstance.cpp.
std::string BaseParameterInstance::GetBibliographicInformation | ( | ) |
Return the bibliographic information
Definition at line 85 of file BaseParameterInstance.cpp.
References mSourceInformation.
std::string BaseParameterInstance::GetName | ( | ) |
Return the parameter name
Definition at line 90 of file BaseParameterInstance.cpp.
References mName.
std::string BaseParameterInstance::GetShortDescription | ( | ) |
Return the short description
Definition at line 100 of file BaseParameterInstance.cpp.
References mShortDescription.
std::string BaseParameterInstance::GetSymbol | ( | ) |
Return the parameter symbol
Definition at line 95 of file BaseParameterInstance.cpp.
References mSymbol.
|
virtual |
Return the value of the parameter as a string, with units
Reimplemented in ParameterInstance< UNIT >.
Definition at line 78 of file BaseParameterInstance.cpp.
References mBaseValue.
void BaseParameterInstance::RegisterWithCollection | ( | const std::string & | rCallingClass | ) |
Register the parameter with a ParameterCollection
rCallingClass | the name of the class calling this method. |
Definition at line 73 of file BaseParameterInstance.cpp.
References ParameterCollection::AddParameter(), and ParameterCollection::Instance().
Referenced by ParameterInstance< UNIT >::GetValue().
|
inlineprivate |
Do the serialize
ar | the archive |
version | the archive version number |
Definition at line 65 of file BaseParameterInstance.hpp.
References mName, mShortDescription, and mSourceInformation.
void BaseParameterInstance::SetBibliographicInformation | ( | const std::string & | rSourceInformation | ) |
Set the bibliographic information
rSourceInformation | the bibliographic information |
Definition at line 105 of file BaseParameterInstance.cpp.
References mSourceInformation.
void BaseParameterInstance::SetName | ( | const std::string & | rName | ) |
Set the parameter name, this is used to distinguish it in the ParameterCollection map
rName | the short description |
Definition at line 110 of file BaseParameterInstance.cpp.
References mName.
void BaseParameterInstance::SetShortDescription | ( | const std::string & | rShortDescription | ) |
Set the short description of the parameter
rShortDescription | the short description |
Definition at line 115 of file BaseParameterInstance.cpp.
References mShortDescription.
void BaseParameterInstance::SetSymbol | ( | const std::string & | rSymbol | ) |
Set the sybmol for the parameter
rSymbol | the symbol |
Definition at line 120 of file BaseParameterInstance.cpp.
References mSymbol.
|
friend |
Archiving
Definition at line 57 of file BaseParameterInstance.hpp.
|
friend |
Override for nicer printing
stream | the input stream |
rParameter | the class instance |
Definition at line 125 of file BaseParameterInstance.cpp.
|
private |
A dimensionless parameter value.
Definition at line 95 of file BaseParameterInstance.hpp.
Referenced by GetValueAsString().
|
private |
A name to distinguish it in a ParameterCollection
Definition at line 75 of file BaseParameterInstance.hpp.
Referenced by GetName(), serialize(), and SetName().
|
private |
A short string based description
Definition at line 80 of file BaseParameterInstance.hpp.
Referenced by GetShortDescription(), serialize(), and SetShortDescription().
|
private |
Information on the parameter source, such as bibliographic information
Definition at line 85 of file BaseParameterInstance.hpp.
Referenced by GetBibliographicInformation(), serialize(), and SetBibliographicInformation().
|
private |
A symbol, as it might appear with a literature source
Definition at line 90 of file BaseParameterInstance.hpp.
Referenced by GetSymbol(), and SetSymbol().