OpenLexocad
28.0
|
#include <Transaction.h>
Public Member Functions | |
Transaction (int id=0) | |
virtual | ~Transaction () |
Construction. More... | |
void | apply (CoreDocument &Doc, bool forward) |
apply the content to the document More... | |
virtual void | save (Base::AbstractWriter &, Base::PersistenceVersion &) |
This method is used to save properties or very small amounts of data to an XML document. More... | |
virtual void | restore (Base::AbstractXMLReader &, Base::PersistenceVersion &) |
This method is used to restore properties from an XML document. More... | |
int | getID (void) const |
Return the transaction ID. More... | |
bool | isEmpty () const |
Returns true if the transaction list is empty; otherwise returns false. More... | |
bool | hasObject (const Core::DocObject *Obj) const |
check if this object is used in a transaction More... | |
void | addOrRemoveProperty (Core::DocObject *Obj, const Property *pcProp, bool add) |
void | addObjectNew (Core::DocObject *Obj) |
void | addObjectDel (const Core::DocObject *Obj) |
void | addObjectChange (const Core::DocObject *Obj, const Property *Prop) |
![]() | |
virtual void | saveDocFile (Base::AbstractWriter &, const Base::String &, const Base::String &) |
This method is used to save large amounts of data to a binary file. More... | |
virtual void | restoreDocFile (Base::Reader &, const Base::String &) |
This method is used to restore large amounts of data from a binary file. More... | |
virtual bool | mustbeSaved () const |
Return 'true' if this object must always be saved in the file. More... | |
virtual bool | createSQL (Base::AbstractWriter &, Base::PersistenceVersion &, bool) |
This method is used to save properties or very small amounts of data to an XML document. More... | |
![]() | |
virtual Type | getTypeId (void) const |
template<typename T > | |
bool | isDerivedFrom () const |
bool | isDerivedFrom (const Type type) const |
void * | operator new (size_t size) |
void | operator delete (void *p) |
BaseClass * | operator-> () |
BaseClass * | operator-> () const |
BaseClass ()=default | |
Construction. More... | |
virtual | ~BaseClass () |
Destruction. More... | |
Static Public Member Functions | |
static int | getNewID (void) |
Generate a new unique transaction ID. More... | |
static int | getLastID (void) |
![]() | |
static std::string | encodeAttribute (const std::string &) |
![]() | |
static Type | getClassTypeId (void) |
static void | init (void) |
static void * | create (void) |
static void | setIfcNameAndID (const std::string &n, int id) |
Public Attributes | |
std::string | Name |
![]() | |
long | ____deadVal = 0xBADEAFFE |
Additional Inherited Members | |
![]() | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0) |
static void | initIfcTypes (const std::string &s, Base::Type classTypeId, int id) |
Represents a atomic transaction of the document
Core::Transaction::Transaction | ( | int | id = 0 | ) |
Construction
id | transaction id. If zero, then it will be generated automatically as a monotonically increasing index across the entire application. User can pass in a transaction id to group multiple transactions from different document, so that they can be undo/redo together. |
|
virtual |
Construction.
void Core::Transaction::addObjectChange | ( | const Core::DocObject * | Obj, |
const Property * | Prop | ||
) |
void Core::Transaction::addObjectDel | ( | const Core::DocObject * | Obj | ) |
void Core::Transaction::addObjectNew | ( | Core::DocObject * | Obj | ) |
void Core::Transaction::addOrRemoveProperty | ( | Core::DocObject * | Obj, |
const Property * | pcProp, | ||
bool | add | ||
) |
void Core::Transaction::apply | ( | CoreDocument & | Doc, |
bool | forward | ||
) |
apply the content to the document
int Core::Transaction::getID | ( | void | ) | const |
Return the transaction ID.
|
static |
|
static |
Generate a new unique transaction ID.
bool Core::Transaction::hasObject | ( | const Core::DocObject * | Obj | ) | const |
check if this object is used in a transaction
bool Core::Transaction::isEmpty | ( | ) | const |
Returns true if the transaction list is empty; otherwise returns false.
|
virtual |
This method is used to restore properties from an XML document.
Implements Base::Persistence.
|
virtual |
This method is used to save properties or very small amounts of data to an XML document.
Implements Base::Persistence.
std::string Core::Transaction::Name |