CFx SDK Documentation
2022 SP0
|
#include <DbLongTransaction.h>
Additional Inherited Members | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
Protected Member Functions inherited from OdDbObject | |
OdDbObject () | |
virtual OdResult | subGetClassID (void *pClsid) const |
virtual OdDbObjectPtr | subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const |
virtual OdDbObjectPtr | subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const |
Protected Member Functions inherited from OdGiDrawable | |
OdGiDrawable () | |
virtual OdUInt32 | subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const |
virtual OdUInt32 | subRegenSupportFlags () const |
Protected Attributes inherited from OdDbObject | |
OdDbObjectImpl * | m_pImpl |
This class implements the tracking of long transactions.
<group OdDb_Classes>
Definition at line 115 of file DbLongTransaction.h.
anonymous enum |
Enumerator | |
---|---|
kSameDb | |
kXrefDb | |
kUnrelatedDb |
Definition at line 122 of file DbLongTransaction.h.
OdDbLongTransaction::OdDbLongTransaction | ( | ) |
OdDbIdMapping* OdDbLongTransaction::activeIdMap | ( | ) |
Returns a pointer to the OdDbMapping object used for OdLongTransationReactor callbacks used for checkin/checkout.
OdResult OdDbLongTransaction::addToWorkSet | ( | OdDbObjectId | ObjectId | ) |
Adds the specified object to the current work set.
objectId | [in] Object ID to be added. |
objectId must be in the same database as the the transaction.
objectId can specify objects from either the origin block or destination block. Objects from the destination block will be cloned; objects from the origin block will not.
|
virtual |
Notification function called each time an Undo operation is performed this object is using partial Undo.
pUndoFiler | [in] A pointer to the undo filer with the partial undo information. |
pClassObj | [in] A pointer to the OdRxClass object for the class that will handle the Undo. |
This member function must know which types of fields to scan, and must stop after reading what it it needs.
If the class type specified by pClassObj does not matches the class of this object, this member function must call the parent class's applyPartialUndo() and return whatever it returns.
If it does match the class of this object, this member function must use pUndoFiler to read the undo data, then typically use this object's set() method.
Throws:
Cause eNotThatKindOfClass pClassObj != OdDbObject::desc()
Reimplemented from OdDbObject.
OdDbObjectId OdDbLongTransaction::destinationBlock | ( | ) | const |
Returns the object ID of the block to which the entities are cloned.
|
virtual |
Reads the .dwg file data of this object.
pFiler | [in] Filer object from which data are read. |
This function is called by dwgIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbObject.
|
virtual |
Writes the .dwg file data of this object.
pFiler | [in] Pointer to the filer to which data are written. |
This function is called by dwgIn() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbObject.
OdString OdDbLongTransaction::getLongTransactionName | ( | ) | const |
Returns the long transaction name.
OdDbLongTransWorkSetIteratorPtr OdDbLongTransaction::newWorkSetIterator | ( | bool | incRemovedObjs = false , |
bool | incSecondaryObjs = false |
||
) | const |
Creates an Iterator object that provides access to the entities in the work set.
incRemovedObjs | [in] True to include removed and erased objects from the work set. |
incSecondaryObj | [in] True to include objects referenced by objects in the work set. |
OdDbLongTransaction::ODDB_DECLARE_MEMBERS | ( | OdDbLongTransaction | ) |
OdDbObjectId OdDbLongTransaction::originBlock | ( | ) | const |
Returns the object ID of the block from which the entities are cloned.
OdDbObjectId OdDbLongTransaction::originObject | ( | OdDbObjectId | workSetId | ) | const |
Returns the object ID from which the workSetId was cloned.
workSetId | [in] Work set object ID.. |
OdResult OdDbLongTransaction::removeFromWorkSet | ( | OdDbObjectId | id | ) |
Removes the specified object from the current work set.
objectId | [in] Object ID to be removed. |
|
virtual |
Called as the first operation as this object is being erased or unerased.
erasing | [in] A copy of the erasing argument passed to erase(). |
Returns eOk if and only if erase() is to continue.
When overriding this function:
1) If the OdDbObject's state is incorrect, return something other than eOk.
2) If the parent class's subErase() returns anything other than eOk, immediately return it.
3) If other actions are required before erase, do them.
4) Return eOk.
If you must make changes to this object's state, either make them after step 2, or roll them back if step 2 returns other than eOk.
The default implementation of this function does nothing but return eOk. This function can be overridden in custom classes.
Reimplemented from OdDbObject.
OdResult OdDbLongTransaction::syncWorkSet | ( | ) |
Synchronizes work set.
int OdDbLongTransaction::type | ( | ) | const |
Returns the type of the pending long transaction:
Value Description kSameDb 0 Entities are checked out from a normal block or layout in the current database. kXrefDb 1 Entities are checked out from ModelSpace or an Xref dependent block in an Xref database. kUnrelatedDb 2 Entities are checked out from ModelSpace or a block in an unrelated database.
bool OdDbLongTransaction::workSetHas | ( | OdDbObjectId | ObjectId, |
bool | getErased = false |
||
) | const |
Returns true if and only if the specified object ID is in the work set.
objectId | [in] Object ID being tested. |
getErased | [in] True to return true for erased and removed objects in the work set. |