AdAChar.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. //
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // Copyright 2015 Autodesk, Inc. All rights reserved.
  6. //
  7. // Use of this software is subject to the terms of the Autodesk license
  8. // agreement provided at the time of installation or download, or which
  9. // otherwise accompanies this software in either electronic or hard copy form.
  10. //
  11. //////////////////////////////////////////////////////////////////////////////
  12. //
  13. // AdAChar.h
  14. //
  15. // Define the ACHAR type and ACRX_T() macro for use in ARX/DBX headers.
  16. //
  17. #pragma once
  18. // The API is always Unicode now, so we always define AD_UNICODE
  19. #define AD_UNICODE 1
  20. // Acad APIs expect clients to be building with "native" wchar_t type.
  21. #if defined(__cplusplus) && !defined(_NATIVE_WCHAR_T_DEFINED)
  22. #error Please use native wchar_t type (/Zc:wchar_t)
  23. #endif
  24. typedef wchar_t ACHAR;
  25. // Same mechanism as tchar.h's _T() macro. We redirect this to a
  26. // second macro, so that other macros can be passed as the x arg,
  27. // as in ACRX_T(__FILE__)
  28. //
  29. #define _ACRX_T(x) L ## x
  30. #define ACRX_T(x) _ACRX_T(x)