Baselib.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "Internal/PlatformDetection.h"
  3. #include "Internal/ArchitectureDetection.h"
  4. #include "Internal/PlatformEnvironment.h"
  5. #ifdef BASELIB_INLINE_NAMESPACE
  6. #ifndef __cplusplus
  7. #error "BASELIB_INLINE_NAMESPACE is not available when compiling C code"
  8. #endif
  9. #define BASELIB_CPP_INTERFACE inline namespace BASELIB_INLINE_NAMESPACE
  10. #define BASELIB_C_INTERFACE BASELIB_CPP_INTERFACE
  11. #else
  12. #define BASELIB_CPP_INTERFACE extern "C++"
  13. #define BASELIB_C_INTERFACE extern "C"
  14. #endif
  15. #if defined(BASELIB_USE_DYNAMICLIBRARY)
  16. #define BASELIB_API IMPORTED_SYMBOL
  17. #elif defined(BASELIB_DYNAMICLIBRARY)
  18. #define BASELIB_API EXPORTED_SYMBOL
  19. #else
  20. #define BASELIB_API
  21. #endif
  22. // BASELIB_BINDING_GENERATION is set by the bindings generator and by BindingsExposedInlineImplementations.cpp
  23. // in order to selectively provide symbols bindings can link to for some our our inline implementations.
  24. #ifdef BASELIB_BINDING_GENERATION
  25. #define BASELIB_INLINE_API BASELIB_API
  26. #define BASELIB_FORCEINLINE_API BASELIB_API
  27. #else
  28. #define BASELIB_INLINE_API static inline
  29. #define BASELIB_FORCEINLINE_API static COMPILER_FORCEINLINE
  30. #endif
  31. #include "Internal/BasicTypes.h"
  32. #include "Internal/CoreMacros.h"
  33. #include "Internal/Assert.h"