dbMotionPath.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. #pragma once
  12. #include "dbmain.h"
  13. #pragma pack(push, 8)
  14. // The following is part of the code used to export a API
  15. // and/or use the exported API.
  16. //
  17. #pragma warning( disable: 4275 4251 )
  18. #ifdef SCENEDLLIMPEXP
  19. #undef SCENEDLLIMPEXP
  20. #endif
  21. #ifdef SCENEOE
  22. #define SCENEDLLIMPEXP __declspec( dllexport )
  23. #else
  24. // Note: we don't use __declspec(dllimport) here, because of the
  25. // "local vtable" problem with msvc. If you use __declspec(dllimport),
  26. // then, when a client dll does a new on the class, the object's
  27. // vtable pointer points to a vtable allocated in that client
  28. // dll. If the client dll then passes the object to another dll,
  29. // and the client dll is then unloaded, the vtable becomes invalid
  30. // and any virtual calls on the object will access invalid memory.
  31. //
  32. // By not using __declspec(dllimport), we guarantee that the
  33. // vtable is allocated in the server dll during the ctor and the
  34. // client dll does not overwrite the vtable pointer after calling
  35. // the ctor. And, since we expect the server dll to remain in
  36. // memory indefinitely, there is no problem with vtables unexpectedly
  37. // going away.
  38. //
  39. #define SCENEDLLIMPEXP //__declspec( dllimport )
  40. #endif
  41. const ACHAR ACDB_MOTIONPATH_DICTIONARY[] = /*MSG0*/ACRX_T("ACAD_MOTION");
  42. Acad::ErrorStatus SCENEDLLIMPEXP acdbGetMotionPathDictionary (AcDbDatabase* pDb, AcDbDictionary*& pDict,
  43. AcDb::OpenMode mode, bool createIfNonExist);
  44. Acad::ErrorStatus SCENEDLLIMPEXP acdbGetMotionPathDictionary (AcDbDatabase* pDb, AcDbDictionary*& pDict,
  45. AcDb::OpenMode mode);
  46. class AcDbImpMotionPath;
  47. class SCENEDLLIMPEXP AcDbMotionPath : public AcDbObject
  48. {
  49. public:
  50. ACRX_DECLARE_MEMBERS(AcDbMotionPath);
  51. AcDbMotionPath();
  52. virtual ~AcDbMotionPath();
  53. AcDbObjectId cameraPath() const;
  54. Acad::ErrorStatus setCameraPath(const AcDbObjectId& id);
  55. AcDbObjectId targetPath() const;
  56. Acad::ErrorStatus setTargetPath(const AcDbObjectId& id);
  57. AcDbObjectId viewTableRecordId() const;
  58. Acad::ErrorStatus setViewTableRecordId(const AcDbObjectId& id);
  59. Adesk::UInt32 frames() const;
  60. Acad::ErrorStatus setFrames(Adesk::UInt16 frames);
  61. Adesk::UInt32 frameRate() const;
  62. Acad::ErrorStatus setFrameRate(Adesk::UInt16 rate);
  63. bool cornerDecel() const;
  64. Acad::ErrorStatus setCornerDecel(bool cornerDecel);
  65. // AcDbObject protocol
  66. virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* pFiler);
  67. virtual Acad::ErrorStatus dwgOutFields (AcDbDwgFiler* pFiler) const;
  68. virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* pFiler);
  69. virtual Acad::ErrorStatus dxfOutFields (AcDbDxfFiler* pFiler) const;
  70. protected:
  71. // AcGiDrawable protocol
  72. //
  73. virtual Adesk::UInt32 subSetAttributes (AcGiDrawableTraits* pTraits);
  74. AcDbImpMotionPath* imp() const;
  75. private:
  76. friend class AcDbImpMotionPath;
  77. AcDbImpMotionPath* mpImp;
  78. };