COPASI API
4.16.103
|
#include <CFunctionParameter.h>
Public Types | |
enum | DataType { INT32 = 0, FLOAT64, VINT32, VFLOAT64 } |
enum | Role { SUBSTRATE = 0, PRODUCT, MODIFIER, PARAMETER, VOLUME, TIME, VARIABLE, TEMPORARY } |
![]() | |
typedef std::multimap < std::string, CCopasiObject * > | objectMap |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
Public Member Functions | |
CFunctionParameter (const std::string &name="NoName", const CCopasiContainer *pParent=NULL) | |
CFunctionParameter (const CFunctionParameter &src, const CCopasiContainer *pParent=NULL) | |
CFunctionParameter (const std::string &name, const DataType &type, Role usage, const CCopasiContainer *pParent=NULL) | |
void | cleanup () |
virtual const std::string & | getKey () const |
const CFunctionParameter::DataType & | getType () const |
Role | getUsage () const |
const bool & | isUsed () const |
virtual void | load (CReadConfig &configbuffer, CReadConfig::Mode mode=CReadConfig::NEXT) |
void | setIsUsed (const bool &isUsed) |
void | setType (const CFunctionParameter::DataType &type) |
void | setUsage (Role usage) |
virtual | ~CFunctionParameter () |
![]() | |
virtual bool | add (CCopasiObject *pObject, const bool &adopt=true) |
CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container) | |
CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL) | |
virtual std::string | getChildObjectUnits (const CCopasiObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () const |
virtual const CCopasiObject * | getValueObject () const |
virtual bool | remove (CCopasiObject *pObject) |
virtual | ~CCopasiContainer () |
![]() | |
void | addDirectDependency (const CCopasiObject *pObject) |
CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL) | |
void | clearDirectDependencies () |
void | clearRefresh () |
bool | dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const |
void | getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const |
virtual CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
UpdateMethod * | getUpdateMethod () const |
virtual void * | getValuePointer () const |
bool | hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const |
bool | hasUpdateMethod () const |
bool | isArray () const |
bool | isContainer () const |
bool | isDataModel () const |
bool | isMatrix () const |
bool | isNameVector () const |
bool | isNonUniqueName () const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const |
bool | isReference () const |
bool | isRoot () const |
bool | isSeparator () const |
bool | isStaticString () const |
bool | isValueBool () const |
bool | isValueDbl () const |
bool | isValueInt () const |
bool | isValueInt64 () const |
bool | isValueString () const |
bool | isVector () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
virtual void | print (std::ostream *ostream) const |
void | removeDirectDependency (const CCopasiObject *pObject) |
void | setDirectDependencies (const DataObjectSet &directDependencies) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
void | setObjectValue (const C_FLOAT64 &value) |
void | setObjectValue (const C_INT32 &value) |
void | setObjectValue (const bool &value) |
template<class CType > | |
void | setRefresh (CType *pType, void(CType::*method)(void)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const bool &)) |
virtual | ~CCopasiObject () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Static Public Member Functions | |
static Role | xmlRole2Enum (const std::string &role) |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
Static Public Attributes | |
static const std::string | DataTypeName [] |
static const std::string | RoleNameDisplay [] |
static const std::string | RoleNameXML [] |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
Private Attributes | |
bool | mIsUsed |
std::string | mKey |
CFunctionParameter::DataType | mType |
Role | mUsage |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CFunctionParameter &d) |
Additional Inherited Members | |
![]() | |
enum | Flag { Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8, Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80, ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800, Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000, Root = 0x10000, Gui = 0x20000 } |
![]() | |
template<class CType > | |
CCopasiObject * | addMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
void | initObjects () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
objectMap | mObjects |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Created for Copasi by Stefan Hoops (C) Stefan Hoops 2001
Definition at line 34 of file CFunctionParameter.h.
Valid data type for a function parameter
Enumerator | |
---|---|
INT32 | |
FLOAT64 | |
VINT32 | |
VFLOAT64 |
Definition at line 70 of file CFunctionParameter.h.
Enumerator | |
---|---|
SUBSTRATE | |
PRODUCT | |
MODIFIER | |
PARAMETER | |
VOLUME | |
TIME | |
VARIABLE | |
TEMPORARY |
Definition at line 42 of file CFunctionParameter.h.
CFunctionParameter::CFunctionParameter | ( | const std::string & | name = "NoName" , |
const CCopasiContainer * | pParent = NULL |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 55 of file CFunctionParameter.cpp.
References CONSTRUCTOR_TRACE.
CFunctionParameter::CFunctionParameter | ( | const CFunctionParameter & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CFunctionParameter | & src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 64 of file CFunctionParameter.cpp.
References CONSTRUCTOR_TRACE.
CFunctionParameter::CFunctionParameter | ( | const std::string & | name, |
const DataType & | type, | ||
Role | usage, | ||
const CCopasiContainer * | pParent = NULL |
||
) |
Specified constuctor, sets all member values at once
const string & | name |
const CFunctionParameter::DataType & | type |
const string & | usage |
const | CCopasiContainer * pParent (default: NULL) |
|
virtual |
Destructor
Definition at line 84 of file CFunctionParameter.cpp.
References DESTRUCTOR_TRACE, CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
void CFunctionParameter::cleanup | ( | ) |
|
virtual |
Retrieves the key of the function parameter.
Reimplemented from CCopasiObject.
Definition at line 102 of file CFunctionParameter.cpp.
References mKey.
Referenced by CCopasiXML::saveFunctionList().
const CFunctionParameter::DataType & CFunctionParameter::getType | ( | ) | const |
Retrieves the data type of the parameter
Definition at line 113 of file CFunctionParameter.cpp.
References mType.
Referenced by CReactionInterface::connectFromScratch(), CModel::convert2NonReversible(), CReaction::loadOld(), CReaction::loadOneRole(), CReaction::setFunctionFromExpressionTree(), and CCopasiXMLParser::SourceParameterElement::start().
CFunctionParameter::Role CFunctionParameter::getUsage | ( | ) | const |
Retrieves the usage of the parameter
Definition at line 106 of file CFunctionParameter.cpp.
References mUsage.
Referenced by CModel::convert2NonReversible(), CSBMLExporter::createKineticLaw(), CReactionInterface::getDeletedParameters(), CCopasiXML::saveFunctionList(), and CReaction::setFunctionFromExpressionTree().
const bool & CFunctionParameter::isUsed | ( | ) | const |
Retrieve whether the parameter is used within a function
Definition at line 125 of file CFunctionParameter.cpp.
References mIsUsed.
Referenced by setIsUsed().
|
virtual |
Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
pconfigbuffer | reference to a CReadConfig object. |
Definition at line 92 of file CFunctionParameter.cpp.
References CReadConfig::getVariable(), mType, mUsage, and CCopasiObject::setObjectName().
void CFunctionParameter::setIsUsed | ( | const bool & | isUsed | ) |
Set whether the parameter is used within a function
const | bool & isUsed |
Definition at line 118 of file CFunctionParameter.cpp.
References isUsed(), and mIsUsed.
Referenced by CCopasiXMLParser::ParameterDescriptionElement::start().
void CFunctionParameter::setType | ( | const CFunctionParameter::DataType & | type | ) |
Sets the data type of the parameter
const CFunctionParameter::DataType | & type |
Definition at line 108 of file CFunctionParameter.cpp.
References mType.
Referenced by CKinFunction::createParameters(), and CCopasiXMLParser::ParameterDescriptionElement::start().
Sets the usage of the parameter
const string | & usage |
Definition at line 104 of file CFunctionParameter.cpp.
References mUsage.
Referenced by CKinFunction::createParameters(), SBMLImporter::setCorrectUsage(), and CCopasiXMLParser::ParameterDescriptionElement::start().
|
static |
Definition at line 43 of file CFunctionParameter.cpp.
References C_INT32, RoleNameXML, and VARIABLE.
Referenced by CCopasiXMLParser::ParameterDescriptionElement::start().
|
friend |
insert operator
Definition at line 128 of file CFunctionParameter.cpp.
|
static |
A string representation of the data type
Created for COPASI by Stefan Hoops (C) Stefan Hoops 2001
Definition at line 40 of file CFunctionParameter.h.
Referenced by FunctionWidget1::loadParameterTable().
|
private |
Specifies whether the parameter is used in the function
Definition at line 95 of file CFunctionParameter.h.
Referenced by isUsed(), and setIsUsed().
|
private |
The key of the function parameter
Definition at line 76 of file CFunctionParameter.h.
Referenced by getKey(), and ~CFunctionParameter().
|
private |
The data type of the parameter this may be one of INT16, INT32, UINT16, UINT32, FLOAT32, FLOAT64, VINT16, VINT32, VUINT16, VUINT32, VFLOAT32, VFLOAT64
Definition at line 83 of file CFunctionParameter.h.
Referenced by getType(), load(), operator<<(), and setType().
|
private |
The usage or meaning of the parameter. This has no functional implication for CFunction but it might be used in derived classes. Possible usage is SUBSTRATE, PRODUCT, MODIFIER, or PARAMETER
Definition at line 90 of file CFunctionParameter.h.
Referenced by getUsage(), load(), operator<<(), and setUsage().
|
static |
Definition at line 58 of file CFunctionParameter.h.
Referenced by CFunctionParameters::getParameterByUsage(), FunctionWidget1::loadParameterTable(), operator<<(), and ParameterTable::updateTable().
|
static |
The string representation of valid roles of a function parameter
Definition at line 57 of file CFunctionParameter.h.
Referenced by CCopasiXML::saveFunctionList(), and xmlRole2Enum().