gegblnew.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. // Provides an interface for additional overloads to the global new.
  13. // Implemented in gegbl.cpp
  14. //
  15. #ifndef AC_GEGBLNEW_H
  16. #define AC_GEGBLNEW_H
  17. #ifdef GE_LOCATED_NEW
  18. #include "gegblge.h"
  19. #include "gegetmti.h"
  20. GE_DLLEXPIMPORT
  21. void* operator new ( size_t, enum AcGe::metaTypeIndex, const void* );
  22. GE_DLLEXPIMPORT
  23. void* operator new ( size_t, enum AcGe::metaTypeIndex, unsigned int, const void* );
  24. #define GENEWLOC( T, ptr) new (AcGeGetMetaTypeIndex<T >(), (ptr)) T
  25. #define GENEWLOCVEC( T, count, ptr) new (AcGeGetMetaTypeIndex<T >(),(count),(ptr)) T [ (count) ]
  26. #else //#ifdef GE_LOCATED_NEW
  27. #define GENEWLOC( T, ptr) new T
  28. #define GENEWLOCVEC( T, count, ptr) new T [ (count) ]
  29. #endif
  30. #endif // AC_GEGBLNEW_H