COPASI API  4.16.103
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CConcentrationReference Class Reference

#include <CMetab.h>

Inheritance diagram for CConcentrationReference:
Inheritance graph
Collaboration diagram for CConcentrationReference:
Collaboration graph

Public Member Functions

 CConcentrationReference (const std::string &name, const CCopasiContainer *pParent, C_FLOAT64 &reference)
 CConcentrationReference (const CConcentrationReference &src, const CCopasiContainer *pParent)
RefreshgetApplyInitialValueRefresh () const
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 ~CConcentrationReference ()
- Public Member Functions inherited from CCopasiObjectReference< C_FLOAT64 >
 CCopasiObjectReference (const std::string &name, const CCopasiContainer *pParent, referenceType &reference, const unsigned C_INT32 &flag=0)
 CCopasiObjectReference (const CCopasiObjectReference< referenceType > &src, const CCopasiContainer *pParent)
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
virtual const CCopasiObjectgetValueObject () const
virtual voidgetValuePointer () const
virtual void print (std::ostream *ostream) const
virtual void setReference (referenceType &reference)
virtual ~CCopasiObjectReference ()
- 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 std::string & getKey () const
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
CCopasiContainergetObjectAncestor (const std::string &type) const
CCopasiDataModelgetObjectDataModel ()
const CCopasiDataModelgetObjectDataModel () const
const std::string & getObjectName () const
CCopasiContainergetObjectParent () const
const std::string & getObjectType () const
virtual const
getPrerequisites () const
virtual RefreshgetRefresh () const
virtual std::string getUnits () const
UpdateMethodgetUpdateMethod () 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
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
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 Member Functions

 CConcentrationReference ()

Private Attributes


Static Private Attributes

static DataObjectSet EmptyDependencies

Additional Inherited Members

- Public Types inherited from CCopasiObjectReference< C_FLOAT64 >
typedef C_FLOAT64 referenceType
- 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)
- 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 CCopasiObject
 CCopasiObject ()
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL

Detailed Description

Definition at line 37 of file CMetab.h.

Constructor & Destructor Documentation

CConcentrationReference::CConcentrationReference ( )

Hidden default constructor

CConcentrationReference::CConcentrationReference ( const std::string &  name,
const CCopasiContainer pParent,
C_FLOAT64 reference 

Specific constructor

conststd::string & name
constCCopasiContainer * pParent,
C_FLOAT64& reference,

Definition at line 1080 of file CMetab.cpp.

References mpApplyInitialValuesRefresh, and CMetab::refreshConcentration().

1082  :
1083  CCopasiObjectReference< C_FLOAT64 >(name, pParent, reference),
1085 {
1086  const CMetab * pMetab = static_cast< const CMetab * >(pParent);
1089  new RefreshTemplate< CMetab >(const_cast< CMetab * >(pMetab),
1091 }
Definition: CMetab.h:178
Refresh * mpApplyInitialValuesRefresh
Definition: CMetab.h:105
void refreshConcentration()
Definition: CMetab.cpp:281
CConcentrationReference::CConcentrationReference ( const CConcentrationReference src,
const CCopasiContainer pParent 

Copy constructor

constCConcentrationReference & src
constCCopasiContainer * pParent,

Definition at line 1093 of file CMetab.cpp.

References mpApplyInitialValuesRefresh, and CMetab::refreshConcentration().

1094  :
1097 {
1098  const CMetab * pMetab = static_cast< const CMetab * >(pParent);
1101  new RefreshTemplate< CMetab >(const_cast< CMetab * >(pMetab),
1103 }
Definition: CMetab.h:178
Refresh * mpApplyInitialValuesRefresh
Definition: CMetab.h:105
void refreshConcentration()
Definition: CMetab.cpp:281
CConcentrationReference::~CConcentrationReference ( )


Definition at line 1105 of file CMetab.cpp.

References mpApplyInitialValuesRefresh, and pdelete.

1106 {
1108 }
#define pdelete(p)
Definition: copasi.h:215
Refresh * mpApplyInitialValuesRefresh
Definition: CMetab.h:105

Member Function Documentation

Refresh * CConcentrationReference::getApplyInitialValueRefresh ( ) const

Retrieve the refresh call which calculates the concentration based on state values needed when applying the initial state.

Refresh * applyInitialValueRefresh

Definition at line 1136 of file CMetab.cpp.

References mpApplyInitialValuesRefresh.

1137 {
1139 }
Refresh * mpApplyInitialValuesRefresh
Definition: CMetab.h:105
const CCopasiObject::DataObjectSet & CConcentrationReference::getDirectDependencies ( const DataObjectSet context = DataObjectSet()) const

Retrieve the list of direct dependencies

constCCopasiObject::DataObjectSet & context (default empty set)
const CCopasiObject::DataObjectSet & directDependencies

Reimplemented from CCopasiObject.

Definition at line 1112 of file CMetab.cpp.

References EmptyDependencies, and CCopasiObject::getDirectDependencies().

1113 {
1114  // If the concentration was changed in the context it has no further dependencies
1115  if (context.count(this) > 0)
1116  {
1117  return EmptyDependencies;
1118  }
1121 }
static DataObjectSet EmptyDependencies
Definition: CMetab.h:100
virtual const DataObjectSet & getDirectDependencies(const DataObjectSet &context=DataObjectSet()) const
bool CConcentrationReference::isPrerequisiteForContext ( const CObjectInterface pObject,
const CMath::SimulationContextFlag context,
const CObjectInterface::ObjectSet changedObjects 
) const

Check whether a given object is a prerequisite for a context.

constCObjectInterface * pObject
constCMath::SimulationContextFlag & context
constCObjectInterface::ObjectSet & changedObjects
bool isPrerequisiteForContext

Reimplemented from CCopasiObject.

Definition at line 1124 of file CMetab.cpp.

1127 {
1128  // If the value is in the context, it does not depend on the object.
1129  if (changedObjects.find(this) != changedObjects.end())
1130  return false;
1132  // Densities which are not in the context have to be recalculated.
1133  return true;
1134 }

Member Data Documentation

CCopasiObject::DataObjectSet CConcentrationReference::EmptyDependencies

The list of direct dependencies when the values is in the changed context, i.e., it is always empty

Definition at line 100 of file CMetab.h.

Referenced by getDirectDependencies().

Refresh* CConcentrationReference::mpApplyInitialValuesRefresh

The refresh call needed when applying initial values.

Definition at line 105 of file CMetab.h.

Referenced by CConcentrationReference(), getApplyInitialValueRefresh(), and ~CConcentrationReference().

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