gegbl.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // DESCRIPTION:
  12. //
  13. // This file contains the struct "AcGe" containing run time identificators,
  14. // as well as some other enums. This file contains a strusture
  15. // AcGeContext that contains all global variables needed by the 2d
  16. // and 3d Geometry Library.
  17. #ifndef AC_GEGBL_H
  18. #define AC_GEGBL_H
  19. #include <stdlib.h>
  20. #include "gedll.h"
  21. #include "adesk.h"
  22. #include "getol.h"
  23. #include "gegblge.h"
  24. #pragma pack (push, 8)
  25. class AcGeVector3d;
  26. struct
  27. GE_DLLEXPIMPORT
  28. AcGeContext
  29. {
  30. // System wide default tolerance.
  31. //
  32. static AcGeTol gTol;
  33. static void (*gErrorFunc)();
  34. #ifndef GELIB2D
  35. // Function to calculate a vector which is orthogonal to the given vector.
  36. //
  37. static void (*gOrthoVector)(const AcGeVector3d&,AcGeVector3d&);
  38. #endif
  39. #ifndef unix
  40. static void* (*gAllocMem)(size_t);
  41. #ifdef MEM_DEBUG
  42. // Unicode: leave as char for now
  43. static void* (*gAllocMemLeak)(size_t, const char *, int);
  44. #endif
  45. static void (*gFreeMem)(void*);
  46. #endif
  47. #ifdef GE_LOCATED_NEW
  48. static void* (*gAllocMemNear) (size_t, AcGe::metaTypeIndex, const void* );
  49. static void* (*gAllocMemNearVector) (size_t, AcGe::metaTypeIndex, unsigned int, const void* );
  50. static void (*gSetExternalStore) (const void* );
  51. #endif
  52. #ifndef NDEBUG
  53. static void (*gAssertFunc)(const ACHAR *condition, const ACHAR *filename,
  54. int lineNumber, const ACHAR *status);
  55. #endif
  56. };
  57. #pragma pack (pop)
  58. #endif // AC_GEGBL_H