COPASI API
4.16.103
|
#include <CEvent.h>
Public Member Functions | |
CEventAssignment (const std::string &targetKey="", const CCopasiContainer *pParent=NULL) | |
CEventAssignment (const CEventAssignment &src, const CCopasiContainer *pParent=NULL) | |
bool | compile (std::vector< CCopasiContainer * > listOfContainer) |
std::string | getExpression () const |
const CExpression * | getExpressionPtr () const |
CExpression * | getExpressionPtr () |
const std::string & | getKey () const |
const std::string & | getTargetKey () const |
const CCopasiObject * | getTargetObject () const |
bool | setExpression (const std::string &expression) |
bool | setExpressionPtr (CExpression *pExpression) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
bool | setTargetKey (const std::string &targetKey) |
~CEventAssignment () | |
![]() | |
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) |
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 () |
Private Attributes | |
std::string | mKey |
CExpression * | mpExpression |
CModel * | mpModel |
const CCopasiObject * | mpTarget |
Additional Inherited Members | |
![]() | |
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 |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
![]() | |
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 |
CEventAssignment::CEventAssignment | ( | const std::string & | targetKey = "" , |
const CCopasiContainer * | pParent = NULL |
||
) |
Default constructor
const | std::string & targetKey (default: "") |
"const | CCopasiContainer * pParent (default: NULL) |
Definition at line 35 of file CEvent.cpp.
References mpModel, and CModel::setCompileFlag().
CEventAssignment::CEventAssignment | ( | const CEventAssignment & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CEventAssignment & | src |
"const | CCopasiContainer * pParent (default: NULL) |
Definition at line 49 of file CEvent.cpp.
References getExpression(), mpModel, CModel::setCompileFlag(), and setExpression().
CEventAssignment::~CEventAssignment | ( | ) |
Destructor
Definition at line 65 of file CEvent.cpp.
References mpExpression, mpModel, pdelete, and CModel::setCompileFlag().
bool CEventAssignment::compile | ( | std::vector< CCopasiContainer * > | listOfContainer | ) |
Compile the event assignment.
std::vector< | CCopasiContainer * > listOfContainer |
Definition at line 94 of file CEvent.cpp.
References CModelEntity::ASSIGNMENT, CCopasiObject::clearDirectDependencies(), CExpression::compile(), CKeyFactory::get(), CCopasiObject::getDirectDependencies(), CCopasiRootContainer::getKeyFactory(), CCopasiObject::getObjectName(), CModelEntity::getStatus(), CModelEntity::getValueObject(), mpExpression, mpTarget, CCopasiObject::setDirectDependencies(), and CCopasiMessage::WARNING.
std::string CEventAssignment::getExpression | ( | ) | const |
Retrieve the expression as a string.
Definition at line 216 of file CEvent.cpp.
References CEvaluationTree::getInfix(), mpExpression, and CExpression::updateInfix().
Referenced by CEventAssignment(), CMathEventN::CAssignment::compile(), CMathEvent::CAssignment::compile(), and CModelExpansion::duplicateEvent().
const CExpression * CEventAssignment::getExpressionPtr | ( | ) | const |
Retrieve the pointer to the expression.
Definition at line 226 of file CEvent.cpp.
References mpExpression.
Referenced by CModelAdd::addEvents(), CModelAdd::copyEventAssignmentExpression(), CModelExpansion::duplicateEvent(), CModelMerging::mergeMetabolites(), SBMLImporter::removeUnusedFunctions(), and CModelExpansion::replaceInEvent().
CExpression * CEventAssignment::getExpressionPtr | ( | ) |
Retrieve the pointer to the expression.
Definition at line 231 of file CEvent.cpp.
References mpExpression.
|
virtual |
Retrieve the key
Reimplemented from CCopasiObject.
Definition at line 141 of file CEvent.cpp.
References mKey.
const std::string & CEventAssignment::getTargetKey | ( | ) | const |
Retrieve the target key
Definition at line 162 of file CEvent.cpp.
References CCopasiObject::getObjectName().
Referenced by CModelAdd::addEvents(), CModelExpansion::duplicateEvent(), CModelMerging::mergeMetabolites(), CModelExpansion::replaceInEvent(), and setTargetKey().
const CCopasiObject * CEventAssignment::getTargetObject | ( | ) | const |
Retrieve a pointer to the target object.
Definition at line 146 of file CEvent.cpp.
References mpTarget.
Referenced by CMathEventN::CAssignment::compile(), and CMathEvent::CAssignment::compile().
bool CEventAssignment::setExpression | ( | const std::string & | expression | ) |
Set the expression from an infix string. The return value indicates if parsing the expression was successful.
const | std::string & expression |
Definition at line 167 of file CEvent.cpp.
References CEvaluationTree::getInfix(), mpExpression, mpModel, CModel::setCompileFlag(), and CExpression::setInfix().
Referenced by CEventAssignment(), CModelAdd::copyEventAssignmentExpression(), CModelExpansion::duplicateEvent(), and CCopasiXMLParser::AssignmentElement::end().
bool CEventAssignment::setExpressionPtr | ( | CExpression * | pExpression | ) |
Set the expression from an expression pointer. CEventAssignment takes ownership.
CExpression* | pExpression |
Definition at line 181 of file CEvent.cpp.
References CCopasiContainer::add(), CExpression::compile(), mpExpression, mpModel, pdelete, CModel::setCompileFlag(), CCopasiObject::setObjectName(), and CCopasiObject::setObjectParent().
Referenced by SBMLImporter::importEvent().
|
virtual |
Set the object parent
const | CCopasiContainer * pParent |
Reimplemented from CCopasiObject.
Definition at line 75 of file CEvent.cpp.
References CCopasiObject::getObjectAncestor(), CCopasiObject::getObjectParent(), mpModel, CModel::setCompileFlag(), and CCopasiObject::setObjectParent().
bool CEventAssignment::setTargetKey | ( | const std::string & | targetKey | ) |
Set the key of the target
const | std::string & targetKey |
Definition at line 151 of file CEvent.cpp.
References getTargetKey(), mpModel, CModel::setCompileFlag(), and CCopasiObject::setObjectName().
Referenced by CModelAdd::addEvents(), CModelMerging::mergeMetabolites(), and CModelExpansion::replaceInEvent().
|
private |
|
private |
The expression to calculate the new value
Definition at line 149 of file CEvent.h.
Referenced by compile(), getExpression(), getExpressionPtr(), setExpression(), setExpressionPtr(), and ~CEventAssignment().
|
private |
The parent model
Definition at line 139 of file CEvent.h.
Referenced by CEventAssignment(), setExpression(), setExpressionPtr(), setObjectParent(), setTargetKey(), and ~CEventAssignment().
|
private |
The target object
Definition at line 144 of file CEvent.h.
Referenced by compile(), and getTargetObject().