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

#include <CReportDefinitionVector.h>

Inheritance diagram for CReportDefinitionVector:
Inheritance graph
Collaboration diagram for CReportDefinitionVector:
Collaboration graph

Public Member Functions

void cleanup ()
CReportDefinitioncreateReportDefinition (const std::string &name, const std::string &comment)
 CReportDefinitionVector (const std::string &name="ReportDefinitions", const CCopasiContainer *pParent=NULL)
virtual const std::string & getKey () const
bool removeReportDefinition (const std::string &key)
 ~CReportDefinitionVector ()
- Public Member Functions inherited from CCopasiVectorN< CReportDefinition >
virtual bool add (const CReportDefinition &src)
virtual bool add (CReportDefinition *src, const bool &adopt=false)
 CCopasiVectorN (const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
 CCopasiVectorN (const CCopasiVectorN< CReportDefinition > &src, const CCopasiContainer *pParent=NULL)
virtual size_t getIndex (const std::string &name) const
virtual const CObjectInterfacegetObject (const CCopasiObjectName &name) const
< CReportDefinition > & 
operator= (const std::vector< CReportDefinition * > &rhs)
value_typeoperator[] (const size_t &index)
const value_typeoperator[] (const size_t &index) const
value_typeoperator[] (const std::string &name)
const value_typeoperator[] (const std::string &name) const
virtual void remove (const std::string &name)
virtual ~CCopasiVectorN ()
- Public Member Functions inherited from CCopasiVector< T >
virtual bool add (const CType &src)
virtual bool add (CType *src, bool adopt=false)
iterator begin ()
const_iterator begin () const
 CCopasiVector (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const unsigned C_INT32 &flag=CCopasiObject::Vector)
 CCopasiVector (const CCopasiVector< CType > &src, const CCopasiContainer *pParent=NULL)
virtual void clear ()
void deepCopy (const CCopasiVector< CType > &source)
iterator end ()
const_iterator end () const
virtual size_t getIndex (const CCopasiObject *pObject) const
CCopasiVector< CType > & operator= (const CCopasiVector< CType > &rhs)
CCopasiVector< CType > & operator= (const std::vector< CType * > &rhs)
const value_typeoperator[] (const size_t &index) const
value_typeoperator[] (const size_t &index)
virtual void remove (const size_t &index)
virtual bool remove (CCopasiObject *pObject)
virtual void resize (const size_t &newSize)
virtual size_t size () const
virtual void swap (const size_t &indexFrom, const size_t &indexTo)
virtual ~CCopasiVector ()
- 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 objectMapgetObjects () const
virtual std::string getUnits () const
virtual const CCopasiObjectgetValueObject () const
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
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
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

std::string mKey

Additional Inherited Members

- Public Types inherited from CCopasiVectorN< CReportDefinition >
typedef std::vector
< CReportDefinition * >
typedef std::vector
< CReportDefinition * >
typedef std::vector
< CReportDefinition * >
- Public Types inherited from CCopasiVector< T >
typedef std::vector< CType * >
typedef std::vector< CType * >
typedef std::vector< CType * >
- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
typedef std::vector< Refresh * > DataUpdateSequence
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
typedef std::vector
< CObjectInterface * > 
- 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 * > 
- 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 36 of file CReportDefinitionVector.h.

Constructor & Destructor Documentation

CReportDefinitionVector::CReportDefinitionVector ( const std::string &  name = "ReportDefinitions",
const CCopasiContainer pParent = NULL 

Definition at line 36 of file CReportDefinitionVector.cpp.

37  :
39  mKey(CCopasiRootContainer::getKeyFactory()->add("CReportDefinitionVector", this))
40 {}
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CReportDefinitionVector::~CReportDefinitionVector ( )

Definition at line 42 of file CReportDefinitionVector.cpp.

References cleanup().

43 {
44  cleanup();
45 }

Member Function Documentation

void CReportDefinitionVector::cleanup ( )


Reimplemented from CCopasiVector< T >.

Definition at line 47 of file CReportDefinitionVector.cpp.

References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().

Referenced by ~CReportDefinitionVector().

48 {
50 }
bool remove(const std::string &key)
static CKeyFactory * getKeyFactory()
CReportDefinition * CReportDefinitionVector::createReportDefinition ( const std::string &  name,
const std::string &  comment 

Definition at line 57 of file CReportDefinitionVector.cpp.

References CCopasiVectorN< CReportDefinition >::add(), CReportDefinition::setComment(), CCopasiObject::setObjectName(), and CCopasiVector< T >::size().

Referenced by COutputAssistant::createTable(), and test000087::test_simulate_reaction_flux_reference_1().

58 {
59  size_t i;
61  for (i = 0; i < size(); i++)
62  if ((*this)[i]->getObjectName() == name)
63  return NULL; // duplicate name
65  CReportDefinition* pNewReportDef = new CReportDefinition(name, this);
66  pNewReportDef->setComment(comment);
67  pNewReportDef->setObjectName(name);
69  add(pNewReportDef);
70  return pNewReportDef;
71 }
virtual size_t size() const
virtual bool add(const CReportDefinition &src)
void setComment(const std::string &comment)
bool setObjectName(const std::string &name)
const std::string & CReportDefinitionVector::getKey ( ) const

Reimplemented from CCopasiObject.

Definition at line 52 of file CReportDefinitionVector.cpp.

References mKey.

Referenced by CQBrowserPaneDM::load().

53 {
54  return mKey;
55 }
bool CReportDefinitionVector::removeReportDefinition ( const std::string &  key)

Definition at line 73 of file CReportDefinitionVector.cpp.

References C_INVALID_INDEX, CKeyFactory::get(), CCopasiVector< T >::getIndex(), CCopasiRootContainer::getKeyFactory(), and CCopasiVector< T >::remove().

74 {
75  CReportDefinition* pRep =
77  size_t index = this->CCopasiVector<CReportDefinition>::getIndex(pRep);
79  if (index == C_INVALID_INDEX)
80  return false;
84  //pdelete(pRep); //TODO: propably a memory leak, may be not
86  return true;
87 }
CCopasiObject * get(const std::string &key)
Definition: copasi.h:222
virtual void remove(const size_t &index)
virtual size_t getIndex(const CCopasiObject *pObject) const
static CKeyFactory * getKeyFactory()

Member Data Documentation

std::string CReportDefinitionVector::mKey

Definition at line 39 of file CReportDefinitionVector.h.

Referenced by cleanup(), and getKey().

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