copasi API  0.1
Public Member Functions | Protected Attributes | Friends
CCompartment Class Reference

#include <CCompartment.h>

Inheritance diagram for CCompartment:
CModelEntity CCopasiContainer CAnnotation CCopasiObject

List of all members.

Public Member Functions

 CCompartment (const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
 CCompartment (const CCompartment &src, const CCopasiContainer *pParent=NULL)
virtual ~CCompartment ()
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
void cleanup ()
virtual std::set< const
CCopasiObject * > 
getDeletedObjects () const
C_INT32 load (CReadConfig &configbuffer)
CCopasiVectorNS< CMetab > & getMetabolites ()
const CCopasiVectorNS< CMetab > & getMetabolites () const
bool createMetabolite (const CMetab &metabolite)
bool addMetabolite (CMetab *metabolite)
bool setDimensionality (unsigned C_INT32 dim)
unsigned C_INT32 getDimensionality () const

Protected Attributes

unsigned C_INT32 mDimensionality

Friends

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

Constructor & Destructor Documentation

CCompartment::CCompartment ( const std::string &  name = "NoName",
const CCopasiContainer pParent = NULL 
)

Default constructor.

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

Copy constructor.

Parameters:
const CCompartment &src
constCCopasiContainer * pParent (default: NULL)
CCompartment::~CCompartment ( ) [virtual]

Destructor. The destructor does nothing.


Member Function Documentation

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

Parameters:
CMetab* metabolite;
Returns:
bool success
void CCompartment::cleanup ( )

Cleanup

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

Parameters:
constCMetab & metabolite;
Returns:
bool success
std::string CCompartment::getChildObjectUnits ( const CCopasiObject pObject) const [virtual]

Retrieve the units of the child object.

Returns:
std::string units

Reimplemented from CCopasiContainer.

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

Retrieve the list of deleted numeric child objects;

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

Reimplemented from CModelEntity.

unsigned C_INT32 CCompartment::getDimensionality ( ) const

Get the dimensionality of the compartment

CCopasiVectorNS< CMetab > & CCompartment::getMetabolites ( )

Retrieve the vector of contained metabolites

Returns:
CCopasiVectorNS < CMetab > & metabolites
const CCopasiVectorNS< CMetab > & CCompartment::getMetabolites ( ) const

Retrieve the vector of contained metabolites

Returns:
const CCopasiVectorNS < CMetab > & metabolites
C_INT32 CCompartment::load ( CReadConfig configbuffer)

Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)

Parameters:
pconfigbufferreference to a CReadConfig object.
Returns:
mFail
See also:
mFail
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


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CCompartment d 
) [friend]

Friend declaration for ostream operator <<

Parameters:
std::ostream& os
constCCompartment & d
Returns:
std::ostream & os

Member Data Documentation

unsigned C_INT32 CCompartment::mDimensionality [protected]

The dimensionality of the compartment. Can be 0, 1, 2, or 3


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