Parameter
The class CCopasiParameter is a specialized container (derived from CCopasiContainer) which is designed to store any information of the form
name = value
. Currently the type of the value is restricted to:
- float
- unsigned float
- integer
- unsigned integer
- bool
- group
- string
- common name
- key
- file
The type group indicates a vector of parameters. A parameter which contains a group is implemented as the derived class CCopasiParameterGroup and has additional convenience methods to access the contained parameters.
The name of a parameter and its object name are identical. The type of the value is determined at construction and may only be retrieved with the method:
const CCopasiParameter::Type & getType() const;
Additionally, set and retrieval methods for the value are provided:
bool setValue(const std::vector< CCopasiParameter * > & value);
const Value & getValue() const;
Please note that the set method will fail if the argument does not match the type of the parameter.
Parameter Group
The class CCopasiParameterGroup is derived from CCopasiParameter. It is intended to handle an arbitrary list of parameters, i.e., it may contain an other parameter group. It provides convenient methods to access contained parameters by name as well as iterator to process all parameters.
The class CCopasiParamterGroup is the base class for all problems and methods used in the task structure. As long as one knows the type of the derived class it is possible to elevate a CCopasiParameterGroup to a specific method or problem. This mechanism is used when loading a COPASI file. For it to function properly each derived class must implement a constructor which takes a CCopasiParameterGroup as argument. In some cases it is also necessary to overload the virtual method elevateChidren.