COPASI API  4.40.278
CModelValue Class Reference

#include <CModelValue.h>

Inheritance diagram for CModelValue:
[legend]

Public Member Functions

virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)
 
 CModelValue (const CModelValue &src, const CDataContainer *pParent)
 
 CModelValue (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT)
 
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const
 
virtual const std::string getUnits () const
 
virtual CData toData () const
 
 ~CModelValue ()
 
- Public Member Functions inherited from CModelEntity
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
 
CExpressiongetExpressionPtr ()
 
const CExpressiongetExpressionPtr () const
 
std::string getInitialExpression () const
 
CExpressiongetInitialExpressionPtr ()
 
const CExpressiongetInitialExpressionPtr () const
 
const C_FLOAT64getInitialValue () const
 
CDataObjectgetInitialValueReference () const
 
virtual const std::string & getKey () const override
 
CModelgetModel () const
 
std::string getNoiseExpression () const
 
CExpressiongetNoiseExpressionPtr ()
 
const CExpressiongetNoiseExpressionPtr () const
 
CDataObjectgetNoiseReference () const
 
const C_FLOAT64getRate () const
 
CDataObjectgetRateReference () const
 
const std::string & getSBMLId () const
 
const CModelEntity::StatusgetStatus () const
 
virtual const std::string & getUnitExpression () const
 
const C_FLOAT64getValue () const
 
virtual const CDataObjectgetValueObject () const override
 
virtual void * getValuePointer () const override
 
CDataObjectgetValueReference () 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 ()
 
- Public Member Functions inherited from CDataContainer
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 CObjectInterfacegetObject (const CCommonName &cn) const override
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual CUndoObjectInterfaceinsert (const CData &data) override
 
void objectRenamed (CDataObject *pObject, const std::string &oldName)
 
virtual bool remove (CDataObject *pObject)
 
virtual ~CDataContainer ()
 
- Public Member Functions inherited from CDataObject
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 CDataObjectgetDataObject () const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () 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 ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
 CObjectInterface (const CObjectInterface &src)
 
virtual ~CObjectInterface ()
 
- Public Member Functions inherited from CUndoObjectInterface
 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 ()
 
- Public Member Functions inherited from CAnnotation
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
 
UnsupportedAnnotationgetUnsupportedAnnotations ()
 
const UnsupportedAnnotationgetUnsupportedAnnotations () 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 &notes)
 
CData toData () const
 
virtual ~CAnnotation ()
 

Static Public Member Functions

static CModelValuefromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CModelEntity
static CModelEntityfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
 
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 
- Static Public Member Functions inherited from CAnnotation
static CMIRIAMInfoallocateMiriamInfo (CDataContainer *pParent)
 
static CAnnotationcastObject (CDataObject *pObject)
 
static const CAnnotationcastObject (const CDataObject *pObject)
 
static void freeMiriamInfo (CDataContainer *pParent)
 

Private Member Functions

void initObjects ()
 

Friends

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

Additional Inherited Members

- Public Types inherited from CModelEntity
enum class  Status {
  FIXED = 0 , ASSIGNMENT , REACTIONS , ODE ,
  TIME , __SIZE
}
 
- Public Types inherited from CDataContainer
typedef CDataObjectMap objectMap
 
- Public Types inherited from CDataObject
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
}
 
- Public Types inherited from CObjectInterface
typedef std::vector< const CDataContainer * > ContainerList
 
typedef std::set< const CObjectInterface * > ObjectSet
 
- Public Types inherited from CAnnotation
typedef std::map< std::string, std::string > UnsupportedAnnotation
 
- Static Public Attributes inherited from CModelEntity
static const CEnumAnnotation< std::string, StatusStatusName
 
static const CEnumAnnotation< std::string, StatusXMLStatus
 
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList
 
- Protected Member Functions inherited from CModelEntity
 CModelEntity (const CModelEntity &src)
 
- Protected Member Functions inherited from CDataContainer
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 ()
 
- Protected Member Functions inherited from CDataObject
 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)
 
- Protected Attributes inherited from CModelEntity
bool mHasNoise
 
C_FLOAT64 mIValue
 
C_FLOAT64 mNoise
 
CExpressionmpExpression
 
CExpressionmpInitialExpression
 
CDataObjectReference< C_FLOAT64 > * mpIValueReference
 
CModelmpModel
 
CExpressionmpNoiseExpression
 
CDataObjectReference< C_FLOAT64 > * mpNoiseReference
 
CDataObjectReference< C_FLOAT64 > * mpRateReference
 
CDataObjectReference< C_FLOAT64 > * mpValueReference
 
C_FLOAT64 mRate
 
std::string mSBMLId
 
std::string mUnitExpression
 
C_FLOAT64 mValue
 
- Protected Attributes inherited from CDataContainer
objectMap mObjects
 
- Protected Attributes inherited from CDataObject
ObjectSet mPrerequisits
 
std::set< CDataContainer * > mReferences
 
- Protected Attributes inherited from CObjectInterface
CValidity mValidity
 
- Protected Attributes inherited from CAnnotation
std::string mKey
 

Detailed Description

CModelValue represents an entity in the model that has a value but is not a concentration (like species) or a volume (like compartments). It correspondents to global parameters in SBML

Constructor & Destructor Documentation

◆ CModelValue() [1/2]

CModelValue::CModelValue ( const std::string &  name = "NoName",
const CDataContainer pParent = NO_PARENT 
)

Default constructor

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

References CONSTRUCTOR_TRACE, and initObjects().

Referenced by fromData().

◆ CModelValue() [2/2]

CModelValue::CModelValue ( const CModelValue src,
const CDataContainer pParent 
)

Copy constructor

Parameters
constCModelValue & src
constCDataContainer * pParent (default: NULL)

References CONSTRUCTOR_TRACE, and initObjects().

◆ ~CModelValue()

CModelValue::~CModelValue ( )

Destructor.

References DESTRUCTOR_TRACE.

Member Function Documentation

◆ applyData()

bool CModelValue::applyData ( const CData data,
CUndoData::CChangeSet changes 
)
virtual

Apply the provided data to the object

Parameters
constCData & data
Returns
bool success

Reimplemented from CModelEntity.

References CModelEntity::applyData(), CData::getProperty(), CData::isSetProperty(), CModelEntity::setUnitExpression(), CDataValue::toString(), and CData::UNIT.

◆ createUndoData()

void CModelValue::createUndoData ( CUndoData undoData,
const CUndoData::Type type,
const CData oldData = CData(),
const CCore::Framework framework = CCore::Framework::ParticleNumbers 
) const
virtual

Create the undo data which represents the changes recording the differences between the provided oldData and the current data.

Parameters
CUndoData& undoData
constCUndoData::Type & type
constCData & oldData (default: empty data)
constCCore::Framework & framework (default: CCore::Framework::ParticleNumbers)
Returns
CUndoData undoData

Reimplemented from CModelEntity.

References CUndoData::addProperty(), CUndoData::CHANGE, CModelEntity::createUndoData(), CData::getProperty(), CModelEntity::mUnitExpression, and CData::UNIT.

◆ fromData()

CModelValue * CModelValue::fromData ( const CData data,
CUndoObjectInterface pParent 
)
static

Static method to create a CDataObject based on the provided data

Parameters
constCData & data
Returns
CModelValue * pDataObject

References CModelValue(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().

◆ getUnits()

const std::string CModelValue::getUnits ( ) const
virtual

Retrieve the units of the object.

Returns
std::string units

Reimplemented from CDataContainer.

References CModelEntity::mUnitExpression.

◆ initObjects()

void CModelValue::initObjects ( )
private

Initialize the contained CDataObjects

Referenced by CModelValue().

◆ toData()

CData CModelValue::toData ( ) const
virtual

Retrieve the data describing the object

Returns
CData data

Reimplemented from CModelEntity.

References CData::addProperty(), CModelEntity::mUnitExpression, CModelEntity::toData(), and CData::UNIT.

Friends And Related Function Documentation

◆ operator<<

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

insert operator


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