axpnt2d.h 2.5 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. //
  13. #ifndef __AXPNT2D_H_
  14. #define __AXPNT2D_H_
  15. #include "gept2dar.h"
  16. #include "gepnt2d.h"
  17. #include "gevec2d.h"
  18. #pragma pack (push, 8)
  19. #ifndef AXAUTOEXP
  20. #ifdef AXAUTO_DLL
  21. #define AXAUTOEXP __declspec(dllexport)
  22. #else
  23. #define AXAUTOEXP __declspec(dllimport)
  24. #endif
  25. #endif
  26. #pragma warning(disable : 4290)
  27. class AXAUTOEXP AcAxPoint2d : public AcGePoint2d
  28. {
  29. public:
  30. // constructors
  31. AcAxPoint2d();
  32. AcAxPoint2d(double x, double y);
  33. AcAxPoint2d(const AcGePoint2d& pt);
  34. AcAxPoint2d(const AcGeVector2d& pt);
  35. AcAxPoint2d(const VARIANT* var) throw(HRESULT);
  36. AcAxPoint2d(const VARIANT& var) throw(HRESULT);
  37. AcAxPoint2d(const SAFEARRAY* safeArrayPt) throw(HRESULT);
  38. // equal operators
  39. AcAxPoint2d& operator=(const AcGePoint2d& pt);
  40. AcAxPoint2d& operator=(const AcGeVector2d& pt);
  41. AcAxPoint2d& operator=(const VARIANT* var) throw(HRESULT);
  42. AcAxPoint2d& operator=(const VARIANT& var) throw(HRESULT);
  43. AcAxPoint2d& operator=(const SAFEARRAY* safeArrayPt) throw(HRESULT);
  44. // type requests
  45. VARIANT* asVariantPtr() const throw(HRESULT);
  46. SAFEARRAY* asSafeArrayPtr() const throw(HRESULT);
  47. VARIANT& setVariant(VARIANT& var) const throw(HRESULT);
  48. VARIANT* setVariant(VARIANT* var) const throw(HRESULT);
  49. // utilities
  50. private:
  51. AcAxPoint2d& fromSafeArray(const SAFEARRAY* safeArrayPt) throw(HRESULT);
  52. };
  53. #pragma warning(disable : 4275)
  54. class AXAUTOEXP AcAxPoint2dArray : public AcGePoint2dArray
  55. {
  56. public:
  57. // equal operators
  58. AcAxPoint2dArray& append(const AcGePoint2d& pt);
  59. AcAxPoint2dArray& append(const VARIANT* var) throw(HRESULT);
  60. AcAxPoint2dArray& append(const VARIANT& var) throw(HRESULT);
  61. AcAxPoint2dArray& append(const SAFEARRAY* safeArrayPt) throw(HRESULT);
  62. // type requests
  63. SAFEARRAY* asSafeArrayPtr() const throw(HRESULT);
  64. VARIANT& setVariant(VARIANT& var) const throw(HRESULT);
  65. VARIANT* setVariant(VARIANT* var) const throw(HRESULT);
  66. // utilities
  67. private:
  68. AcAxPoint2dArray& fromSafeArray(const SAFEARRAY* safeArrayPt) throw(HRESULT);
  69. };
  70. #pragma pack (pop)
  71. #endif