CFx SDK Documentation  2023 SP0
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
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbLongTransaction > OdDbLongTransactionPtr
OdSmartPtr< OdDbLongTransWorkSetIterator > OdDbLongTransWorkSetIteratorPtr
#define ODRX_ABSTRACT
OdResult
Definition: OdResult.h:29
ODRX_DECLARE_MEMBERS(OdDbLongTransWorkSetIterator)
virtual OdDbObjectId objectId() const =0
virtual bool curObjectIsErased() const =0
virtual void start(bool incRemovedObjs=false, bool incSecondaryObjs=false)=0
virtual bool curObjectIsPrimary() const =0
virtual bool curObjectIsRemoved() const =0
ODDB_DECLARE_MEMBERS(OdDbLongTransaction)
OdResult syncWorkSet()
bool workSetHas(OdDbObjectId ObjectId, bool getErased=false) const
void applyPartialUndo(OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
OdString getLongTransactionName() const
OdDbObjectId originBlock() const
virtual OdResult subErase(bool erasing)
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbObjectId originObject(OdDbObjectId workSetId) const
OdResult addToWorkSet(OdDbObjectId ObjectId)
OdResult removeFromWorkSet(OdDbObjectId id)
OdDbLongTransWorkSetIteratorPtr newWorkSetIterator(bool incRemovedObjs=false, bool incSecondaryObjs=false) const
OdDbIdMapping * activeIdMap()
OdDbObjectId destinationBlock() const