CFx SDK Documentation  2020SP3
DbLongTransaction.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 #ifndef ODDBLONGTRANSWORKSETITERATOR_INCLUDED
26 #define ODDBLONGTRANSWORKSETITERATOR_INCLUDED
27 
28 #include "DbObject.h"
29 
36 {
37 public:
39 
49  virtual void start(
50  bool incRemovedObjs = false,
51  bool incSecondaryObjs = false) = 0;
52 
56  virtual bool done() = 0;
57 
61  virtual void step() = 0;
62 
66  virtual OdDbObjectId objectId() const = 0;
67 
74  virtual bool curObjectIsErased() const = 0;
75 
83  virtual bool curObjectIsRemoved() const = 0;
84 
97  virtual bool curObjectIsPrimary() const = 0;
98 };
99 
104 
116 {
117 public:
119 
121 
122  enum
123  {
124  kSameDb = 0, // Entities are checked out from a normal block in the current *database*.
125  kXrefDb = 1, // Entities are checked out from ModelSpace or an Xref dependent block in an Xref *database*.
126  kUnrelatedDb = 2 // Entities are checked out from ModelSpace or a block in an unrelated *database*.
127  };
128 
143  int type() const;
144 
149 
154 
155 
163 
187 
195 
202  bool incRemovedObjs = false,
203  bool incSecondaryObjs = false) const;
204 
210  OdDbObjectId workSetId) const;
211 
219  ObjectId,
220  bool getErased = false) const;
221 
226 
227  void applyPartialUndo(OdDbDwgFiler* pUndoFiler, OdRxClass* pClassObj);
229  virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
230  virtual OdResult subErase(bool erasing);
231 };
232 
234 
235 #endif // ODDBLONGTRANSWORKSETITERATOR_INCLUDED
OdResult
OdResult
Definition: OdResult.h:29
OdString
Definition: OdString.h:95
OdDbLongTransaction::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbLongTransaction)
OdDbLongTransWorkSetIterator::curObjectIsPrimary
virtual bool curObjectIsPrimary() const =0
DbObject.h
OdRxObject
Definition: RxObject.h:564
OdDbObjectId
Definition: DbObjectId.h:99
OdDbLongTransaction::addToWorkSet
OdResult addToWorkSet(OdDbObjectId ObjectId)
OdDbLongTransaction::type
int type() const
OdDbLongTransaction::removeFromWorkSet
OdResult removeFromWorkSet(OdDbObjectId id)
OdDbLongTransWorkSetIterator::curObjectIsErased
virtual bool curObjectIsErased() const =0
OdDbLongTransWorkSetIterator::done
virtual bool done()=0
OdDbLongTransWorkSetIterator::start
virtual void start(bool incRemovedObjs=false, bool incSecondaryObjs=false)=0
OdDbLongTransaction::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbLongTransaction::getLongTransactionName
OdString getLongTransactionName() const
OdRxClass
Definition: RxObject.h:865
OdSmartPtr
Definition: SmartPtr.h:58
OdDbLongTransaction::destinationBlock
OdDbObjectId destinationBlock() const
OdDbLongTransaction::originBlock
OdDbObjectId originBlock() const
OdDbLongTransaction::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbLongTransaction::OdDbLongTransaction
OdDbLongTransaction()
OdDbLongTransaction::originObject
OdDbObjectId originObject(OdDbObjectId workSetId) const
OdDbLongTransaction::activeIdMap
OdDbIdMapping * activeIdMap()
OdDbLongTransactionPtr
OdSmartPtr< OdDbLongTransaction > OdDbLongTransactionPtr
Definition: DbLongTransaction.h:233
OdDbLongTransaction::newWorkSetIterator
OdDbLongTransWorkSetIteratorPtr newWorkSetIterator(bool incRemovedObjs=false, bool incSecondaryObjs=false) const
ODRX_ABSTRACT
#define ODRX_ABSTRACT
Definition: OdPlatformSettings.h:117
OdDbLongTransWorkSetIterator::step
virtual void step()=0
OdDbLongTransWorkSetIterator::objectId
virtual OdDbObjectId objectId() const =0
OdDbLongTransWorkSetIteratorPtr
OdSmartPtr< OdDbLongTransWorkSetIterator > OdDbLongTransWorkSetIteratorPtr
Definition: DbLongTransaction.h:103
OdDbLongTransaction
Definition: DbLongTransaction.h:116
OdDbLongTransaction::applyPartialUndo
void applyPartialUndo(OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbLongTransWorkSetIterator::curObjectIsRemoved
virtual bool curObjectIsRemoved() const =0
OdDbLongTransaction::syncWorkSet
OdResult syncWorkSet()
OdDbLongTransWorkSetIterator
Definition: DbLongTransaction.h:36
OdDbLongTransWorkSetIterator::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbLongTransWorkSetIterator)
OdDbLongTransaction::subErase
virtual OdResult subErase(bool erasing)
OdDbIdMapping
Definition: DbIdMapping.h:238
OdDbObject
Definition: DbObject.h:211
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbLongTransaction::workSetHas
bool workSetHas(OdDbObjectId ObjectId, bool getErased=false) const