copasi API
0.1
|
#include <CCopasiParameter.h>
Classes | |
union | Value |
Public Types | |
enum | Type { DOUBLE = 0, UDOUBLE, INT, UINT, BOOL, GROUP, STRING, CN, KEY, FILE, EXPRESSION, INVALID } |
Public Member Functions | |
CCopasiParameter (const CCopasiParameter &src, const CCopasiContainer *pParent=NULL) | |
CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CCopasiContainer *pParent=NULL, const std::string &objectType="Parameter") | |
virtual | ~CCopasiParameter () |
CCopasiParameter & | operator= (const CCopasiParameter &rhs) |
virtual const std::string & | getKey () const |
template<class CType > | |
bool | setValue (const CType &value) |
bool | setValue (const std::vector< CCopasiParameter * > &value) |
const Value & | getValue () const |
Value & | getValue () |
const CCopasiParameter::Type & | getType () const |
bool | isValidValue (const C_FLOAT64 &value) const |
bool | isValidValue (const C_INT32 &value) const |
bool | isValidValue (const unsigned C_INT32 &value) const |
bool | isValidValue (const bool &value) const |
bool | isValidValue (const std::string &value) const |
bool | isValidValue (const CCopasiObjectName &value) const |
bool | isValidValue (const std::vector< CCopasiParameter * > &value) const |
virtual void | print (std::ostream *ostream) const |
virtual void * | getValuePointer () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
Static Public Attributes | |
static const std::string | TypeName [] |
static const char * | XMLType [] |
Protected Attributes | |
std::string | mKey |
unsigned C_INT32 | mSize |
Value | mValue |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CCopasiParameter &o) |
bool | operator== (const CCopasiParameter &lhs, const CCopasiParameter &rhs) |
CCopasiParameter class. This class is used to describe parameters. This class is intended to be used with integration or optimization methods or reactions.
Created for COPASI by Stefan Hoops 2002
Reimplemented in CPlotItem, CExperiment, and CScanProblem.
CCopasiParameter::CCopasiParameter | ( | const CCopasiParameter & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const | CCopasiParameter & src |
const | CCopasiContainer * pParent (default: NULL) |
CCopasiParameter::CCopasiParameter | ( | const std::string & | name, |
const Type & | type, | ||
const void * | pValue = NULL , |
||
const CCopasiContainer * | pParent = NULL , |
||
const std::string & | objectType = "Parameter" |
||
) |
Specific constructor
const | string & name |
const | CCopasiParameter::Type & type |
const | void * pValue (default: NULL) |
const | CCopasiContainer * pParent (default: NULL) |
const | std::string & objectType (default: "Parameter") |
CCopasiParameter::~CCopasiParameter | ( | ) | [virtual] |
Destructor
const std::string & CCopasiParameter::getKey | ( | ) | const [virtual] |
std::string CCopasiParameter::getObjectDisplayName | ( | bool | regular = true , |
bool | richtext = false |
||
) | const [virtual] |
Overload display name. Special treatment for reaction parameters to provide a shorter display.
Reimplemented from CCopasiObject.
const CCopasiParameter::Type & CCopasiParameter::getType | ( | void | ) | const |
Retrieve the type of the parameter.
Reimplemented in CCopasiMethod, CPlotItem, and CCopasiProblem.
const CCopasiParameter::Value & CCopasiParameter::getValue | ( | ) | const |
Retrieve the private value of the parameter.
CCopasiParameter::Value & CCopasiParameter::getValue | ( | ) |
Retrieve the private value of the parameter.
void * CCopasiParameter::getValuePointer | ( | ) | const [virtual] |
Reimplemented from CCopasiObject.
bool CCopasiParameter::isValidValue | ( | const C_FLOAT64 & | value | ) | const |
Check whether the value corresponds to the type
const | C_FLOAT64 & value |
bool CCopasiParameter::isValidValue | ( | const C_INT32 & | value | ) | const |
Check whether the value corresponds to the type
const | C_INT32 & value |
bool CCopasiParameter::isValidValue | ( | const unsigned C_INT32 & | value | ) | const |
Check whether the value corresponds to the type
const | unsigned C_INT32 & value |
bool CCopasiParameter::isValidValue | ( | const bool & | value | ) | const |
Check whether the value corresponds to the type
const | bool & value |
bool CCopasiParameter::isValidValue | ( | const std::string & | value | ) | const |
Check whether the value corresponds to the type
const | std::string & value |
bool CCopasiParameter::isValidValue | ( | const CCopasiObjectName & | value | ) | const |
Check whether the value corresponds to the type
const | CRegisteredObjectName & value |
bool CCopasiParameter::isValidValue | ( | const std::vector< CCopasiParameter * > & | value | ) | const |
Check whether the value corresponds to the type
const | CCopasiParameterGroup::parameterGroup & value |
CCopasiParameter & CCopasiParameter::operator= | ( | const CCopasiParameter & | rhs | ) |
void CCopasiParameter::print | ( | std::ostream * | ostream | ) | const [virtual] |
This is the output method for any object. The default implementation provided with CCopasiObject uses the ostream operator<< of the object to print the object.To override this default behavior one needs to reimplement the virtual print function.
std::ostream | * ostream |
Reimplemented from CCopasiObject.
Reimplemented in CCopasiParameterGroup, COptProblem, CCopasiMethod, CCopasiProblem, CSensProblem, CMCAProblem, CFitProblem, and CCrossSectionProblem.
bool CCopasiParameter::setValue | ( | const CType & | value | ) | [inline] |
Set the value of the parameter
const | unsigned C_INT32 & value |
bool CCopasiParameter::setValue | ( | const std::vector< CCopasiParameter * > & | value | ) |
Set the value of the parameter when the origin is a parameter group. This function is currently not implemented and creates a fatalError when called.
const | CCopasiParameter::parameterGroup& value |
std::ostream& operator<< | ( | std::ostream & | os, |
const CCopasiParameter & | o | ||
) | [friend] |
bool operator== | ( | const CCopasiParameter & | lhs, |
const CCopasiParameter & | rhs | ||
) | [friend] |
Comparison operator
const | CCopasiParameter & lhs |
const | CCopasiParameter & rhs |
std::string CCopasiParameter::mKey [protected] |
The key of the parameter.
unsigned C_INT32 CCopasiParameter::mSize [protected] |
The size allocated for the value of the parameter.
Value CCopasiParameter::mValue [protected] |
A pointer to the value of the parameter.
const std::string CCopasiParameter::TypeName [static] |
{ "float", "unsigned float", "integer", "unsigned integer", "bool", "group", "string", "common name", "key", "file", "expression", "" }
String literals for the GUI to display type names of parameters known to COPASI.
CCopasiParameter class. This class is used to describe method paramters. This class is intended to be used with integration or optimization methods.
Created for Copasi by Stefan Hoops 2002
Reimplemented in CPlotItem, CExperiment, and CFitMethod.
const char * CCopasiParameter::XMLType [static] |
{ "float", "unsignedFloat", "integer", "unsignedInteger", "bool", "group", "string", "cn", "key", "file", "expression", NULL }
XML type names of parameters known to COPASI.
Reimplemented in CPlotItem, and CExperiment.