COPASI API  4.40.278
CUndoData Class Reference

#include <CUndoData.h>

Classes

class  CChangeSet
 
struct  ChangeInfo
 

Public Types

enum class  Type { INSERT = 0 , CHANGE , REMOVE , __SIZE }
 

Public Member Functions

bool addMetaDataProperty (const std::string &property, const CDataValue &value)
 
bool addPostProcessData (const CUndoData &dependentData)
 
bool addPostProcessData (std::vector< CUndoData > &dependentData)
 
bool addPreProcessData (const CUndoData &dependentData)
 
bool addPreProcessData (std::vector< CUndoData > &dependentData)
 
bool addProperty (const CData::Property &property, const CDataValue &oldValue, const CDataValue &newValue)
 
bool addProperty (const CData::Property &property, const CDataValue &value)
 
bool appendData (const CData &data)
 
bool appendData (const CData &oldData, const CData &newData)
 
bool appendMetaData (const CData &data)
 
bool apply (const CDataModel &dataModel, CChangeSet &changes, const bool &execute) const
 
void clear ()
 
 CUndoData ()
 
 CUndoData (const CUndoData &src)
 
 CUndoData (const Type &type, const CData &data, const size_t &authorId=C_INVALID_INDEX)
 
 CUndoData (const Type &type, const CUndoObjectInterface *pObject, const size_t &authorId=C_INVALID_INDEX)
 
bool empty () const
 
const size_t & getAuthorID () const
 
const std::set< std::string > & getChangedProperties () const
 
std::tm * getLocalTime () const
 
const CDatagetMetaData () const
 
const CDataValuegetMetaDataProperty (const std::string &property) const
 
const CDatagetNewData () const
 
std::string getObjectCN (const bool &apply) const
 
std::string getObjectDisplayName () const
 
std::string getObjectType () const
 
const CDatagetOldData () const
 
std::vector< CUndoData > & getPostProcessData ()
 
const std::vector< CUndoData > & getPostProcessData () const
 
std::vector< CUndoData > & getPreProcessData ()
 
const std::vector< CUndoData > & getPreProcessData () const
 
const std::time_t & getTime () const
 
const TypegetType () const
 
std::tm * getUTCTime () const
 
bool isChangedProperty (const CData::Property &property) const
 
bool isSetMetaDataProperty (const std::string &property) const
 
bool isSetProperty (const CData::Property &property) const
 
bool operator< (const CUndoData &rhs) const
 
bool removeMetaDataProperty (const std::string &property)
 
bool removeProperty (const CData::Property &property)
 
bool undo (const CDataModel &dataModel, CChangeSet &changes, const bool &execute) const
 
 ~CUndoData ()
 

Static Public Member Functions

static CUndoObjectInterfacegetObject (const CDataModel &dataModel, const CData &data)
 

Static Public Attributes

static const CEnumAnnotation< std::string, TypeTypeName
 

Private Member Functions

bool addProperty (const std::string &name, const CDataValue &oldValue, const CDataValue &newValue)
 
bool addProperty (const std::string &name, const CDataValue &value)
 
bool change (const CDataModel &dataModel, const bool &apply, CChangeSet &changes, const bool &execute) const
 
bool executePostProcessData (const CDataModel &dataModel, const bool &apply, CChangeSet &changes, const bool &execute) const
 
bool executePreProcessData (const CDataModel &dataModel, const bool &apply, CChangeSet &changes, const bool &execute) const
 
const CDatagetData (const bool &apply) const
 
bool insert (const CDataModel &dataModel, const bool &apply, CChangeSet &changes, const bool &execute) const
 
bool isChangedProperty (const std::string &name) const
 
bool isSetProperty (const std::string &name) const
 
bool remove (const CDataModel &dataModel, const bool &apply, CChangeSet &changes, const bool &execute) const
 
bool removeProperty (const std::string &name)
 

Static Private Member Functions

static CDataContainergetParent (const CDataModel &dataModel, const CData &data)
 

Private Attributes

size_t mAuthorID
 
std::set< std::string > mChangedProperties
 
CData mMetaData
 
CData mNewData
 
CData mOldData
 
std::vector< CUndoDatamPostProcessData
 
std::vector< CUndoDatamPreProcessData
 
std::time_t mTime
 
Type mType
 

Friends

std::ostream & operator<< (std::ostream &os, const CUndoData &o)
 

Member Enumeration Documentation

◆ Type

enum CUndoData::Type
strong
Enumerator
INSERT 
CHANGE 
REMOVE 
__SIZE 

Constructor & Destructor Documentation

◆ CUndoData() [1/4]

CUndoData::CUndoData ( )

References mTime.

◆ CUndoData() [2/4]

◆ CUndoData() [3/4]

◆ CUndoData() [4/4]

CUndoData::CUndoData ( const CUndoData src)

◆ ~CUndoData()

CUndoData::~CUndoData ( )

Member Function Documentation

◆ addMetaDataProperty()

bool CUndoData::addMetaDataProperty ( const std::string &  property,
const CDataValue value 
)

References CData::addProperty(), and mMetaData.

◆ addPostProcessData() [1/2]

◆ addPostProcessData() [2/2]

bool CUndoData::addPostProcessData ( std::vector< CUndoData > &  dependentData)

References mPostProcessData.

◆ addPreProcessData() [1/2]

◆ addPreProcessData() [2/2]

bool CUndoData::addPreProcessData ( std::vector< CUndoData > &  dependentData)

References mPreProcessData.

◆ addProperty() [1/4]

bool CUndoData::addProperty ( const CData::Property property,
const CDataValue oldValue,
const CDataValue newValue 
)

◆ addProperty() [2/4]

◆ addProperty() [3/4]

bool CUndoData::addProperty ( const std::string &  name,
const CDataValue oldValue,
const CDataValue newValue 
)
private

◆ addProperty() [4/4]

bool CUndoData::addProperty ( const std::string &  name,
const CDataValue value 
)
private

◆ appendData() [1/2]

bool CUndoData::appendData ( const CData data)

◆ appendData() [2/2]

bool CUndoData::appendData ( const CData oldData,
const CData newData 
)

◆ appendMetaData()

bool CUndoData::appendMetaData ( const CData data)

References CData::appendData(), and mMetaData.

◆ apply()

bool CUndoData::apply ( const CDataModel dataModel,
CUndoData::CChangeSet changes,
const bool &  execute 
) const

◆ change()

◆ clear()

◆ empty()

◆ executePostProcessData()

bool CUndoData::executePostProcessData ( const CDataModel dataModel,
const bool &  apply,
CUndoData::CChangeSet changes,
const bool &  execute 
) const
private

References apply(), mPostProcessData, and mPreProcessData.

Referenced by change(), insert(), and remove().

◆ executePreProcessData()

bool CUndoData::executePreProcessData ( const CDataModel dataModel,
const bool &  apply,
CUndoData::CChangeSet changes,
const bool &  execute 
) const
private

References apply(), mPostProcessData, and mPreProcessData.

Referenced by change(), insert(), and remove().

◆ getAuthorID()

const size_t & CUndoData::getAuthorID ( ) const

◆ getChangedProperties()

const std::set< std::string > & CUndoData::getChangedProperties ( ) const

References mChangedProperties.

◆ getData()

const CData & CUndoData::getData ( const bool &  apply) const
private

References apply(), CHANGE, INSERT, mNewData, mOldData, mType, and REMOVE.

Referenced by change(), getObjectCN(), insert(), and remove().

◆ getLocalTime()

std::tm * CUndoData::getLocalTime ( ) const

References mTime.

◆ getMetaData()

const CData & CUndoData::getMetaData ( ) const

References mMetaData.

◆ getMetaDataProperty()

const CDataValue & CUndoData::getMetaDataProperty ( const std::string &  property) const

References CData::getProperty(), and mMetaData.

◆ getNewData()

◆ getObject()

◆ getObjectCN()

std::string CUndoData::getObjectCN ( const bool &  apply) const

◆ getObjectDisplayName()

◆ getObjectType()

std::string CUndoData::getObjectType ( ) const

◆ getOldData()

◆ getParent()

CDataContainer * CUndoData::getParent ( const CDataModel dataModel,
const CData data 
)
staticprivate

◆ getPostProcessData() [1/2]

std::vector< CUndoData > & CUndoData::getPostProcessData ( )

References mPostProcessData.

◆ getPostProcessData() [2/2]

const std::vector< CUndoData > & CUndoData::getPostProcessData ( ) const

References mPostProcessData.

Referenced by CEvent::createUndoData().

◆ getPreProcessData() [1/2]

std::vector< CUndoData > & CUndoData::getPreProcessData ( )

References mPreProcessData.

◆ getPreProcessData() [2/2]

const std::vector< CUndoData > & CUndoData::getPreProcessData ( ) const

References mPreProcessData.

Referenced by CEvent::createUndoData().

◆ getTime()

const std::time_t & CUndoData::getTime ( ) const

References mTime.

◆ getType()

const CUndoData::Type & CUndoData::getType ( ) const

References mType.

◆ getUTCTime()

std::tm * CUndoData::getUTCTime ( ) const

References mTime.

◆ insert()

◆ isChangedProperty() [1/2]

bool CUndoData::isChangedProperty ( const CData::Property property) const

◆ isChangedProperty() [2/2]

bool CUndoData::isChangedProperty ( const std::string &  name) const
private

References mChangedProperties.

◆ isSetMetaDataProperty()

bool CUndoData::isSetMetaDataProperty ( const std::string &  property) const

◆ isSetProperty() [1/2]

bool CUndoData::isSetProperty ( const CData::Property property) const

References CData::PropertyName.

◆ isSetProperty() [2/2]

bool CUndoData::isSetProperty ( const std::string &  name) const
private

◆ operator<()

◆ remove()

bool CUndoData::remove ( const CDataModel dataModel,
const bool &  apply,
CUndoData::CChangeSet changes,
const bool &  execute 
) const
private

◆ removeMetaDataProperty()

bool CUndoData::removeMetaDataProperty ( const std::string &  property)

◆ removeProperty() [1/2]

◆ removeProperty() [2/2]

bool CUndoData::removeProperty ( const std::string &  name)
private

◆ undo()

bool CUndoData::undo ( const CDataModel dataModel,
CUndoData::CChangeSet changes,
const bool &  execute 
) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CUndoData o 
)
friend

Member Data Documentation

◆ mAuthorID

size_t CUndoData::mAuthorID
private

Referenced by getAuthorID().

◆ mChangedProperties

std::set< std::string > CUndoData::mChangedProperties
private

◆ mMetaData

◆ mNewData

◆ mOldData

◆ mPostProcessData

std::vector< CUndoData > CUndoData::mPostProcessData
private

◆ mPreProcessData

std::vector< CUndoData > CUndoData::mPreProcessData
private

◆ mTime

std::time_t CUndoData::mTime
private

◆ mType

◆ TypeName

const CEnumAnnotation< std::string, CUndoData::Type > CUndoData::TypeName
static

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