copasi API  0.1
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes
CModelEntity Class Reference

#include <CModelValue.h>

Inheritance diagram for CModelEntity:
CCopasiContainer CAnnotation CCopasiObject CCompartment CMetab CModel CModelValue

List of all members.

Public Types

enum  Status {
  FIXED = 0, ASSIGNMENT, REACTIONS, ODE,
  TIME
}

Public Member Functions

 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)
 ~CModelEntity ()
virtual const std::string & getKey () const
const CModelEntity::StatusgetStatus () const
virtual bool compile ()
virtual void calculate ()
bool isFixed () const
const C_FLOAT64 & getValue () const
const C_FLOAT64 & getInitialValue () const
virtual void refreshInitialValue ()
const C_FLOAT64 & getRate () const
virtual void setStatus (const CModelEntity::Status &status)
virtual void setValue (const C_FLOAT64 &value)
virtual void setInitialValue (const C_FLOAT64 &initialValue)
void setRate (const C_FLOAT64 &rate)
virtual const CCopasiObjectgetValueObject () const
virtual void * getValuePointer () const
virtual bool setObjectParent (const CCopasiContainer *pParent)
virtual std::set< const
CCopasiObject * > 
getDeletedObjects () const
void setSBMLId (const std::string &id)
const std::string & getSBMLId () const
void setInitialValuePtr (C_FLOAT64 *pInitialValue)
void setValuePtr (C_FLOAT64 *pValue)
bool setExpressionPtr (CExpression *pExpression)
const CExpressiongetExpressionPtr () const
CExpressiongetExpressionPtr ()
bool setInitialExpressionPtr (CExpression *pExpression)
const CExpressiongetInitialExpressionPtr () const
CExpressiongetInitialExpressionPtr ()
bool setExpression (const std::string &expression)
std::string getExpression () const
bool setInitialExpression (const std::string &expression)
std::string getInitialExpression () const
void setUsed (const bool &used)
const bool & isUsed () const
CCopasiObjectgetInitialValueReference () const
CCopasiObjectgetValueReference () const
CCopasiObjectgetRateReference () const

Static Public Attributes

static const std::string StatusName []
static const char * XMLStatus []

Protected Attributes

std::string mKey
std::string mSBMLId
C_FLOAT64 * mpValue
C_FLOAT64 * mpIValue
C_FLOAT64 mRate
CExpressionmpExpression
CExpressionmpInitialExpression
CCopasiObjectReference
< C_FLOAT64 > * 
mpIValueReference
CCopasiObjectReference
< C_FLOAT64 > * 
mpValueReference
CCopasiObjectReference
< C_FLOAT64 > * 
mpRateReference
CModelmpModel

Detailed Description

The base class for CCompartment, CMetab and CModelValue. CModelEntity is a base class for CCompartment, CMetab and CModelValue. These three classes have in common that (in the long run) they can each be model variables (subject to ODEs), constant, or subject to algebraic assignments. In addition, the CMetab objects can also be subject to reactions, and conservation rules.


Member Enumeration Documentation

The valid states for metabolites

Enumerator:
FIXED 
ASSIGNMENT 
REACTIONS 
ODE 
TIME 

Constructor & Destructor Documentation

CModelEntity::CModelEntity ( const std::string &  name = "NoName",
const CCopasiContainer pParent = NULL,
const std::string &  type = "ModelEntity",
const unsigned C_INT32 &  flag = CCopasiObject::Container | CCopasiObject::ValueDbl 
)

Default constructor

Parameters:
conststd::string & name (default: "NoName")
constCCopasiContainer * pParent (default: NULL)
CModelEntity::CModelEntity ( const CModelEntity src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
constCModelValue & src
constCCopasiContainer * pParent (default: NULL)
CModelEntity::~CModelEntity ( )

Destructor.


Member Function Documentation

void CModelEntity::calculate ( void  ) [virtual]

Calculate the value or the rate depending whether we have an ASIGNMENT or ODE

Reimplemented in CMetab.

bool CModelEntity::compile ( ) [virtual]

Compile the model value. This is only needed for status ASIGNMENT and ODE.

Returns:
bool success

Reimplemented in CMetab.

std::set< const CCopasiObject * > CModelEntity::getDeletedObjects ( ) const [virtual]

Retrieve the list of deleted numeric child objects;

Returns:
std::set< const CCopasiObject * > deletedObjects

Reimplemented in CMetab, and CCompartment.

std::string CModelEntity::getExpression ( ) const

Retrieve the expression for non FIXED model values.

Returns:
std::string expression
const CExpression * CModelEntity::getExpressionPtr ( ) const

Retrieve the pointer to the expression for non FIXED model values.

Returns:
CExpression*
CExpression * CModelEntity::getExpressionPtr ( )

Retrieve the pointer to the expression for non FIXED model values.

Returns:
CExpression*
std::string CModelEntity::getInitialExpression ( ) const

Retrieve the expression for ODE or REACTION model values.

Returns:
std::string expression
const CExpression * CModelEntity::getInitialExpressionPtr ( ) const

Retrieve the pointer to the expression for non FIXED model values.

Returns:
CExpression*
CExpression * CModelEntity::getInitialExpressionPtr ( )

Retrieve the pointer to the expression for non FIXED model values.

Returns:
CExpression*
const C_FLOAT64 & CModelEntity::getInitialValue ( ) const

Retrieve the initial value

CCopasiObject * CModelEntity::getInitialValueReference ( ) const

Retrieve object referencing the initial value

Returns:
CCopasiObject * initialValueReference
const std::string & CModelEntity::getKey ( ) const [virtual]

Retrieve the key

Returns:
std::string key

Reimplemented from CCopasiObject.

Reimplemented in CModel.

const C_FLOAT64 & CModelEntity::getRate ( ) const

Return rate of production of this entity

CCopasiObject * CModelEntity::getRateReference ( ) const

Retrieve object referencing the rate

Returns:
CCopasiObject * rateReference
const std::string & CModelEntity::getSBMLId ( ) const

Returns a reference to the SBML Id.

const CModelEntity::Status & CModelEntity::getStatus ( ) const

Retrieve the status of the entity.

Returns:
const CModelEntity::Status & status
const C_FLOAT64 & CModelEntity::getValue ( ) const

Retrieve the value

const CCopasiObject * CModelEntity::getValueObject ( ) const [virtual]

Retrieve the object representing the value;

Reimplemented from CCopasiContainer.

Reimplemented in CMetab.

void * CModelEntity::getValuePointer ( ) const [virtual]

Retrieve a pointer to the value;

Reimplemented from CCopasiObject.

Reimplemented in CMetab.

CCopasiObject * CModelEntity::getValueReference ( ) const

Retrieve object referencing the value

Returns:
CCopasiObject * valueReference
bool CModelEntity::isFixed ( ) const [inline]

Check whether the entity is FIXED or not.

Returns:
bool isFixed
const bool & CModelEntity::isUsed ( ) const

Retrieve whether the model value is used during simulation

Returns:
const bool & used
void CModelEntity::refreshInitialValue ( ) [virtual]

Refresh the initial value

Reimplemented in CMetab.

bool CModelEntity::setExpression ( const std::string &  expression)

Set the expression for non FIXED model values

Parameters:
conststd::string & expression
Returns:
bool success
bool CModelEntity::setExpressionPtr ( CExpression pExpression)

Set the expression for non FIXED model values

Parameters:
CExpression*
Returns:
bool success
bool CModelEntity::setInitialExpression ( const std::string &  expression)

Set the expression for ODE or REACTION model values

Parameters:
conststd::string & expression
Returns:
bool success
bool CModelEntity::setInitialExpressionPtr ( CExpression pExpression)

Set the expression for non FIXED model values

Parameters:
CExpression*
Returns:
bool success
void CModelEntity::setInitialValue ( const C_FLOAT64 &  initialValue) [virtual]

Set the initial value

Parameters:
constC_FLOAT64 & initialValue
void CModelEntity::setInitialValuePtr ( C_FLOAT64 *  pInitialValue)

Set the pointer to the initial value

Parameters:
C_FLOAT64* pInitialValue
bool CModelEntity::setObjectParent ( const CCopasiContainer pParent) [virtual]

Set the object parent

Parameters:
constCCopasiContainer * pParent
Returns:
bool success

Reimplemented from CCopasiObject.

Reimplemented in CMetab.

void CModelEntity::setRate ( const C_FLOAT64 &  rate)

Set the rate (dmValue/dt)

Parameters:
const C_FLOAT64 &rate
void CModelEntity::setSBMLId ( const std::string &  id)

Sets the SBMLId.

void CModelEntity::setStatus ( const CModelEntity::Status status) [virtual]

Set the status

Parameters:
constCModelEntity::Status & status

Reimplemented in CMetab.

void CModelEntity::setUsed ( const bool &  used)

Set whether the model entity is used during simulation

Parameters:
constbool & used
void CModelEntity::setValue ( const C_FLOAT64 &  value) [virtual]

Set the value

Parameters:
constC_FLOAT64 & value
void CModelEntity::setValuePtr ( C_FLOAT64 *  pValue)

Set the pointer to the value

Parameters:
C_FLOAT64* pValue

Member Data Documentation

std::string CModelEntity::mKey [protected]

Key of the model entity. It is stored here, but constructed in the derived classes.

The infix expression for objects of type ASSIGNMENT or ODE

Optional initial expression

C_FLOAT64* CModelEntity::mpIValue [protected]

Pointer to the initial value of the model entity.

C_FLOAT64* CModelEntity::mpValue [protected]

Pointer to the value of the model entity.

C_FLOAT64 CModelEntity::mRate [protected]

Rate of change/time.

std::string CModelEntity::mSBMLId [protected]

The id of the corresponding parameter in an SBML file. This value is either set upon importing an SBML file, or when the object is first exported to an SBML file.

const std::string CModelEntity::StatusName [static]
Initial value:
{
  "fixed",
  "assignment",
  "reactions",
  "ode",
  "time",
  ""
}

String representation of the states

const char * CModelEntity::XMLStatus [static]
Initial value:
{
  "fixed",
  "assignment",
  "reactions",
  "ode",
  "time",
  NULL
}

XML representation of the states


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines