COPASI API
4.16.103
|
#include <CMoiety.h>
Public Member Functions | |
void | add (C_FLOAT64 value, CMetab *metabolite) |
void | cleanup () |
CMoiety (const std::string &name="NoName", const CCopasiContainer *pParent=NULL) | |
CMoiety (const CMoiety &src, const CCopasiContainer *pParent=NULL) | |
const C_FLOAT64 & | dependentNumber () |
const C_FLOAT64 & | getAmount () const |
const C_FLOAT64 & | getDependentNumber () const |
CCopasiObject * | getDependentNumberReference () const |
std::string | getDescription (const CModel *model) const |
const std::vector< std::pair < C_FLOAT64, CMetab * > > & | getEquation () const |
std::string | getExpression () const |
CCopasiObject * | getInitialValueReference () const |
virtual const std::string & | getKey () const |
C_FLOAT64 | getNumber () const |
CCopasiObject * | getTotalNumberReference () const |
CCopasiObject * | getValueReference () const |
void | refreshAmount () |
void | refreshDependentNumber () |
void | refreshInitialValue () |
void | refreshValue () |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
~CMoiety () | |
![]() | |
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 Member Functions | |
void | initConversionFactor () |
void | initObjects () |
Private Attributes | |
std::vector< std::pair < C_FLOAT64, CMetab * > > | mEquation |
C_FLOAT64 | mIAmount |
C_FLOAT64 | mINumber |
std::string | mKey |
C_FLOAT64 | mNumber |
const C_FLOAT64 * | mpConversionFactor |
CDependentNumberReference * | mpDNumberReference |
CTotalNumberReference * | mpINumberReference |
CTotalNumberReference * | mpNumberReference |
Static Private Attributes | |
static const C_FLOAT64 | DefaultFactor |
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 |
CMoiety::CMoiety | ( | 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 36 of file CMoiety.cpp.
References CONSTRUCTOR_TRACE, and initObjects().
CMoiety::CMoiety | ( | const CMoiety & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CMoiety & | src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 53 of file CMoiety.cpp.
References CONSTRUCTOR_TRACE, and initObjects().
CMoiety::~CMoiety | ( | ) |
Destructor
Definition at line 70 of file CMoiety.cpp.
References DESTRUCTOR_TRACE, CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
Add a metabolite to a moiety
C_FLOAT64 | value |
CMetab | * metabolite |
Definition at line 96 of file CMoiety.cpp.
References CCopasiObject::addDirectDependency(), mEquation, mpINumberReference, CModelEntity::mpIValueReference, mpNumberReference, CModelEntity::mpValueReference, and CMetab::setDependentOn().
Referenced by CModel::buildMoieties().
void CMoiety::cleanup | ( | ) |
Definition at line 114 of file CMoiety.cpp.
References CCopasiObject::clearDirectDependencies(), mEquation, mpINumberReference, and mpNumberReference.
const C_FLOAT64 & CMoiety::dependentNumber | ( | ) |
Retrieve and refresh the dependent number;
Definition at line 139 of file CMoiety.cpp.
References mNumber, and refreshDependentNumber().
const C_FLOAT64 & CMoiety::getAmount | ( | ) | const |
Retrieve the total amount
Definition at line 257 of file CMoiety.cpp.
References mIAmount.
const C_FLOAT64 & CMoiety::getDependentNumber | ( | ) | const |
Retrieve the dependent number;
Definition at line 145 of file CMoiety.cpp.
References mNumber.
Referenced by CMetab::calculate().
CCopasiObject * CMoiety::getDependentNumberReference | ( | ) | const |
Retrieve the object for the dependent particle number
Definition at line 151 of file CMoiety.cpp.
References mpDNumberReference.
Referenced by CMathObject::compileValue(), and CParticleReference::getPrerequisites().
std::string CMoiety::getDescription | ( | const CModel * | model | ) | const |
get the string representation of the moiety using the CMetabNameInterface
Definition at line 164 of file CMoiety.cpp.
References CMetabNameInterface::getDisplayName(), and mEquation.
Retrieve the components of the total mass equation
Definition at line 267 of file CMoiety.cpp.
References mEquation.
Referenced by CMathObject::compileDependentMass(), CMathObject::compileTotalMass(), and QConservedSpeciesAnimation::getScales().
std::string CMoiety::getExpression | ( | ) | const |
Retrieve the infix expression, which can be used to calculate the total amount.
Definition at line 228 of file CMoiety.cpp.
References mEquation.
Referenced by CQMoietiesTaskResult::slotCreateGlobalQuantity().
CCopasiObject * CMoiety::getInitialValueReference | ( | ) | const |
Retrieve the object for the total particle number
Definition at line 206 of file CMoiety.cpp.
References mpINumberReference.
|
virtual |
Returns a string with the name of this compartment.
Reimplemented from CCopasiObject.
Definition at line 154 of file CMoiety.cpp.
References mKey.
C_FLOAT64 CMoiety::getNumber | ( | ) | const |
Definition at line 209 of file CMoiety.cpp.
References mINumber.
CCopasiObject * CMoiety::getTotalNumberReference | ( | ) | const |
Retrieve the object for the dependent particle number
Definition at line 148 of file CMoiety.cpp.
References mpNumberReference.
Referenced by CMathObject::compileDependentMass().
CCopasiObject * CMoiety::getValueReference | ( | ) | const |
Retrieve the object for the total particle number
Definition at line 223 of file CMoiety.cpp.
References mpNumberReference.
|
private |
Initialize the number to amount conversion factor
Definition at line 272 of file CMoiety.cpp.
References DefaultFactor, CModel::getNumber2QuantityFactor(), CCopasiObject::getObjectAncestor(), and mpConversionFactor.
Referenced by setObjectParent().
|
private |
Initialize the contained CCopasiObjects
Definition at line 76 of file CMoiety.cpp.
References CCopasiObject::addDirectDependency(), CCopasiContainer::addObjectReference(), mIAmount, mINumber, mNumber, mpDNumberReference, mpINumberReference, mpNumberReference, refreshAmount(), refreshDependentNumber(), refreshInitialValue(), refreshValue(), CCopasiObject::setRefresh(), and CCopasiObject::ValueDbl.
Referenced by CMoiety().
void CMoiety::refreshAmount | ( | ) |
Refresh the total amount
Definition at line 262 of file CMoiety.cpp.
References mIAmount, mINumber, and mpConversionFactor.
Referenced by initObjects().
void CMoiety::refreshDependentNumber | ( | ) |
Refreshes the value of the dependent number
Definition at line 122 of file CMoiety.cpp.
References mEquation, mINumber, and mNumber.
Referenced by dependentNumber(), and initObjects().
void CMoiety::refreshInitialValue | ( | ) |
Refresh the initial total particle number
Definition at line 193 of file CMoiety.cpp.
References mEquation, and mINumber.
Referenced by initObjects().
void CMoiety::refreshValue | ( | ) |
Refresh the total particle number
Definition at line 214 of file CMoiety.cpp.
References mEquation, and mINumber.
Referenced by initObjects().
|
virtual |
Sets the parent of the moiety;
const | CCopasiContainer * pParent |
Reimplemented from CCopasiObject.
Definition at line 156 of file CMoiety.cpp.
References initConversionFactor(), and CCopasiObject::setObjectParent().
|
staticprivate |
The default conversion factor used if the moiety is not part of a model
Definition at line 126 of file CMoiety.h.
Referenced by initConversionFactor().
Vector of linear dependent CChemEqElement 0..*
Definition at line 153 of file CMoiety.h.
Referenced by add(), cleanup(), getDescription(), getEquation(), getExpression(), refreshDependentNumber(), refreshInitialValue(), and refreshValue().
|
private |
The total Amount of the Moiety.
Definition at line 146 of file CMoiety.h.
Referenced by getAmount(), initObjects(), and refreshAmount().
|
private |
Initial Number of Particles of Moiety.
Definition at line 141 of file CMoiety.h.
Referenced by getNumber(), initObjects(), refreshAmount(), refreshDependentNumber(), refreshInitialValue(), and refreshValue().
|
private |
The key of the moiety
Definition at line 131 of file CMoiety.h.
Referenced by getKey(), and ~CMoiety().
|
private |
Number of Particles of Moiety.
Definition at line 136 of file CMoiety.h.
Referenced by dependentNumber(), getDependentNumber(), initObjects(), and refreshDependentNumber().
|
private |
A pointer to the conversion factor between the particle number and the amount.
Definition at line 174 of file CMoiety.h.
Referenced by initConversionFactor(), and refreshAmount().
|
private |
A pointer to the object for the dependent particle number
Definition at line 169 of file CMoiety.h.
Referenced by getDependentNumberReference(), and initObjects().
|
private |
A pointer to the object for the initial total particle number
Definition at line 158 of file CMoiety.h.
Referenced by add(), cleanup(), getInitialValueReference(), and initObjects().
|
private |
A pointer to the object for the total particle number This is used during events
Definition at line 164 of file CMoiety.h.
Referenced by add(), cleanup(), getTotalNumberReference(), getValueReference(), and initObjects().