COPASI API
4.40.278
|
#include <CUndoObjectInterface.h>
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 CUndoObjectInterface * | insert (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 |
CUndoObjectInterface::CUndoObjectInterface | ( | ) |
Default constructor
CUndoObjectInterface::CUndoObjectInterface | ( | const CUndoObjectInterface & | src | ) |
|
virtual |
Destructor
References mpUuid.
|
pure virtual |
Apply the provided data to the object
const | CData & data |
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().
|
pure virtual |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
CUndoData | & undoData |
const | CUndoData::Type & type |
const | CData & oldData (default: empty data) |
const | CCore::Framework & framework (default: CCore::Framework::ParticleNumbers) |
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 >.
|
pure virtual |
Destruct the object
Implemented in CDataObject, CModelParameterSet, CModelParameter, CReference, CModification, CCreator, and CBiologicalDescription.
Referenced by CUndoData::remove().
|
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
const | CData & data |
CUndoObjectInterface | * pParent |
bool CUndoObjectInterface::generateUuid | ( | ) |
If the UUID has not been locked this method generates, sets, and locks the UUID. Otherwise this method will fail
References mpUuid, and mUuidLocked.
Referenced by getUuid().
const xg::Guid & CUndoObjectInterface::getUuid | ( | ) | const |
Retrieve the UUID
References generateUuid(), mpUuid, and mUuidLocked.
Referenced by CModelParameter::toData(), and CDataObject::toData().
|
virtual |
Create and insert an undo object based on the given data. This method needs to be re-implemented in container which support INSERT and REMOVE
const | CData & data |
Reimplemented in CDataContainer, CCopasiParameterGroup, CModelParameterSet, CModelParameterGroup, 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 >.
Referenced by CModel::appendAllDependents(), CModel::appendDirectDependents(), CReaction::compileFunctionParameters(), CSBMLExporter::createFunctionDefinitions(), CCopasiParameterGroup::createUndoData(), and CLRenderFlattener::flatten().
bool CUndoObjectInterface::setUuid | ( | const std::string & | uuid | ) |
Set the UUID. This method will fail once the UUID has been set for the object.
const | std::string & uuid |
References setUuid().
bool CUndoObjectInterface::setUuid | ( | const xg::Guid & | uuid | ) |
Set the UUID. This method will fail once the UUID has been set for the object.
const | xg::Guid & uuid |
References mpUuid, and mUuidLocked.
Referenced by CDataObject::applyData(), CDataObject::fromData(), and setUuid().
|
pure virtual |
Retrieve the data describing the object
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().
|
virtual |
Update the index of a contained object This method needs to be re-implemented in container which care about the order of contained objects
const | size_t & index |
const | CUndoObjectInterface * pUndoObject |
Reimplemented in CCopasiParameterGroup, CModelParameterSet, CModelParameterGroup, 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 >.
Referenced by CDataObject::applyData(), and CModelParameterSet::updateIndex().
|
private |
Referenced by CUndoObjectInterface(), generateUuid(), getUuid(), setUuid(), and ~CUndoObjectInterface().
|
private |
Referenced by generateUuid(), getUuid(), and setUuid().