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

#include <CCopasiStaticString.h>

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

Public Member Functions

 CCopasiStaticString (const std::string &name="", const CCopasiContainer *pParent=NULL, const std::string &type="String", const unsigned C_INT32 &flag=CCopasiObject::StaticString)
 
 CCopasiStaticString (const CCopasiStaticString &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getStaticString () const
 
CCopasiStaticStringoperator= (const std::string &rhs)
 
virtual void print (std::ostream *ostream) const
 
 ~CCopasiStaticString ()
 
- 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
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
virtual std::string getUnits () const
 
UpdateMethodgetUpdateMethod () const
 
virtual const CCopasiObjectgetValueObject () 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
 
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 mStaticString
 

Additional Inherited Members

- 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)
 
- 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 CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Class CCopasiStaticString

This class is the class for storing Copasi Static String Names.

Copyright Liang Xu 2002

Definition at line 28 of file CCopasiStaticString.h.

Constructor & Destructor Documentation

CCopasiStaticString::CCopasiStaticString ( const std::string &  name = "",
const CCopasiContainer pParent = NULL,
const std::string &  type = "String",
const unsigned C_INT32 flag = CCopasiObject::StaticString 
)

Definition at line 19 of file CCopasiStaticString.cpp.

22  :
23  CCopasiObject(name, pParent, type, flag | CCopasiObject::StaticString),
24  mStaticString(name)
25 {}
long int flag
Definition: f2c.h:52
CCopasiStaticString::CCopasiStaticString ( const CCopasiStaticString src,
const CCopasiContainer pParent = NULL 
)

Definition at line 27 of file CCopasiStaticString.cpp.

28  :
29  CCopasiObject(src, pParent),
31 {}
CCopasiStaticString::~CCopasiStaticString ( )

Definition at line 33 of file CCopasiStaticString.cpp.

33 {}

Member Function Documentation

std::string CCopasiStaticString::getObjectDisplayName ( bool  regular = true,
bool  richtext = false 
) const
virtual

Reimplemented from CCopasiObject.

Reimplemented in CCopasiReportSeparator.

Definition at line 45 of file CCopasiStaticString.cpp.

References mStaticString.

47  {
48  if (mStaticString == "\n")
49  return "<linebreak>";
50 
51  return "'" + mStaticString + "'";
52  }
const std::string & CCopasiStaticString::getStaticString ( ) const

Definition at line 54 of file CCopasiStaticString.cpp.

References mStaticString.

Referenced by CQReportDefinition::load(), and CCopasiXML::saveReportList().

55 {return mStaticString;}
CCopasiStaticString & CCopasiStaticString::operator= ( const std::string &  rhs)

Definition at line 35 of file CCopasiStaticString.cpp.

References mStaticString, and CCopasiObject::setObjectName().

36 {
37  mStaticString = rhs;
39  return *this;
40 }
bool setObjectName(const std::string &name)
void CCopasiStaticString::print ( std::ostream *  ostream) const
virtual

This is the output method for any object. The default implementation provided with CCopasiObject uses the ostream operator<< of the object to print the object.To override this default behavior one needs to reimplement the virtual print function.

Parameters
std::ostream* ostream

Reimplemented from CCopasiObject.

Definition at line 42 of file CCopasiStaticString.cpp.

References mStaticString.

43  {(*ostream) << mStaticString;}

Member Data Documentation

std::string CCopasiStaticString::mStaticString
private

Definition at line 32 of file CCopasiStaticString.h.

Referenced by getObjectDisplayName(), getStaticString(), operator=(), and print().


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