dbxrecrd.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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: AcDbXrecord class definition.
  13. #ifndef ACDB_XRECORD_H
  14. #define ACDB_XRECORD_H
  15. #include "AdAChar.h"
  16. #include "dbmain.h"
  17. #define ACDB_XRECORD_CLASS ACRX_T(/*MSG0*/"AcDbXrecord")
  18. #define ACDB_XRECORD_ITERATOR_CLASS ACRX_T(/*MSG0*/"AcDbXrecordClass")
  19. #pragma pack(push, 8)
  20. class AcDbXrecord: public AcDbObject
  21. {
  22. public:
  23. ACDB_DECLARE_MEMBERS(AcDbXrecord);
  24. AcDbXrecord();
  25. virtual ~AcDbXrecord();
  26. // auxDb parameter only useded when working with
  27. // non-Database-resident instances.
  28. Acad::ErrorStatus rbChain(resbuf** ppRb, AcDbDatabase* auxDb = NULL) const;
  29. Acad::ErrorStatus setFromRbChain(const resbuf& pRb,
  30. AcDbDatabase* auxDb = NULL);
  31. ACDB_PORT Acad::ErrorStatus appendRbChain(const resbuf& pRb);
  32. bool isXlateReferences() const;
  33. void setXlateReferences(bool translate);
  34. // Overridden methods from AcDbObject
  35. //
  36. virtual Acad::ErrorStatus subClose();
  37. virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
  38. virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
  39. virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* filer);
  40. virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;
  41. virtual AcDb::DuplicateRecordCloning mergeStyle() const;
  42. virtual void setMergeStyle(AcDb::DuplicateRecordCloning style);
  43. protected:
  44. virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
  45. };
  46. class AcDbImpXrecordIterator;
  47. class AcDbXrecordIterator: public AcRxObject
  48. {
  49. public:
  50. ACRX_DECLARE_MEMBERS(AcDbXrecordIterator);
  51. AcDbXrecordIterator(const AcDbXrecord* pXrecord);
  52. virtual ~AcDbXrecordIterator();
  53. void start();
  54. bool done() const;
  55. Acad::ErrorStatus next();
  56. int curRestype() const;
  57. Acad::ErrorStatus getCurResbuf(resbuf& outItem, AcDbDatabase* db) const;
  58. ACDB_PORT Acad::ErrorStatus modifyCurResbuf(const resbuf& item);
  59. ACDB_PORT Acad::ErrorStatus insertRbChain(const resbuf& pRb);
  60. ACDB_PORT Acad::ErrorStatus removeCurResbuf();
  61. protected:
  62. AcDbXrecordIterator() {};
  63. private:
  64. friend class AcDbXrecord;
  65. friend class AcDbImpXrecord;
  66. AcDbImpXrecordIterator* mpImpIter;
  67. };
  68. #pragma pack(pop)
  69. #endif