COPASI API
4.40.278
|
#include <CCompartment.h>
Public Member Functions | |
bool | addMetabolite (CMetab *metabolite) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CCompartment (const CCompartment &src, const CDataContainer *pParent) | |
CCompartment (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT) | |
void | cleanup () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
unsigned C_INT32 | getDimensionality () const |
CDataVectorNS< CMetab > & | getMetabolites () |
const CDataVectorNS< CMetab > & | getMetabolites () const |
virtual const std::string | getUnits () const |
C_INT32 | load (CReadConfig &configbuffer) |
bool | setDimensionality (unsigned C_INT32 dim) |
virtual CData | toData () const |
virtual | ~CCompartment () |
![]() | |
virtual void | calculate () |
CModelEntity (const CModelEntity &src, const CDataContainer *pParent) | |
CModelEntity (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT, const std::string &type="ModelEntity", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual CIssue | compile () |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const override |
std::string | getDefaultNoiseExpression () const |
std::string | getExpression () const |
CExpression * | getExpressionPtr () |
const CExpression * | getExpressionPtr () const |
std::string | getInitialExpression () const |
CExpression * | getInitialExpressionPtr () |
const CExpression * | getInitialExpressionPtr () const |
const C_FLOAT64 & | getInitialValue () const |
CDataObject * | getInitialValueReference () const |
virtual const std::string & | getKey () const override |
CModel * | getModel () const |
std::string | getNoiseExpression () const |
CExpression * | getNoiseExpressionPtr () |
const CExpression * | getNoiseExpressionPtr () const |
CDataObject * | getNoiseReference () const |
const C_FLOAT64 & | getRate () const |
CDataObject * | getRateReference () const |
const std::string & | getSBMLId () const |
const CModelEntity::Status & | getStatus () const |
virtual const std::string & | getUnitExpression () const |
const C_FLOAT64 & | getValue () const |
virtual const CDataObject * | getValueObject () const override |
virtual void * | getValuePointer () const override |
CDataObject * | getValueReference () const |
const bool & | hasNoise () const |
bool | isFixed () const |
const bool & | isUsed () const |
CIssue | setExpression (const std::string &expression) |
bool | setExpressionPtr (CExpression *pExpression) |
void | setHasNoise (const bool &hasNoise) |
CIssue | setInitialExpression (const std::string &expression) |
bool | setInitialExpressionPtr (CExpression *pExpression) |
virtual void | setInitialValue (const C_FLOAT64 &initialValue) |
bool | setNoiseExpression (const std::string &expression) |
bool | setNoiseExpressionPtr (CExpression *pExpression) |
virtual bool | setObjectParent (const CDataContainer *pParent) override |
void | setRate (const C_FLOAT64 &rate) |
void | setSBMLId (const std::string &id) const |
bool | setStatus (const CModelEntity::Status &status) |
virtual CIssue | setUnitExpression (std::string unitExpression) |
void | setUsed (const bool &used) |
virtual void | setValue (const C_FLOAT64 &value) |
~CModelEntity () | |
![]() | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual | ~CDataContainer () |
![]() | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
![]() | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
![]() | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
![]() | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
void | initMiriamAnnotation (const std::string &newId) |
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) |
CData | toData () const |
virtual | ~CAnnotation () |
Static Public Member Functions | |
static CCompartment * | fromData (const CData &data, CUndoObjectInterface *pParent) |
![]() | |
static CModelEntity * | fromData (const CData &data, CUndoObjectInterface *pParent) |
![]() | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
![]() | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
![]() | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
![]() | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
![]() | |
static CMIRIAMInfo * | allocateMiriamInfo (CDataContainer *pParent) |
static CAnnotation * | castObject (CDataObject *pObject) |
static const CAnnotation * | castObject (const CDataObject *pObject) |
static void | freeMiriamInfo (CDataContainer *pParent) |
Protected Attributes | |
unsigned C_INT32 | mDimensionality |
![]() | |
bool | mHasNoise |
C_FLOAT64 | mIValue |
C_FLOAT64 | mNoise |
CExpression * | mpExpression |
CExpression * | mpInitialExpression |
CDataObjectReference< C_FLOAT64 > * | mpIValueReference |
CModel * | mpModel |
CExpression * | mpNoiseExpression |
CDataObjectReference< C_FLOAT64 > * | mpNoiseReference |
CDataObjectReference< C_FLOAT64 > * | mpRateReference |
CDataObjectReference< C_FLOAT64 > * | mpValueReference |
C_FLOAT64 | mRate |
std::string | mSBMLId |
std::string | mUnitExpression |
C_FLOAT64 | mValue |
![]() | |
objectMap | mObjects |
![]() | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
![]() | |
CValidity | mValidity |
![]() | |
std::string | mKey |
Private Member Functions | |
void | initObjects () |
Private Attributes | |
CDataVectorNS< CMetab > | mMetabolites |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CCompartment &d) |
Additional Inherited Members | |
![]() | |
enum class | Status { FIXED = 0 , ASSIGNMENT , REACTIONS , ODE , TIME , __SIZE } |
![]() | |
typedef CDataObjectMap | objectMap |
![]() | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
![]() | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
![]() | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
![]() | |
static const CEnumAnnotation< std::string, Status > | StatusName |
static const CEnumAnnotation< std::string, Status > | XMLStatus |
![]() | |
static const CObjectInterface::ContainerList | EmptyList |
![]() | |
CModelEntity (const CModelEntity &src) | |
![]() | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
![]() | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
CCompartment::CCompartment | ( | const std::string & | name = "NoName" , |
const CDataContainer * | pParent = NO_PARENT |
||
) |
Default constructor.
const | std::string & name (default: "NoName") |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE, CModelEntity::FIXED, initObjects(), CModelEntity::mIValue, and CModelEntity::setStatus().
Referenced by fromData().
CCompartment::CCompartment | ( | const CCompartment & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor.
const CCompartment & | src |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE, and initObjects().
|
virtual |
Destructor. The destructor does nothing.
References DESTRUCTOR_TRACE, CRootContainer::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; |
References CDataVectorN< CType >::add(), CDataObject::getCN(), CDataObject::getObjectParent(), CRegisteredCommonName::handle(), and mMetabolites.
Referenced by MetaboliteHandler::processStart(), CModelExpansion::replaceInMetab(), and CMetab::setCompartment().
|
virtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CModelEntity.
References CUndoData::CChangeSet::add(), CModelEntity::applyData(), CUndoData::CHANGE, CData::FRAMEWORK, CCore::FrameworkNames, CDataObject::getCN(), CData::getProperty(), CData::INITIAL_VALUE, CData::isSetProperty(), CModelEntity::mIValue, CModelEntity::mpModel, CCore::ParticleNumbers, setDimensionality(), CData::SPATIAL_DIMENSION, CDataValue::toData(), CDataValue::toDouble(), toEnum(), CDataValue::toString(), CDataValue::toUint(), CModel::updateInitialValues(), and CData::VALUE.
void CCompartment::cleanup | ( | ) |
Cleanup
References CDataVector< CType >::cleanup(), and mMetabolites.
|
virtual |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
CUndoData | & undoData |
const | CUndoData::Type & type |
const | CData & oldData (default: empty data) |
const | CCore::Framework & framework (default: CCore::Framework::ParticleNumbers) |
Reimplemented from CModelEntity.
References CUndoData::addProperty(), CData::addProperty(), CUndoData::CHANGE, CModelEntity::createUndoData(), CData::FRAMEWORK, CCore::FrameworkNames, CData::getProperty(), CData::INITIAL_VALUE, mDimensionality, CModelEntity::mIValue, CData::SPATIAL_DIMENSION, CDataValue::toData(), and CData::VALUE.
|
static |
Static method to create a CDataObject based on the provided data
const | CData & data |
References CCompartment(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().
unsigned C_INT32 CCompartment::getDimensionality | ( | ) | const |
Get the dimensionality of the compartment
References mDimensionality.
Referenced by CModelAdd::addCompartments(), CSBMLExporter::createCompartment(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::duplicateCompartment(), SBMLImporter::importInitialAssignments(), SBMLImporter::importRuleForModelEntity(), and CCopasiXML::saveModel().
CDataVectorNS< CMetab > & CCompartment::getMetabolites | ( | ) |
Retrieve the vector of contained metabolites
References mMetabolites.
Referenced by SBMLImporter::createCMetabFromSpecies(), CMetabNameInterface::getMetabolite(), CModelExpansion::replaceInMetab(), and CMetab::setCompartment().
const CDataVectorNS< CMetab > & CCompartment::getMetabolites | ( | ) | const |
Retrieve the vector of contained metabolites
References mMetabolites.
|
virtual |
Retrieve the units of the object.
Reimplemented from CDataContainer.
References CModel::getAreaUnit(), CModel::getLengthUnit(), CModel::getVolumeUnit(), mDimensionality, and CModelEntity::mpModel.
Referenced by SBMLImporter::createCCompartmentFromCompartment(), and CReactionInterface::getConcentrationRateUnit().
|
private |
Initialize the contained CDataObjects
References CModelEntity::mpIValueReference, CModelEntity::mpValueReference, and CDataObject::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. |
References C_FLOAT64, C_INT32, CReadConfig::getVariable(), CReadConfig::SEARCH, CModelEntity::setInitialValue(), and CDataObject::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
References mDimensionality.
Referenced by CModelAdd::addCompartments(), applyData(), SBMLImporter::createCCompartmentFromCompartment(), CModelExpansion::duplicateCompartment(), and CompartmentHandler::processStart().
|
virtual |
Retrieve the data describing the object
Reimplemented from CModelEntity.
References CData::addProperty(), CData::FRAMEWORK, CCore::FrameworkNames, CData::INITIAL_VALUE, mDimensionality, CModelEntity::mIValue, CCore::ParticleNumbers, CData::SPATIAL_DIMENSION, CModelEntity::toData(), and CData::VALUE.
|
friend |
Friend declaration for ostream operator <<
std::ostream | & os |
const | CCompartment & d |
|
protected |
The dimensionality of the compartment. Can be 0, 1, 2, or 3
Referenced by createUndoData(), getDimensionality(), getUnits(), setDimensionality(), and toData().
|
private |
Metabolites located in the compartment. @supplierCardinality 0..* @associates <{CMetab}>
Referenced by addMetabolite(), cleanup(), and getMetabolites().