acarrayhelper.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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:
  13. // Specialized templates to enbale the following types
  14. // to use certain allocators.
  15. //
  16. #if defined(ADSK_ACGEVECTOR2D_DEFINED) && defined(AC_ACARRAY_H)
  17. #undef ADSK_ACGEVECTOR2D_DEFINED
  18. template<>
  19. struct AllocatorSelector<AcGeVector2d, false>
  20. {
  21. typedef AcArrayMemCopyReallocator<AcGeVector2d> allocator;
  22. };
  23. #endif
  24. #if defined(ADSK_ACGEVECTOR3D_DEFINED) && defined(AC_ACARRAY_H)
  25. #undef ADSK_ACGEVECTOR3D_DEFINED
  26. template<>
  27. struct AllocatorSelector<AcGeVector3d, false>
  28. {
  29. typedef AcArrayMemCopyReallocator<AcGeVector3d> allocator;
  30. };
  31. #endif
  32. #if defined(ADSK_ACGEPOINT3D_DEFINED) && defined(AC_ACARRAY_H)
  33. #undef ADSK_ACGEPOINT3D_DEFINED
  34. template<>
  35. struct AllocatorSelector<AcGePoint3d, false>
  36. {
  37. typedef AcArrayMemCopyReallocator<AcGePoint3d> allocator;
  38. };
  39. #endif
  40. #if defined(ADSK_ACGEPOINT2D_DEFINED) && defined(AC_ACARRAY_H)
  41. #undef ADSK_ACGEPOINT2D_DEFINED
  42. template<>
  43. struct AllocatorSelector<AcGePoint2d, false>
  44. {
  45. typedef AcArrayMemCopyReallocator<AcGePoint2d> allocator;
  46. };
  47. #endif
  48. #if defined(ADSK_ACDBOBJECTID_DEFINED) && defined(AC_ACARRAY_H)
  49. #undef ADSK_ACDBOBJECTID_DEFINED
  50. template<>
  51. struct AllocatorSelector<AcDbObjectId, false>
  52. {
  53. typedef AcArrayMemCopyReallocator<AcDbObjectId> allocator;
  54. };
  55. #endif
  56. #if defined(ADSK_ACCMENTITYCOLOR_DEFINED) && defined(AC_ACARRAY_H)
  57. #undef ADSK_ACCMENTITYCOLOR_DEFINED
  58. template<>
  59. struct AllocatorSelector<AcCmEntityColor, false>
  60. {
  61. typedef AcArrayMemCopyReallocator<AcCmEntityColor> allocator;
  62. };
  63. #endif