自定义实体.docVIP

  • 5
  • 0
  • 约7.72千字
  • 约 8页
  • 2017-12-22 发布于河南
  • 举报
自定义实体

自定义实体 //----------------------------------------------------------------------------- //----- BoundaryLine.h : Declaration of the CBoundaryLine //----------------------------------------------------------------------------- #pragma once #ifdef CADDBX_MODULE #define DLLIMPEXP __declspec(dllexport) #else //----- Note: we dont use __declspec(dllimport) here, because of the //----- local vtable problem with msvc. If you use __declspec(dllimport), //----- then, when a client dll does a new on the class, the objects //----- vtable pointer points to a vtable allocated in that client //----- dll. If the client dll then passes the object to another dll, //----- and the client dll is then unloaded, the vtable becomes invalid //----- and any virtual calls on the object will access invalid memory. //----- //----- By not using __declspec(dllimport), we guarantee that the //----- vtable is allocated in the server dll during the ctor and the //----- client dll does not overwrite the vtable pointer after calling //----- the ctor. And, since we expect the server dll to remain in //----- memory indefinitely, there is no problem with vtables unexpectedly //----- going away. #define DLLIMPEXP #endif //----------------------------------------------------------------------------- #include dbcurve.h #define CBOUNDARYLINE_DBXSERVICE _T(CBOUNDARYLINE_DBXSERVICE) //----------------------------------------------------------------------------- class DLLIMPEXP CBoundaryLine : public AcDbCurve { public: ACRX_DECLARE_MEMBERS(CBoundaryLine) ; //------------------------------------------------------------------------------------------------------ public: AcGePoint3dArray pt3dArry; public: void DrawWordLine(AcGiWorldDraw *mode,const AcGePoint3d pnts[],const Adesk::LongPtr markerId,int color); void DrawPolyLine(AcGiWorldDraw *mode,const Adesk::UInt32 nbPoints,const AcGePoint3d pVertecList[],const Adesk::LongPtr markerId,int color); ; //-------------------------------------------------------------

文档评论(0)

1亿VIP精品文档

相关文档