COPASI API  4.16.103
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CChemEqElement Class Reference

#include <CChemEqElement.h>

Inheritance diagram for CChemEqElement:
Inheritance graph
Collaboration diagram for CChemEqElement:
Collaboration graph

Public Member Functions

void addToMultiplicity (const C_FLOAT64 multiplicity=1.0)
 CChemEqElement (const std::string &name="Chem Eq Element", const CCopasiContainer *pParent=NULL)
 CChemEqElement (const CChemEqElement &src, const CCopasiContainer *pParent=NULL)
void cleanup ()
const CMetabgetMetabolite () const
const std::string & getMetaboliteKey () const
const C_FLOAT64getMultiplicity () const
void setMetabolite (const std::string &key)
void setMultiplicity (const C_FLOAT64 multiplicity)
 ~CChemEqElement ()
- 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 Member Functions

void initObjects ()

Private Attributes

std::string mMetaboliteKey
C_FLOAT64 mMultiplicity


std::ostream & operator<< (std::ostream &os, const CChemEqElement &d)

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 41 of file CChemEqElement.h.

Constructor & Destructor Documentation

CChemEqElement::CChemEqElement ( const std::string &  name = "Chem Eq Element",
const CCopasiContainer pParent = NULL 

Default constructor

conststd::string & name (default: "NoName")
constCCopasiContainer * pParent (default: NULL)

Definition at line 40 of file CChemEqElement.cpp.

References CONSTRUCTOR_TRACE, and initObjects().

41  :
42  CCopasiContainer(name, pParent, "Chemical Equation Element"),
44  mMultiplicity(0)
45  //mpMetabolite(NULL)
46 {
47  initObjects();
49 }
std::string mMetaboliteKey
C_FLOAT64 mMultiplicity
char name[1]
Definition: stdsoap2.h:1342
Definition: copasi.h:202
CChemEqElement::CChemEqElement ( const CChemEqElement src,
const CCopasiContainer pParent = NULL 

Copy constructor

const CChemEqElement &src
constCCopasiContainer * pParent (default: NULL)

Definition at line 51 of file CChemEqElement.cpp.

References CONSTRUCTOR_TRACE, and initObjects().

52  :
53  CCopasiContainer(src, pParent),
56  //mpMetabolite(src.mpMetabolite)
57 {
58  initObjects();
60 }
std::string mMetaboliteKey
C_FLOAT64 mMultiplicity
Definition: copasi.h:202
CChemEqElement::~CChemEqElement ( )


Definition at line 62 of file CChemEqElement.cpp.


Definition: copasi.h:206

Member Function Documentation

void CChemEqElement::addToMultiplicity ( const C_FLOAT64  multiplicity = 1.0)

Add to the multiplicity of the element.

const C_FLOAT64multiplicity (default = 1.0)

Definition at line 92 of file CChemEqElement.cpp.

References mMultiplicity.

93 {mMultiplicity += multiplicity;}
C_FLOAT64 mMultiplicity
void CChemEqElement::cleanup ( )


Definition at line 70 of file CChemEqElement.cpp.

70 {}
const CMetab * CChemEqElement::getMetabolite ( ) const
const std::string & CChemEqElement::getMetaboliteKey ( ) const

Retrieve the key of the species

const std::string & speciesKey

Definition at line 83 of file CChemEqElement.cpp.

References mMetaboliteKey.

Referenced by CChemEq::addElement(), CModelAdd::addReactions(), SBMLImporter::applyStoichiometricExpressions(), CODEExporter::exportKineticFunction(), and SBMLImporter::isMassActionExpression().

84 {return mMetaboliteKey;}
std::string mMetaboliteKey
const C_FLOAT64 & CChemEqElement::getMultiplicity ( ) const
void CChemEqElement::initObjects ( )

Definition at line 64 of file CChemEqElement.cpp.

References CCopasiContainer::addObjectReference(), mMetaboliteKey, mMultiplicity, and CCopasiObject::ValueDbl.

Referenced by CChemEqElement().

65 {
67  addObjectReference("Metab Key", mMetaboliteKey);
68 }
std::string mMetaboliteKey
C_FLOAT64 mMultiplicity
CCopasiObject * addObjectReference(const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
void CChemEqElement::setMetabolite ( const std::string &  key)

Set the metabolite of the element.

CMetab* metabolite

Definition at line 72 of file CChemEqElement.cpp.

References CKeyFactory::get(), CCopasiRootContainer::getKeyFactory(), CCopasiObject::getObjectName(), mMetaboliteKey, and CCopasiObject::setObjectName().

Referenced by CChemEq::addMetabolite(), CModelMerging::mergeMetabolites(), and CModelExpansion::replaceInReaction().

73 {
74  mMetaboliteKey = key;
77  if (tmp)
78  this->setObjectName("ChEqEl_" + tmp->getObjectName());
79  else
80  this->setObjectName("ChemEqElement");
81 }
const std::string & getObjectName() const
CCopasiObject * get(const std::string &key)
Definition: CMetab.h:178
std::string mMetaboliteKey
static CKeyFactory * getKeyFactory()
bool setObjectName(const std::string &name)
void CChemEqElement::setMultiplicity ( const C_FLOAT64  multiplicity)

Set the multiplicity of the element.

const C_FLOAT64multiplicity

Definition at line 89 of file CChemEqElement.cpp.

References mMultiplicity.

Referenced by CChemEq::addElement(), CChemEq::addMetabolite(), and CChemEq::setMultiplicity().

90 {mMultiplicity = multiplicity;}
C_FLOAT64 mMultiplicity

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CChemEqElement d 

Definition at line 100 of file CChemEqElement.cpp.

101 {
102  os << "CChemEqElement: " << d.mMultiplicity
103  << " * " << d.mMetaboliteKey << std::endl;
105  return os;
106 }
std::string mMetaboliteKey
C_FLOAT64 mMultiplicity

Member Data Documentation

std::string CChemEqElement::mMetaboliteKey

The name of the metabolite the element

Definition at line 49 of file CChemEqElement.h.

Referenced by getMetabolite(), getMetaboliteKey(), initObjects(), operator<<(), and setMetabolite().

C_FLOAT64 CChemEqElement::mMultiplicity

The multiplicity of the metabolite

Definition at line 54 of file CChemEqElement.h.

Referenced by addToMultiplicity(), getMultiplicity(), initObjects(), operator<<(), and setMultiplicity().

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