COPASI API  4.16.103
Public Member Functions | Private Attributes | Friends | List of all members
CMetabOld Class Reference

#include <CMetab.h>

Inheritance diagram for CMetabOld:
Inheritance graph
[legend]
Collaboration diagram for CMetabOld:
Collaboration graph
[legend]

Public Member Functions

void cleanup ()
 
 CMetabOld (const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
 
 CMetabOld (const CMetabOld &src, const CCopasiContainer *pParent=NULL)
 
C_INT32 getIndex () const
 
C_INT32 load (CReadConfig &configbuffer)
 
 ~CMetabOld ()
 
- Public Member Functions inherited from CCopasiContainer
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 std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
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 DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
virtual const std::string & getKey () const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () 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 bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
virtual void print (std::ostream *ostream) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
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 ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Private Attributes

C_INT32 mCompartment
 
C_FLOAT64 mIConc
 
CMetab::Status mStatus
 

Friends

class CMetab
 

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
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
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 485 of file CMetab.h.

Constructor & Destructor Documentation

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

Default constructor

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

Definition at line 997 of file CMetab.cpp.

References CONSTRUCTOR_TRACE.

998  :
999  CCopasiContainer(name, pParent, "Old Metabolite"),
1000  mIConc(1.0),
1002  mCompartment()
CMetab::Status mStatus
Definition: CMetab.h:501
C_INT32 mCompartment
Definition: CMetab.h:506
C_FLOAT64 mIConc
Definition: CMetab.h:495
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202
CMetabOld::CMetabOld ( const CMetabOld src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters
constCMetabOld & src
constCCopasiContainer * pParent (default: NULL)

Definition at line 1005 of file CMetab.cpp.

References CONSTRUCTOR_TRACE.

1006  :
1007  CCopasiContainer(src, pParent),
1008  mIConc(src.mIConc),
1009  mStatus(src.mStatus),
CMetab::Status mStatus
Definition: CMetab.h:501
C_INT32 mCompartment
Definition: CMetab.h:506
C_FLOAT64 mIConc
Definition: CMetab.h:495
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202
CMetabOld::~CMetabOld ( )

Destructor.

Definition at line 1013 of file CMetab.cpp.

References DESTRUCTOR_TRACE.

#define DESTRUCTOR_TRACE
Definition: copasi.h:206

Member Function Documentation

void CMetabOld::cleanup ( )

cleanup()

Definition at line 1015 of file CMetab.cpp.

1015 {}
C_INT32 CMetabOld::getIndex ( ) const

Definition at line 1075 of file CMetab.cpp.

References mCompartment.

1075 {return mCompartment;}
C_INT32 mCompartment
Definition: CMetab.h:506
C_INT32 CMetabOld::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
Fail

Definition at line 1017 of file CMetab.cpp.

References C_INT32, CModelEntity::FIXED, CCopasiObject::getObjectName(), CReadConfig::getVariable(), mCompartment, METAB_MOIETY, mIConc, mStatus, CModelEntity::REACTIONS, CReadConfig::SEARCH, CCopasiObject::setObjectName(), and CCopasiMessage::WARNING.

1018 {
1019  C_INT32 Fail = 0;
1020  std::string tmp;
1021  Fail = configbuffer.getVariable("Metabolite", "string",
1022  (void *) & tmp,
1024 
1025  if (Fail)
1026  return Fail;
1027 
1028  setObjectName(tmp);
1029 
1030  Fail = configbuffer.getVariable("Concentration", "C_FLOAT64",
1031  (void *) & mIConc);
1032 
1033  if (Fail)
1034  return Fail;
1035 
1036  Fail = configbuffer.getVariable("Compartment", "C_INT32",
1037  (void *) & mCompartment);
1038 
1039  if (Fail)
1040  return Fail;
1041 
1042  C_INT32 Status;
1043 
1044  Fail = configbuffer.getVariable("Type", "C_INT32",
1045  (void *) & Status);
1046 
1047  if (Status == 0)
1049  else
1051 
1052  // sanity check
1053  if ((mStatus < 0) || (mStatus > 7))
1054  {
1056  "The file specifies a non-existing type "
1057  "for '%s'.\nReset to internal species.",
1058  getObjectName().c_str());
1060  }
1061 
1062  // sanity check
1063  if ((mStatus != METAB_MOIETY) && (mIConc < 0.0))
1064  {
1066  "The file specifies a negative concentration "
1067  "for '%s'.\nReset to default.",
1068  getObjectName().c_str());
1069  mIConc = 1.0;
1070  }
1071 
1072  return Fail;
1073 }
const std::string & getObjectName() const
#define C_INT32
Definition: copasi.h:90
#define METAB_MOIETY
Definition: CMetab.cpp:32
CMetab::Status mStatus
Definition: CMetab.h:501
C_INT32 mCompartment
Definition: CMetab.h:506
C_FLOAT64 mIConc
Definition: CMetab.h:495
C_INT32 getVariable(const std::string &name, const std::string &type, void *pout, CReadConfig::Mode mode=CReadConfig::NEXT)
Definition: CReadConfig.cpp:81
bool setObjectName(const std::string &name)

Friends And Related Function Documentation

friend class CMetab
friend

Definition at line 487 of file CMetab.h.

Member Data Documentation

C_INT32 CMetabOld::mCompartment
private

Index of the compartment the metabolite is located in.

Definition at line 506 of file CMetab.h.

Referenced by getIndex(), and load().

C_FLOAT64 CMetabOld::mIConc
private

Concentration of the metabolite.

Definition at line 495 of file CMetab.h.

Referenced by load(), and CMetab::operator=().

CMetab::Status CMetabOld::mStatus
private

Status of the metabolite. One of (METAB_FIXED, METAB_VARIABLE, METAB_DEPENDENT, METAB_MOIETY).

Definition at line 501 of file CMetab.h.

Referenced by load(), and CMetab::operator=().


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