COPASI API  4.16.103
Public Member Functions | Private Attributes | Friends | List of all members
CMathEvent::CAssignment Class Reference
Inheritance diagram for CMathEvent::CAssignment:
Inheritance graph
Collaboration diagram for CMathEvent::CAssignment:
Collaboration graph

Public Member Functions

 CAssignment (const CCopasiContainer *pParent=NULL)
 CAssignment (const CAssignment &src, const CCopasiContainer *pParent=NULL)
bool compile (const CEventAssignment *pAssignment, std::vector< CCopasiContainer * > listOfContainer)
 ~CAssignment ()
- Public Member Functions inherited from CCopasiContainer
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 CObjectInterfacegetObject (const CCopasiObjectName &cn) const
virtual const objectMapgetObjects () const
virtual std::string getUnits () const
virtual const CCopasiObjectgetValueObject () const
virtual bool remove (CCopasiObject *pObject)
virtual ~CCopasiContainer ()
- Public Member Functions inherited from CCopasiObject
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 DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
virtual const std::string & getKey () const
CCopasiContainergetObjectAncestor (const std::string &type) const
CCopasiDataModelgetObjectDataModel ()
const CCopasiDataModelgetObjectDataModel () const
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
const std::string & getObjectName () const
CCopasiContainergetObjectParent () const
const std::string & getObjectType () const
virtual const
getPrerequisites () const
virtual RefreshgetRefresh () const
UpdateMethodgetUpdateMethod () const
virtual voidgetValuePointer () 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 ()
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
virtual ~CObjectInterface ()

Private Attributes

CExpression mExpression


class CMathEvent

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
typedef std::vector< Refresh * > DataUpdateSequence
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
typedef std::vector
< CObjectInterface * > 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
static void setRenameHandler (CRenameHandler *rh)
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
- Protected Types inherited from CCopasiObject
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
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
void initObjects ()
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL

Detailed Description

Definition at line 282 of file CMathEvent.h.

Constructor & Destructor Documentation

CMathEvent::CAssignment::CAssignment ( const CCopasiContainer pParent = NULL)

Default constructor

constCCopasiContainer * pParent (default: NULL)

Definition at line 1006 of file CMathEvent.cpp.

1006  :
1007  CCopasiContainer("MathEventAssignment", pParent),
1008  mpTarget(NULL),
1009  mExpression("Expression", this)
1010 {}
CExpression mExpression
Definition: CMathEvent.h:325
CMathEvent::CAssignment::CAssignment ( const CAssignment src,
const CCopasiContainer pParent = NULL 

Copy constructor

const CAssignment &src
"constCCopasiContainer * pParent (default: NULL)

Definition at line 1012 of file CMathEvent.cpp.

1013  :
1014  CCopasiContainer(src, pParent),
1015  mpTarget(src.mpTarget),
1016  mExpression(src.mExpression, this)
1017 {}
CExpression mExpression
Definition: CMathEvent.h:325
CMathEvent::CAssignment::~CAssignment ( )


Definition at line 1019 of file CMathEvent.cpp.

1020 {}

Member Function Documentation

bool CMathEvent::CAssignment::compile ( const CEventAssignment pAssignment,
std::vector< CCopasiContainer * >  listOfContainer 

Compile the root finder

constCEventAssignment * pEvent
std::vector<CCopasiContainer * > listOfContainer

Definition at line 1022 of file CMathEvent.cpp.

References C_FLOAT64, CEventAssignment::getExpression(), CEventAssignment::getTargetObject(), CCopasiObject::getValuePointer(), and CCopasiObject::setDirectDependencies().

Referenced by CMathEvent::compile().

1024 {
1025  if (pAssignment == NULL)
1026  return false;
1028  bool success = true;
1030  mpTarget = NULL;
1032  if (pAssignment->getTargetObject() != NULL)
1033  {
1034  mpTarget = (C_FLOAT64 *) pAssignment->getTargetObject()->getValuePointer();
1035  }
1037  if (mpTarget == NULL)
1038  success = false;
1040  success &= mExpression.setInfix(pAssignment->getExpression());
1041  success &= mExpression.compile(listOfContainer);
1045  return success;
1046 }
virtual bool setInfix(const std::string &infix)
Definition: CExpression.cpp:63
void setDirectDependencies(const DataObjectSet &directDependencies)
virtual bool compile(std::vector< CCopasiContainer * > listOfContainer=CCopasiContainer::EmptyList)
Definition: CExpression.cpp:97
CExpression mExpression
Definition: CMathEvent.h:325
virtual const DataObjectSet & getDirectDependencies(const DataObjectSet &context=DataObjectSet()) const
#define C_FLOAT64
Definition: copasi.h:92
virtual void * getValuePointer() const
const CCopasiObject * getTargetObject() const
Definition: CEvent.cpp:146
std::string getExpression() const
Definition: CEvent.cpp:216

Friends And Related Function Documentation

friend class CMathEvent

Definition at line 284 of file CMathEvent.h.

Member Data Documentation

CExpression CMathEvent::CAssignment::mExpression

Expression to calculate the new value.

Definition at line 325 of file CMathEvent.h.

C_FLOAT64* CMathEvent::CAssignment::mpTarget

Pointer to the value to be modified by the assignment

Definition at line 320 of file CMathEvent.h.

The documentation for this class was generated from the following files: