COPASI API
4.16.103
|
#include <CArrayElementReference.h>
Public Member Functions | |
CArrayElementReference (const std::string &index, const CCopasiContainer *pParent) | |
virtual CCopasiObjectName | getCN () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
virtual const CCopasiObject * | getValueObject () const |
virtual void * | getValuePointer () const |
virtual void | print (std::ostream *ostream) const |
virtual | ~CArrayElementReference () |
![]() | |
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 const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
virtual const std::string & | getKey () const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
virtual std::string | getUnits () const |
UpdateMethod * | getUpdateMethod () 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 () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Private Member Functions | |
CArrayElementReference () | |
CArrayElementReference (const CArrayElementReference &src) | |
void | updateMethod (const CCopasiAbstractArray::data_type &value) |
Private Attributes | |
CCopasiObjectName | mIndex |
Additional Inherited Members | |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
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 } |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Class CArrayElementReference
This class is used to make an element of an array accessible as a CCopasiObject. Usually an object from this class will be a child of a CArrayAnnotation and will reference a single element of the array that the CArrayAnnotation points to.
Definition at line 29 of file CArrayElementReference.h.
|
private |
make the default constructor unaccessible
|
private |
make the copy constructor unaccessible
CArrayElementReference::CArrayElementReference | ( | const std::string & | index, |
const CCopasiContainer * | pParent | ||
) |
create an element reference with a given index. The index is passed as a string, e.g. "[3][2]" The object name will be the index string, the type is "ElementReference" pParent may not be NULL.
Definition at line 18 of file CArrayElementReference.cpp.
|
inlinevirtual |
Definition at line 66 of file CArrayElementReference.h.
|
virtual |
Retrieve the CN of the object
Reimplemented from CCopasiObject.
Definition at line 89 of file CArrayElementReference.cpp.
References CCopasiObject::getCN(), CCopasiObject::getObjectParent(), and mIndex.
|
virtual |
generate a display name.
Reimplemented from CCopasiObject.
Definition at line 69 of file CArrayElementReference.cpp.
References CCopasiObject::getObjectAncestor(), CCopasiObject::getObjectDisplayName(), CCopasiObject::getObjectName(), CCopasiObject::getObjectParent(), CCopasiObject::getObjectType(), and mIndex.
|
inlinevirtual |
Reimplemented from CCopasiObject.
Definition at line 74 of file CArrayElementReference.h.
|
virtual |
returns a pointer to the numerical values of the array element this will be a *C_FLOAT64 for this class.
Reimplemented from CCopasiObject.
Definition at line 35 of file CArrayElementReference.cpp.
References CArrayAnnotation::array(), C_INT32, CArrayAnnotation::dimensionality(), CCopasiObjectName::getElementIndex(), CCopasiObjectName::getElementName(), CCopasiObject::getObjectParent(), mIndex, and CArrayAnnotation::size().
Referenced by print().
|
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.
std::ostream | * ostream |
Reimplemented from CCopasiObject.
Definition at line 97 of file CArrayElementReference.cpp.
References getValuePointer().
|
private |
this method does nothing at the moment!
Definition at line 29 of file CArrayElementReference.cpp.
|
private |
this contains the index in string format, e.g. "[2][7]"
Definition at line 38 of file CArrayElementReference.h.
Referenced by getCN(), getObjectDisplayName(), and getValuePointer().