COPASI API
4.16.103
|
#include <CCompartment.h>
Public Member Functions | |
bool | addMetabolite (CMetab *metabolite) |
CCompartment (const std::string &name="NoName", const CCopasiContainer *pParent=NULL) | |
CCompartment (const CCompartment &src, const CCopasiContainer *pParent=NULL) | |
void | cleanup () |
bool | createMetabolite (const CMetab &metabolite) |
virtual std::string | getChildObjectUnits (const CCopasiObject *pObject) const |
virtual std::set< const CCopasiObject * > | getDeletedObjects () const |
unsigned C_INT32 | getDimensionality () const |
CCopasiVectorNS< CMetab > & | getMetabolites () |
const CCopasiVectorNS< CMetab > & | getMetabolites () const |
C_INT32 | load (CReadConfig &configbuffer) |
bool | setDimensionality (unsigned C_INT32 dim) |
virtual | ~CCompartment () |
![]() | |
virtual void | calculate () |
CModelEntity (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const std::string &type="ModelEntity", const unsigned C_INT32 &flag=CCopasiObject::Container|CCopasiObject::ValueDbl) | |
CModelEntity (const CModelEntity &src, const CCopasiContainer *pParent=NULL) | |
virtual bool | compile () |
std::string | getExpression () const |
const CExpression * | getExpressionPtr () const |
CExpression * | getExpressionPtr () |
std::string | getInitialExpression () const |
const CExpression * | getInitialExpressionPtr () const |
CExpression * | getInitialExpressionPtr () |
const C_FLOAT64 & | getInitialValue () const |
CCopasiObject * | getInitialValueReference () const |
virtual const std::string & | getKey () const |
const C_FLOAT64 & | getRate () const |
CCopasiObject * | getRateReference () const |
const std::string & | getSBMLId () const |
const CModelEntity::Status & | getStatus () const |
const C_FLOAT64 & | getValue () const |
virtual const CCopasiObject * | getValueObject () const |
virtual void * | getValuePointer () const |
CCopasiObject * | getValueReference () const |
bool | isFixed () const |
const bool & | isUsed () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
virtual void | refreshInitialValue () |
bool | setExpression (const std::string &expression) |
bool | setExpressionPtr (CExpression *pExpression) |
bool | setInitialExpression (const std::string &expression) |
bool | setInitialExpressionPtr (CExpression *pExpression) |
virtual void | setInitialValue (const C_FLOAT64 &initialValue) |
void | setInitialValuePtr (C_FLOAT64 *pInitialValue) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
void | setRate (const C_FLOAT64 &rate) |
void | setSBMLId (const std::string &id) |
virtual void | setStatus (const CModelEntity::Status &status) |
void | setUsed (const bool &used) |
virtual void | setValue (const C_FLOAT64 &value) |
void | setValuePtr (C_FLOAT64 *pValue) |
~CModelEntity () | |
![]() | |
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 const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () 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 |
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 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 () |
![]() | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
virtual | ~CAnnotation () |
Protected Attributes | |
unsigned C_INT32 | mDimensionality |
![]() | |
CExpression * | mpExpression |
CExpression * | mpInitialExpression |
C_FLOAT64 * | mpIValue |
CCopasiObjectReference < C_FLOAT64 > * | mpIValueReference |
CModel * | mpModel |
CCopasiObjectReference < C_FLOAT64 > * | mpRateReference |
C_FLOAT64 * | mpValue |
CCopasiObjectReference < C_FLOAT64 > * | mpValueReference |
C_FLOAT64 | mRate |
std::string | mSBMLId |
![]() | |
objectMap | mObjects |
![]() | |
std::string | mKey |
Private Member Functions | |
void | initObjects () |
Private Attributes | |
CCopasiVectorNS< CMetab > | mMetabolites |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CCompartment &d) |
Additional Inherited Members | |
![]() | |
enum | Status { FIXED = 0, ASSIGNMENT, REACTIONS, ODE, TIME } |
![]() | |
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 |
![]() | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static CAnnotation * | castObject (CCopasiObject *pObject) |
static const CAnnotation * | castObject (const CCopasiObject *pObject) |
![]() | |
static const std::string | StatusName [] |
static const char * | XMLStatus [] |
![]() | |
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) | |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 37 of file CCompartment.h.
CCompartment::CCompartment | ( | 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 CCompartment.cpp.
References CKeyFactory::add(), CONSTRUCTOR_TRACE, CModelEntity::FIXED, CCopasiRootContainer::getKeyFactory(), initObjects(), CAnnotation::mKey, CModelEntity::mpIValue, and CModelEntity::setStatus().
CCompartment::CCompartment | ( | const CCompartment & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor.
const CCompartment & | src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 53 of file CCompartment.cpp.
References CKeyFactory::add(), CONSTRUCTOR_TRACE, CCopasiRootContainer::getKeyFactory(), initObjects(), and CAnnotation::mKey.
|
virtual |
Destructor. The destructor does nothing.
Definition at line 64 of file CCompartment.cpp.
References DESTRUCTOR_TRACE, CCopasiRootContainer::getKeyFactory(), CAnnotation::mKey, and CKeyFactory::remove().
bool CCompartment::addMetabolite | ( | CMetab * | metabolite | ) |
Adds a metabolite to the compartment. Only the concentration is taken from the metabolite, the number of particles is calculated according to the volume of the compartment
CMetab | * metabolite; |
Definition at line 175 of file CCompartment.cpp.
References CCopasiVectorN< CType >::add(), CCopasiObject::getCN(), CCopasiObject::getObjectParent(), CRenameHandler::handle(), mMetabolites, and CCopasiObject::smpRenameHandler.
Referenced by createMetabolite(), CModelExpansion::replaceInMetab(), and CCopasiXMLParser::MetaboliteElement::start().
void CCompartment::cleanup | ( | ) |
Cleanup
Definition at line 123 of file CCompartment.cpp.
References CCopasiVector< T >::cleanup(), and mMetabolites.
bool CCompartment::createMetabolite | ( | const CMetab & | metabolite | ) |
Adds a metabolite to the compartment. Only the concentration is taken from the metabolite, the number of particles is calculated according to the volume of the compartment
const | CMetab & metabolite; |
Definition at line 165 of file CCompartment.cpp.
References addMetabolite().
|
virtual |
Retrieve the units of the child object.
Reimplemented from CCopasiContainer.
Definition at line 71 of file CCompartment.cpp.
References CModel::getAreaUnitsDisplayString(), CModel::getLengthUnitsDisplayString(), CModel::getTimeUnitsDisplayString(), CModel::getVolumeUnitsDisplayString(), mDimensionality, CModelEntity::mpIValueReference, CModelEntity::mpModel, CModelEntity::mpRateReference, and CModelEntity::mpValueReference.
Referenced by CMetab::getChildObjectUnits(), and CModelParameter::getUnit().
|
virtual |
Retrieve the list of deleted numeric child objects;
Reimplemented from CModelEntity.
Definition at line 125 of file CCompartment.cpp.
References CModelEntity::getDeletedObjects().
Referenced by CModel::appendDependentModelObjects(), CModel::removeCompartment(), CQCompartmentDM::removeRows(), and CQCompartment::slotBtnDelete().
unsigned C_INT32 CCompartment::getDimensionality | ( | ) | const |
Get the dimensionality of the compartment
Definition at line 204 of file CCompartment.cpp.
References mDimensionality.
Referenced by CModelAdd::addCompartments(), CSBMLExporter::createCompartment(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createInitialAssignment(), CSBMLExporter::createKineticLaw(), CSBMLExporter::createRule(), CModelExpansion::duplicateCompartment(), CSBMLExporter::exportEventAssignments(), SBMLImporter::importEvent(), SBMLImporter::importInitialAssignments(), SBMLImporter::importRuleForModelEntity(), CQCompartment::load(), CSBMLExporter::replaceSpeciesReferences(), CQCompartment::save(), and CCopasiXML::saveModel().
CCopasiVectorNS< CMetab > & CCompartment::getMetabolites | ( | ) |
Retrieve the vector of contained metabolites
Definition at line 157 of file CCompartment.cpp.
References mMetabolites.
Referenced by CQCompartment::copy(), SBMLImporter::createCMetabFromSpecies(), CQSelectionWizardPage::fillTree(), CMetabNameInterface::getMetabolite(), CQCompartment::loadMetaboliteTable(), moveObject(), CModelExpansion::replaceInMetab(), CQExpandModelData::slotCompartmentActivated(), and CQCompartment::slotMetaboliteTableCurrentChanged().
const CCopasiVectorNS< CMetab > & CCompartment::getMetabolites | ( | ) | const |
Retrieve the vector of contained metabolites
Definition at line 160 of file CCompartment.cpp.
References mMetabolites.
|
private |
Initialize the contained CCopasiObjects
Definition at line 209 of file CCompartment.cpp.
References CModelEntity::mpIValueReference, CModelEntity::mpValueReference, and CCopasiObject::setObjectName().
Referenced by CCompartment().
C_INT32 CCompartment::load | ( | CReadConfig & | configbuffer | ) |
Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
pconfigbuffer | reference to a CReadConfig object. |
Definition at line 134 of file CCompartment.cpp.
References C_FLOAT64, C_INT32, CReadConfig::getVariable(), CReadConfig::SEARCH, CModelEntity::setInitialValue(), and CCopasiObject::setObjectName().
bool CCompartment::setDimensionality | ( | unsigned C_INT32 | dim | ) |
Set the dimensionality of the compartment. May be 0, 1, 2, or 3. If the value is not valid it will be ignored and the return value will be false
Definition at line 195 of file CCompartment.cpp.
References mDimensionality.
Referenced by CModelAdd::addCompartments(), SBMLImporter::createCCompartmentFromCompartment(), CModelExpansion::duplicateCompartment(), and CQCompartment::save().
|
friend |
Friend declaration for ostream operator <<
std::ostream | & os |
const | CCompartment & d |
Definition at line 215 of file CCompartment.cpp.
|
protected |
The dimensionality of the compartment. Can be 0, 1, 2, or 3
Definition at line 155 of file CCompartment.h.
Referenced by getChildObjectUnits(), getDimensionality(), and setDimensionality().
|
private |
Metabolites located in the compartment. 0..* <{CMetab}>
Definition at line 45 of file CCompartment.h.
Referenced by addMetabolite(), cleanup(), getMetabolites(), and operator<<().