COPASI API  4.40.278
CUndoObjectInterface Class Referenceabstract

#include <CUndoObjectInterface.h>

Inheritance diagram for CUndoObjectInterface:
[legend]

Public Member Functions

virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)=0
 
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const =0
 
 CUndoObjectInterface ()
 
 CUndoObjectInterface (const CUndoObjectInterface &src)
 
virtual void destruct ()=0
 
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 CData toData () const =0
 
virtual void updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject)
 
virtual ~CUndoObjectInterface ()
 

Static Public Member Functions

template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 

Private Attributes

xg::Guid * mpUuid
 
bool mUuidLocked
 

Constructor & Destructor Documentation

◆ CUndoObjectInterface() [1/2]

CUndoObjectInterface::CUndoObjectInterface ( )

Default constructor

◆ CUndoObjectInterface() [2/2]

CUndoObjectInterface::CUndoObjectInterface ( const CUndoObjectInterface src)

Copy constructor

Parameters
constCUndoObjectInterface & src

References mpUuid.

◆ ~CUndoObjectInterface()

CUndoObjectInterface::~CUndoObjectInterface ( )
virtual

Destructor

References mpUuid.

Member Function Documentation

◆ applyData()

virtual bool CUndoObjectInterface::applyData ( const CData data,
CUndoData::CChangeSet changes 
)
pure virtual

Apply the provided data to the object

Parameters
constCData & data
Returns
bool success

Implemented in CCopasiParameter, CModelEntity, CMetab, CDataObject, CDataContainer, CArrayElementReference, CUnitDefinition, CSlider, CCopasiTask, CCopasiParameterGroup, CReportDefinition, CPlotSpecification, CPlotItem, CFittingPoint, CReaction, CMoiety, CModelValue, CModelParameterSet, CModelParameterGroup, CModelParameter, CModel, CMetabOld, CEvent, CEventAssignment, CCompartment, CReference, CModification, CMIRIAMInfo, CCreator, CBiologicalDescription, CLReactionGlyph, CLGeneralGlyph, CLMetabReferenceGlyph, CLReferenceGlyph, CLLocalStyle, CLLocalRenderInformation, CLLineEnding, CLGraphicalObject, CLGradientStop, CLGradientBase, CLTextGlyph, CLCompartmentGlyph, CLMetabGlyph, CLGlobalStyle, CLGlobalRenderInformation, CLColorDefinition, CLayout, CFunctionParameter, CFunction, CEvaluationTree, CDataVectorN< CType >, CDataVectorN< CEventAssignment >, CDataVectorN< CCopasiTask >, CDataVectorN< CLayout >, CDataVectorN< CUnitDefinition >, CDataVectorN< CPlotSpecification >, CDataVectorN< CModelParameterSet >, CDataVectorN< CEvent >, CDataVectorN< CFunction >, CDataVectorN< CModelValue >, CDataVectorN< CReportDefinition >, CDataVector< CType >, CDataVector< CLGlobalRenderInformation >, CDataVector< CModification >, CDataVector< CLMetabGlyph >, CDataVector< CLCompartmentGlyph >, CDataVector< CSlider >, CDataVector< CLReferenceGlyph >, CDataVector< CBiologicalDescription >, CDataVector< CLGlobalStyle >, CDataVector< CReference >, CDataVector< CLGradientStop >, CDataVector< CMoiety >, CDataVector< CLMetabReferenceGlyph >, CDataVector< CDataModel >, CDataVector< CChemEqElement >, CDataVector< CEvent >, CDataVector< CLReactionGlyph >, CDataVector< CLColorDefinition >, CDataVector< CMetab >, CDataVector< CLLocalRenderInformation >, CDataVector< CLGradientBase >, CDataVector< CPlotItem >, CDataVector< CDataObject >, CDataVector< CLTextGlyph >, CDataVector< CLLineEnding >, CDataVector< CFittingPoint >, CDataVector< CLLocalStyle >, CDataVector< CCreator >, CDataVector< CLGeneralGlyph >, CDataVector< CLGraphicalObject >, and CDataModel.

Referenced by CUndoData::change(), and CUndoData::insert().

◆ createUndoData()

virtual void CUndoObjectInterface::createUndoData ( CUndoData undoData,
const CUndoData::Type type,
const CData oldData = CData(),
const CCore::Framework framework = CCore::Framework::ParticleNumbers 
) const
pure virtual

Create the undo data which represents the changes recording the differences between the provided oldData and the current data.

Parameters
CUndoData& undoData
constCUndoData::Type & type
constCData & oldData (default: empty data)
constCCore::Framework & framework (default: CCore::Framework::ParticleNumbers)
Returns
CUndoData undoData

Implemented in CCopasiParameter, CModelEntity, CMetab, CDataObject, CDataContainer, CUnitDefinition, CCopasiTask, CCopasiParameterGroup, CReportDefinition, CReaction, CModelValue, CModelParameterSet, CModelParameterGroup, CModelParameterSpecies, CModelParameter, CModel, CEvent, CEventAssignment, CCompartment, CReference, CModification, CMIRIAMInfo, CCreator, CBiologicalDescription, CFunction, CDataVectorN< CType >, CDataVectorN< CEventAssignment >, CDataVectorN< CCopasiTask >, CDataVectorN< CLayout >, CDataVectorN< CUnitDefinition >, CDataVectorN< CPlotSpecification >, CDataVectorN< CModelParameterSet >, CDataVectorN< CEvent >, CDataVectorN< CFunction >, CDataVectorN< CModelValue >, CDataVectorN< CReportDefinition >, CDataVector< CType >, CDataVector< CLGlobalRenderInformation >, CDataVector< CModification >, CDataVector< CLMetabGlyph >, CDataVector< CLCompartmentGlyph >, CDataVector< CSlider >, CDataVector< CLReferenceGlyph >, CDataVector< CBiologicalDescription >, CDataVector< CLGlobalStyle >, CDataVector< CReference >, CDataVector< CLGradientStop >, CDataVector< CMoiety >, CDataVector< CLMetabReferenceGlyph >, CDataVector< CDataModel >, CDataVector< CChemEqElement >, CDataVector< CEvent >, CDataVector< CLReactionGlyph >, CDataVector< CLColorDefinition >, CDataVector< CMetab >, CDataVector< CLLocalRenderInformation >, CDataVector< CLGradientBase >, CDataVector< CPlotItem >, CDataVector< CDataObject >, CDataVector< CLTextGlyph >, CDataVector< CLLineEnding >, CDataVector< CFittingPoint >, CDataVector< CLLocalStyle >, CDataVector< CCreator >, CDataVector< CLGeneralGlyph >, and CDataVector< CLGraphicalObject >.

◆ destruct()

virtual void CUndoObjectInterface::destruct ( )
pure virtual

◆ fromData()

template<class CType >
static CType* CUndoObjectInterface::fromData ( const CData ,
CUndoObjectInterface  
)
inlinestatic

Static template method to create an undo object based on the provided data An undo object which support INSERT and REMOVE must specialize this method

Parameters
constCData & data
CUndoObjectInterface* pParent
Returns
CUndoObjectInterface * pUndoObject

◆ generateUuid()

bool CUndoObjectInterface::generateUuid ( )

If the UUID has not been locked this method generates, sets, and locks the UUID. Otherwise this method will fail

Returns
bool success

References mpUuid, and mUuidLocked.

Referenced by getUuid().

◆ getUuid()

const xg::Guid & CUndoObjectInterface::getUuid ( ) const

Retrieve the UUID

Returns
const xg::Guid & uuid

References generateUuid(), mpUuid, and mUuidLocked.

Referenced by CModelParameter::toData(), and CDataObject::toData().

◆ insert()

CUndoObjectInterface * CUndoObjectInterface::insert ( const CData data)
virtual

◆ setUuid() [1/2]

bool CUndoObjectInterface::setUuid ( const std::string &  uuid)

Set the UUID. This method will fail once the UUID has been set for the object.

Parameters
conststd::string & uuid
Returns
bool success

References setUuid().

◆ setUuid() [2/2]

bool CUndoObjectInterface::setUuid ( const xg::Guid &  uuid)

Set the UUID. This method will fail once the UUID has been set for the object.

Parameters
constxg::Guid & uuid
Returns
bool success

References mpUuid, and mUuidLocked.

Referenced by CDataObject::applyData(), CDataObject::fromData(), and setUuid().

◆ toData()

virtual CData CUndoObjectInterface::toData ( ) const
pure virtual

Retrieve the data describing the object

Returns
CData data

Implemented in CCopasiParameter, CModelEntity, CMetab, CDataObject, CDataContainer, CArrayElementReference, CUnitDefinition, CSlider, CCopasiTask, CCopasiParameterGroup, CReportDefinition, CPlotSpecification, CPlotItem, CFittingPoint, CReaction, CMoiety, CModelValue, CModelParameterSet, CModelParameterGroup, CModelParameterSpecies, CModelParameter, CModel, CMetabOld, CEvent, CEventAssignment, CCompartment, CReference, CModification, CMIRIAMInfo, CCreator, CBiologicalDescription, CLReactionGlyph, CLGeneralGlyph, CLMetabReferenceGlyph, CLReferenceGlyph, CLLocalStyle, CLLocalRenderInformation, CLLineEnding, CLGraphicalObject, CLGradientStop, CLGradientBase, CLTextGlyph, CLCompartmentGlyph, CLMetabGlyph, CLGlobalStyle, CLGlobalRenderInformation, CLColorDefinition, CLayout, CFunctionParameter, CFunction, CEvaluationTree, CDataVectorN< CType >, CDataVectorN< CEventAssignment >, CDataVectorN< CCopasiTask >, CDataVectorN< CLayout >, CDataVectorN< CUnitDefinition >, CDataVectorN< CPlotSpecification >, CDataVectorN< CModelParameterSet >, CDataVectorN< CEvent >, CDataVectorN< CFunction >, CDataVectorN< CModelValue >, CDataVectorN< CReportDefinition >, CDataVector< CType >, CDataVector< CLGlobalRenderInformation >, CDataVector< CModification >, CDataVector< CLMetabGlyph >, CDataVector< CLCompartmentGlyph >, CDataVector< CSlider >, CDataVector< CLReferenceGlyph >, CDataVector< CBiologicalDescription >, CDataVector< CLGlobalStyle >, CDataVector< CReference >, CDataVector< CLGradientStop >, CDataVector< CMoiety >, CDataVector< CLMetabReferenceGlyph >, CDataVector< CDataModel >, CDataVector< CChemEqElement >, CDataVector< CEvent >, CDataVector< CLReactionGlyph >, CDataVector< CLColorDefinition >, CDataVector< CMetab >, CDataVector< CLLocalRenderInformation >, CDataVector< CLGradientBase >, CDataVector< CPlotItem >, CDataVector< CDataObject >, CDataVector< CLTextGlyph >, CDataVector< CLLineEnding >, CDataVector< CFittingPoint >, CDataVector< CLLocalStyle >, CDataVector< CCreator >, CDataVector< CLGeneralGlyph >, CDataVector< CLGraphicalObject >, and CDataModel.

Referenced by CUndoData::CUndoData().

◆ updateIndex()

Member Data Documentation

◆ mpUuid

xg::Guid* CUndoObjectInterface::mpUuid
private

◆ mUuidLocked

bool CUndoObjectInterface::mUuidLocked
private

Referenced by generateUuid(), getUuid(), and setUuid().


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