dbltrans.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // DESCRIPTION: Exported AcDbLongTransaction classes
  13. #ifndef AD_DBLTRANS_H
  14. #define AD_DBLTRANS_H 1
  15. #include "dbmain.h"
  16. #include "AdAChar.h"
  17. #pragma pack (push, 8)
  18. class AcDbLongTransWorkSetIterator : public AcRxObject
  19. {
  20. public:
  21. virtual ~AcDbLongTransWorkSetIterator() {};
  22. ACRX_DECLARE_MEMBERS(AcDbLongTransWorkSetIterator);
  23. virtual void start (bool incRemovedObjs = false,
  24. bool incSecondaryObjs = false) = 0;
  25. virtual bool done () = 0;
  26. virtual void step () = 0;
  27. virtual AcDbObjectId objectId () const = 0;
  28. virtual bool curObjectIsErased () const = 0;
  29. virtual bool curObjectIsRemoved () const = 0;
  30. virtual bool curObjectIsPrimary () const = 0;
  31. };
  32. class AcDbLongTransaction : public AcDbObject
  33. {
  34. public:
  35. AcDbLongTransaction();
  36. ~AcDbLongTransaction();
  37. ACDB_DECLARE_MEMBERS(AcDbLongTransaction);
  38. enum { kSameDb = 0,
  39. kXrefDb = 1,
  40. kUnrelatedDb = 2 };
  41. int type () const;
  42. AcDbObjectId originBlock() const;
  43. AcDbObjectId destinationBlock() const;
  44. Acad::ErrorStatus getLongTransactionName(ACHAR*&) const;
  45. Acad::ErrorStatus addToWorkSet (AcDbObjectId id);
  46. Acad::ErrorStatus removeFromWorkSet (AcDbObjectId id);
  47. Acad::ErrorStatus syncWorkSet ();
  48. // The parameter includes both erased and removed objects
  49. //
  50. Acad::ErrorStatus newWorkSetIterator(
  51. AcDbLongTransWorkSetIterator*& pNewIter,
  52. bool incRemovedObjs = false,
  53. bool incSecondaryObjs = false)
  54. const;
  55. AcDbObjectId originObject(AcDbObjectId id) const;
  56. bool workSetHas(AcDbObjectId id,
  57. bool bIncErased = false) const;
  58. AcDbIdMapping* activeIdMap();
  59. void regenWorkSetWithDrawOrder();
  60. bool disallowDrawOrder();
  61. };
  62. #pragma pack (pop)
  63. #endif