COPASI API
4.40.278
|
#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 CData & | getMetaData () const |
const CDataValue & | getMetaDataProperty (const std::string &property) const |
const CData & | getNewData () const |
std::string | getObjectCN (const bool &apply) const |
std::string | getObjectDisplayName () const |
std::string | getObjectType () const |
const CData & | getOldData () 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 Type & | getType () 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 CUndoObjectInterface * | getObject (const CDataModel &dataModel, const CData &data) |
Static Public Attributes | |
static const CEnumAnnotation< std::string, Type > | TypeName |
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 CData & | getData (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 CDataContainer * | getParent (const CDataModel &dataModel, const CData &data) |
Private Attributes | |
size_t | mAuthorID |
std::set< std::string > | mChangedProperties |
CData | mMetaData |
CData | mNewData |
CData | mOldData |
std::vector< CUndoData > | mPostProcessData |
std::vector< CUndoData > | mPreProcessData |
std::time_t | mTime |
Type | mType |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CUndoData &o) |
|
strong |
CUndoData::CUndoData | ( | ) |
References mTime.
CUndoData::CUndoData | ( | const Type & | type, |
const CUndoObjectInterface * | pObject, | ||
const size_t & | authorId = C_INVALID_INDEX |
||
) |
CUndoData::CUndoData | ( | const Type & | type, |
const CData & | data, | ||
const size_t & | authorId = C_INVALID_INDEX |
||
) |
CUndoData::CUndoData | ( | const CUndoData & | src | ) |
CUndoData::~CUndoData | ( | ) |
bool CUndoData::addMetaDataProperty | ( | const std::string & | property, |
const CDataValue & | value | ||
) |
References CData::addProperty(), and mMetaData.
bool CUndoData::addPostProcessData | ( | const CUndoData & | dependentData | ) |
References mPostProcessData.
Referenced by CDataVector< CType >::createUndoData(), CDataVectorN< CType >::createUndoData(), CEvent::createUndoData(), CModelParameterGroup::createUndoData(), CCopasiParameterGroup::createUndoData(), CCopasiTask::createUndoData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), and CModelExpansion::duplicateReaction().
bool CUndoData::addPostProcessData | ( | std::vector< CUndoData > & | dependentData | ) |
References mPostProcessData.
bool CUndoData::addPreProcessData | ( | const CUndoData & | dependentData | ) |
References mPreProcessData.
Referenced by CDataContainer::appendDeletedDependentData(), CReactionInterface::createUndoData(), CDataVector< CType >::createUndoData(), CDataVectorN< CType >::createUndoData(), CEvent::createUndoData(), CModelParameterGroup::createUndoData(), CCopasiParameterGroup::createUndoData(), and CCopasiTask::createUndoData().
bool CUndoData::addPreProcessData | ( | std::vector< CUndoData > & | dependentData | ) |
References mPreProcessData.
bool CUndoData::addProperty | ( | const CData::Property & | property, |
const CDataValue & | oldValue, | ||
const CDataValue & | newValue | ||
) |
References addProperty(), and CData::PropertyName.
bool CUndoData::addProperty | ( | const CData::Property & | property, |
const CDataValue & | value | ||
) |
References CData::PropertyName.
Referenced by addProperty(), appendData(), CReactionInterface::createUndoData(), CDataVectorN< CType >::createUndoData(), CBiologicalDescription::createUndoData(), CCreator::createUndoData(), CMIRIAMInfo::createUndoData(), CModification::createUndoData(), CReference::createUndoData(), CAnnotation::createUndoData(), CCompartment::createUndoData(), CEventAssignment::createUndoData(), CEvent::createUndoData(), CModel::createUndoData(), CModelParameter::createUndoData(), CModelParameterSpecies::createUndoData(), CModelParameterGroup::createUndoData(), CModelValue::createUndoData(), CReaction::createUndoData(), CReportDefinition::createUndoData(), CCopasiParameterGroup::createUndoData(), CCopasiTask::createUndoData(), CUnitDefinition::createUndoData(), CDataObject::createUndoData(), CMetab::createUndoData(), CModelEntity::createUndoData(), and CCopasiParameter::createUndoData().
|
private |
References CData::addProperty(), CHANGE, INSERT, mChangedProperties, mNewData, mOldData, mType, REMOVE, and CData::removeProperty().
|
private |
References CData::addProperty(), CHANGE, INSERT, mChangedProperties, mNewData, mOldData, mType, and REMOVE.
bool CUndoData::appendData | ( | const CData & | data | ) |
References addProperty(), CData::begin(), CHANGE, CData::end(), and mType.
Referenced by CDataVector< CType >::createUndoData().
References addProperty(), CData::begin(), CHANGE, CData::end(), and mType.
bool CUndoData::appendMetaData | ( | const CData & | data | ) |
References CData::appendData(), and mMetaData.
bool CUndoData::apply | ( | const CDataModel & | dataModel, |
CUndoData::CChangeSet & | changes, | ||
const bool & | execute | ||
) | const |
References CHANGE, change(), INSERT, insert(), mType, REMOVE, and remove().
Referenced by change(), executePostProcessData(), executePreProcessData(), getData(), getObjectCN(), insert(), and remove().
|
private |
References CDataContainer::add(), CUndoData::CChangeSet::add(), apply(), CUndoObjectInterface::applyData(), CHANGE, executePostProcessData(), executePreProcessData(), CCommonName::fromData(), getData(), getObject(), CDataObject::getObjectParent(), getParent(), CData::getProperty(), CData::OBJECT_PARENT_CN, CData::OBJECT_TYPE, CDataContainer::remove(), and CDataValue::toString().
void CUndoData::clear | ( | ) |
References CData::clear(), mChangedProperties, mNewData, mOldData, mPostProcessData, mPreProcessData, and mTime.
Referenced by CCopasiTask::createUndoData().
bool CUndoData::empty | ( | ) | const |
References mChangedProperties, mPostProcessData, and mPreProcessData.
Referenced by CDataModel::applyData(), CDataVector< CType >::createUndoData(), CDataVectorN< CType >::createUndoData(), CBiologicalDescription::createUndoData(), CCreator::createUndoData(), CModification::createUndoData(), CReference::createUndoData(), CModelParameterGroup::createUndoData(), CCopasiParameterGroup::createUndoData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), and CDataModel::recordData().
|
private |
References apply(), mPostProcessData, and mPreProcessData.
|
private |
References apply(), mPostProcessData, and mPreProcessData.
const size_t & CUndoData::getAuthorID | ( | ) | const |
References mAuthorID.
Referenced by CDataContainer::appendDeletedDependentData().
const std::set< std::string > & CUndoData::getChangedProperties | ( | ) | const |
References mChangedProperties.
|
private |
std::tm * CUndoData::getLocalTime | ( | ) | const |
References mTime.
const CDataValue & CUndoData::getMetaDataProperty | ( | const std::string & | property | ) | const |
References CData::getProperty(), and mMetaData.
const CData & CUndoData::getNewData | ( | ) | const |
|
static |
References CDataObjectMap::equal_range(), CCommonName::escape(), CModelParameterSet::getModelParameter(), CDataContainer::getObject(), CDataContainer::getObjects(), CCopasiParameterGroup::getParameter(), getParent(), CData::getProperty(), CData::isSetProperty(), CData::OBJECT_HASH, CData::OBJECT_INDEX, CData::OBJECT_NAME, CData::OBJECT_TYPE, CCopasiParameterGroup::size(), CDataValue::toSizeT(), and CDataValue::toString().
Referenced by change(), remove(), CModelExpansion::replaceInExpression(), and CModelExpansion::updateExpression().
std::string CUndoData::getObjectCN | ( | const bool & | apply | ) | const |
References apply(), CCommonName::fromData(), and getData().
std::string CUndoData::getObjectDisplayName | ( | ) | const |
std::string CUndoData::getObjectType | ( | ) | const |
References CHANGE, CData::getProperty(), INSERT, mNewData, mOldData, mType, CData::OBJECT_TYPE, REMOVE, and CDataValue::toString().
Referenced by getObjectDisplayName().
const CData & CUndoData::getOldData | ( | ) | const |
|
staticprivate |
References CData::empty(), CDataContainer::getObject(), CData::getProperty(), CRootContainer::getRoot(), CData::OBJECT_PARENT_CN, and CDataValue::toString().
Referenced by change(), getObject(), and insert().
std::vector< CUndoData > & CUndoData::getPostProcessData | ( | ) |
References mPostProcessData.
const std::vector< CUndoData > & CUndoData::getPostProcessData | ( | ) | const |
References mPostProcessData.
Referenced by CEvent::createUndoData().
std::vector< CUndoData > & CUndoData::getPreProcessData | ( | ) |
References mPreProcessData.
const std::vector< CUndoData > & CUndoData::getPreProcessData | ( | ) | const |
References mPreProcessData.
Referenced by CEvent::createUndoData().
const std::time_t & CUndoData::getTime | ( | ) | const |
References mTime.
const CUndoData::Type & CUndoData::getType | ( | ) | const |
References mType.
std::tm * CUndoData::getUTCTime | ( | ) | const |
References mTime.
|
private |
bool CUndoData::isChangedProperty | ( | const CData::Property & | property | ) | const |
References CData::PropertyName.
Referenced by CEvent::createUndoData(), CCopasiTask::createUndoData(), and CMetab::createUndoData().
|
private |
References mChangedProperties.
bool CUndoData::isSetMetaDataProperty | ( | const std::string & | property | ) | const |
References CData::isSetProperty(), and mMetaData.
bool CUndoData::isSetProperty | ( | const CData::Property & | property | ) | const |
References CData::PropertyName.
|
private |
bool CUndoData::operator< | ( | const CUndoData & | rhs | ) | const |
References CHANGE, CData::getProperty(), INSERT, mNewData, mOldData, mType, CData::OBJECT_INDEX, CData::OBJECT_PARENT_CN, REMOVE, CDataValue::toSizeT(), and CDataValue::toString().
|
private |
References CUndoData::CChangeSet::add(), apply(), CUndoObjectInterface::destruct(), executePostProcessData(), executePreProcessData(), CCommonName::fromData(), getData(), getObject(), CData::getProperty(), CData::OBJECT_TYPE, and REMOVE.
Referenced by CUndoData::CChangeSet::add(), apply(), and undo().
bool CUndoData::removeMetaDataProperty | ( | const std::string & | property | ) |
References mMetaData, and CData::removeProperty().
bool CUndoData::removeProperty | ( | const CData::Property & | property | ) |
References CData::PropertyName.
Referenced by CBiologicalDescription::createUndoData(), CCreator::createUndoData(), CModification::createUndoData(), and CReference::createUndoData().
|
private |
References mChangedProperties, mNewData, mOldData, and CData::removeProperty().
bool CUndoData::undo | ( | const CDataModel & | dataModel, |
CUndoData::CChangeSet & | changes, | ||
const bool & | execute | ||
) | const |
|
friend |
|
private |
Referenced by getAuthorID().
|
private |
Referenced by addProperty(), clear(), CUndoData(), empty(), getChangedProperties(), isChangedProperty(), and removeProperty().
|
private |
|
private |
Referenced by addProperty(), clear(), CUndoData(), getData(), getNewData(), getObjectDisplayName(), getObjectType(), isSetProperty(), operator<(), and removeProperty().
|
private |
Referenced by addProperty(), clear(), CUndoData(), getData(), getObjectDisplayName(), getObjectType(), getOldData(), isSetProperty(), operator<(), and removeProperty().
|
private |
Referenced by addPostProcessData(), clear(), empty(), executePostProcessData(), executePreProcessData(), and getPostProcessData().
|
private |
Referenced by addPreProcessData(), clear(), empty(), executePostProcessData(), executePreProcessData(), and getPreProcessData().
|
private |
Referenced by clear(), CUndoData(), getLocalTime(), getTime(), and getUTCTime().
|
private |
Referenced by addProperty(), appendData(), apply(), CUndoData(), getData(), getObjectDisplayName(), getObjectType(), getType(), isSetProperty(), operator<(), and undo().
|
static |