|
COPASI API
4.40.278
|
#include <CArrayElementReference.h>
Public Member Functions | |
| virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) override |
| CArrayElementReference (const std::vector< std::string > &index, const CDataContainer *pParent, const CFlags< Flag > &flag=CFlags< Flag >::None) | |
| virtual CCommonName | getCN () const override |
| virtual std::string | getObjectDisplayName () const override |
| virtual const CDataObject * | getValueObject () const override |
| virtual void * | getValuePointer () const override |
| virtual void | print (std::ostream *ostream) const override |
| virtual CData | toData () const override |
| virtual | ~CArrayElementReference () |
Public Member Functions inherited from CDataObject | |
| void | addIssue (const CIssue &issue) |
| void | addReference (const CDataContainer *pReference) |
| 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 const CDataObject * | getDataObject () const override |
| virtual const std::string & | getKey () const |
| virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
| CDataContainer * | getObjectAncestor (const std::string &type) const |
| CDataModel * | getObjectDataModel () const |
| const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
| const std::string & | getObjectName () const |
| CDataContainer * | getObjectParent () const |
| const std::string & | getObjectType () const |
| virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
| virtual const std::string | getUnits () const |
| virtual const CValidity & | getValidity () 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) |
| 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 CUndoObjectInterface * | insert (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 () |
Static Public Member Functions | |
| static CArrayElementReference * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
| static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
| static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
| static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
| static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
| template<class CType > | |
| static CType * | fromData (const CData &, CUndoObjectInterface *) |
Private Member Functions | |
| CArrayElementReference () | |
| CArrayElementReference (const CArrayElementReference &src) | |
| void | updateObjectName () |
Private Attributes | |
| bool | mIgnoreUpdateObjectName |
| std::vector< CRegisteredCommonName > | mIndex |
Additional Inherited Members | |
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 |
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 |
Class CArrayElementReference
This class is used to make an element of an array accessible as a CDataObject. 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.
|
private |
make the default constructor unaccessible
Referenced by fromData().
|
private |
make the copy constructor unaccessible
| CArrayElementReference::CArrayElementReference | ( | const std::vector< std::string > & | index, |
| const CDataContainer * | pParent, | ||
| const CFlags< Flag > & | flag = CFlags< Flag >::None |
||
| ) |
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.
References updateObjectName().
|
inlinevirtual |
|
overridevirtual |
Apply the provided data to the object
| const | CData & data |
Reimplemented from CDataObject.
References CDataObject::applyData(), CData::ARRAY_ELEMENT_INDEX, CData::getProperty(), CData::isSetProperty(), mIndex, and CDataValue::toDataValues().
|
static |
Static method to create a CDataObject based on the provided data
| const | CData & data |
References CData::ARRAY_ELEMENT_INDEX, CArrayElementReference(), CData::getProperty(), CData::isSetProperty(), NO_PARENT, CData::OBJECT_FLAG, CDataValue::toDataValues(), and CDataValue::toString().
|
overridevirtual |
Retrieve the CN of the object
Reimplemented from CDataObject.
References CDataObject::getCN(), CDataObject::getObjectName(), CDataObject::getObjectParent(), and updateObjectName().
|
overridevirtual |
generate a display name.
Reimplemented from CDataObject.
References CDataObject::getObjectAncestor(), CDataObject::getObjectDisplayName(), CDataObject::getObjectName(), CDataObject::getObjectParent(), CDataObject::getObjectType(), and updateObjectName().
|
inlineoverridevirtual |
Reimplemented from CDataObject.
|
overridevirtual |
returns a pointer to the numerical values of the array element this will be a *C_FLOAT64 for this class.
Reimplemented from CDataObject.
References CDataObject::getObjectParent(), and mIndex.
Referenced by print().
|
overridevirtual |
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.
| std::ostream | * ostream |
Reimplemented from CDataObject.
References getValuePointer().
|
overridevirtual |
Retrieve the data describing the object
Reimplemented from CDataObject.
References CData::addProperty(), CData::ARRAY_ELEMENT_INDEX, mIndex, and CDataObject::toData().
|
private |
|
private |
Referenced by updateObjectName().
|
private |
this contains the index in string format, e.g. "[2][7]"
Referenced by applyData(), getValuePointer(), toData(), and updateObjectName().