COPASI API  4.40.278
CDataObjectReference< CType > Class Template Reference

#include <CDataObjectReference.h>

Inheritance diagram for CDataObjectReference< CType >:
[legend]

Public Types

typedef CType referenceType
 
- Public Types inherited from CDataObject
typedef std::set< const CDataObject * > DataObjectSet
 
enum  Flag {
  Container , Vector , Matrix , NameVector ,
  Reference , ValueBool , ValueInt , ValueInt64 ,
  ValueDbl , NonUniqueName , StaticString , ValueString ,
  Separator , DisplayName , ModelEntity , Array ,
  DataModel , Root , Gui , __SIZE
}
 
- Public Types inherited from CObjectInterface
typedef std::vector< const CDataContainer * > ContainerList
 
typedef std::set< const CObjectInterface * > ObjectSet
 

Public Member Functions

 CDataObjectReference (const CDataObjectReference< referenceType > &src, const CDataContainer *pParent)
 
 CDataObjectReference (const std::string &name, const CDataContainer *pParent, referenceType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None)
 
virtual std::string getObjectDisplayName () const override
 
virtual const CDataObjectgetValueObject () const override
 
virtual void * getValuePointer () const override
 
virtual void print (std::ostream *ostream) const override
 
void setReference (referenceType &reference)
 
virtual ~CDataObjectReference ()
 
- Public Member Functions inherited from CDataObject
void addIssue (const CIssue &issue)
 
void addReference (const CDataContainer *pReference)
 
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes) override
 
virtual void calculateValue () override
 
 CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL)
 
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override
 
virtual void destruct () override
 
virtual CCommonName getCN () const override
 
virtual const CDataObjectgetDataObject () const override
 
virtual const std::string & getKey () const
 
virtual const CObjectInterfacegetObject (const CCommonName &cn) const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const std::string getUnits () const
 
virtual const CValiditygetValidity () const override
 
bool hasFlag (const Flag &flag) const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override
 
bool prerequisitsContains (const DataObjectSet &objects) const
 
void removeIssue (const CIssue &issue)
 
void removeReference (const CDataContainer *pReference)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CDataContainer *pParent)
 
virtual CData toData () const override
 
void validityChanged (const CValidity &changedValidity) override
 
void validityRemoved (const CValidity &changedValidity)
 
virtual ~CDataObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
 CObjectInterface (const CObjectInterface &src)
 
virtual ~CObjectInterface ()
 
- Public Member Functions inherited from CUndoObjectInterface
 CUndoObjectInterface ()
 
 CUndoObjectInterface (const CUndoObjectInterface &src)
 
bool generateUuid ()
 
const xg::Guid & getUuid () const
 
virtual CUndoObjectInterfaceinsert (const CData &data)
 
bool setUuid (const std::string &uuid)
 
bool setUuid (const xg::Guid &uuid)
 
virtual void updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject)
 
virtual ~CUndoObjectInterface ()
 

Private Member Functions

 CDataObjectReference ()
 
 CDataObjectReference (const std::string &name, const CDataContainer *pParent, bool &reference, const CFlags< Flag > &flag)
 
 CDataObjectReference (const std::string &name, const CDataContainer *pParent, C_INT32 &reference, const CFlags< Flag > &flag)
 
 CDataObjectReference (const std::string &name, const CDataContainer *pParent, CRegisteredCommonName &reference, const CFlags< Flag > &flag)
 
 CDataObjectReference (const std::string &name, const CDataContainer *pParent, unsigned C_INT32 &reference, const CFlags< Flag > &flag)
 

Private Attributes

CType * mpReference
 

Additional Inherited Members

- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
 
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 
- Protected Member Functions inherited from CDataObject
 CDataObject ()
 
 CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None)
 
- Protected Attributes inherited from CDataObject
ObjectSet mPrerequisits
 
std::set< CDataContainer * > mReferences
 
- Protected Attributes inherited from CObjectInterface
CValidity mValidity
 

Detailed Description

template<class CType>
class CDataObjectReference< CType >

Class CDataContainer

This class is the is used to group CDataObjects logically. It inself is an object. Contained objects are still globally accessible.

Copyright Stefan Hoops 2002

Class CDataObjectReference

This class is the is used to make an existing object globally accessible.

Copyright Stefan Hoops 2002

Member Typedef Documentation

◆ referenceType

template<class CType >
typedef CType CDataObjectReference< CType >::referenceType

Constructor & Destructor Documentation

◆ CDataObjectReference() [1/7]

template<class CType >
CDataObjectReference< CType >::CDataObjectReference ( )
inlineprivate

◆ CDataObjectReference() [2/7]

template<class CType >
CDataObjectReference< CType >::CDataObjectReference ( const std::string &  name,
const CDataContainer pParent,
referenceType reference,
const CFlags< Flag > &  flag = CFlagsFlag >::None 
)

◆ CDataObjectReference() [3/7]

template<class CType >
CDataObjectReference< CType >::CDataObjectReference ( const CDataObjectReference< referenceType > &  src,
const CDataContainer pParent 
)
inline

◆ ~CDataObjectReference()

template<class CType >
virtual CDataObjectReference< CType >::~CDataObjectReference ( )
inlinevirtual

◆ CDataObjectReference() [4/7]

CDataObjectReference< C_INT32 >::CDataObjectReference ( const std::string &  name,
const CDataContainer pParent,
C_INT32 reference,
const CFlags< Flag > &  flag 
)
inlineprivate

◆ CDataObjectReference() [5/7]

CDataObjectReference< unsigned C_INT32 >::CDataObjectReference ( const std::string &  name,
const CDataContainer pParent,
unsigned C_INT32 reference,
const CFlags< Flag > &  flag 
)
inlineprivate

◆ CDataObjectReference() [6/7]

CDataObjectReference< bool >::CDataObjectReference ( const std::string &  name,
const CDataContainer pParent,
bool &  reference,
const CFlags< Flag > &  flag 
)
inlineprivate

◆ CDataObjectReference() [7/7]

CDataObjectReference< CRegisteredCommonName >::CDataObjectReference ( const std::string &  name,
const CDataContainer pParent,
CRegisteredCommonName reference,
const CFlags< Flag > &  flag 
)
inlineprivate

Member Function Documentation

◆ getObjectDisplayName()

template<class CType >
virtual std::string CDataObjectReference< CType >::getObjectDisplayName ( ) const
inlineoverridevirtual

Retrieve the display name of the object

Parameters
boolregular (default: true)
boolrichtext (default: false)
Returns
std::string objectDisplayName

Reimplemented from CDataObject.

References CDataObject::getObjectDisplayName(), CDataObject::getObjectName(), CDataObject::getObjectParent(), CDataObject::getObjectType(), and CDataObjectReference< CType >::mpReference.

◆ getValueObject()

template<class CType >
virtual const CDataObject* CDataObjectReference< CType >::getValueObject ( ) const
inlineoverridevirtual

Reimplemented from CDataObject.

◆ getValuePointer()

template<class CType >
virtual void* CDataObjectReference< CType >::getValuePointer ( ) const
inlineoverridevirtual

Retrieve a pointer to the value of the object

Reimplemented from CDataObject.

References CDataObjectReference< CType >::mpReference.

Referenced by CDataModel::changeModelParameter().

◆ print()

template<class CType >
virtual void CDataObjectReference< CType >::print ( std::ostream *  ostream) const
inlineoverridevirtual

This is the output method for any object. The default implementation provided with CDataObject 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 CDataObject.

References CDataObjectReference< CType >::mpReference.

◆ setReference()

template<class CType >
void CDataObjectReference< CType >::setReference ( referenceType reference)
inline

Member Data Documentation

◆ mpReference


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