CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Macros.hpp File Reference
#include "CeresEngine/Config.hpp"
#include <cassert>

Go to the source code of this file.

Macros

#define CE_PLATFORM_WINDOWS   0
 Generated code will run under Windows.
 
#define CE_PLATFORM_WIN32   0
 Generated code will run under WIN32 API.
 
#define CE_PLATFORM_POSIX   0
 Generated code will run under some POSIX-compliant OS (including macOS).
 
#define CE_PLATFORM_LINUX   0
 Generated code will run under Linux.
 
#define CE_PLATFORM_ANDROID   0
 Generated code will run under Android.
 
#define CE_PLATFORM_BSD   0
 Generated code will run under a BSD system.
 
#define CE_PLATFORM_FREEBSD   0
 Generated code will run under a FreeBSD system.
 
#define CE_PLATFORM_APPLE   0
 Generated code will run under an Apple operating system.
 
#define CE_PLATFORM_MAC   0
 Generated code will run under macOS.
 
#define CE_PLATFORM_IOS   0
 Generated code will run under iOS.
 
#define CE_PLATFORM_WEB   0
 Generated code will run on the web.
 
#define CE_PLATFORM_EMSCRIPTEN   0
 Generated code will run on the web with Emscripten.
 
#define CE_PLATFORM_WASI   0
 Generated code will run on the web with WASI.
 
#define CE_PLATFORM_CHEERP   0
 Generated code will run on the web with Cheerp.
 
#define CE_COMPILER_CLANG   0
 Code will be compiled with Clang.
 
#define CE_COMPILER_MSVC   0
 Code will be compiled with MSVC.
 
#define CE_COMPILER_CLANGCL   0
 Code will be compiled with Clang (with ClangCL).
 
#define CE_COMPILER_GNUC   0
 Code will be compiled with GCC.
 
#define CE_COMPILER_INTEL   0
 Code will be compiled with Intel compiler.
 
#define CE_ARCHITECTURE_X86   0
 Compiler is generating x86 instructions.
 
#define CE_ARCHITECTURE_X86_32   0
 Compiler is generating x86 instructions for 32-bit mode.
 
#define CE_ARCHITECTURE_X86_64   0
 Compiler is generating x86 instructions for 64-bit mode.
 
#define CE_ARCHITECTURE_ARM   0
 Compiler is generating ARM instructions.
 
#define CE_ARCHITECTURE_ARM32   0
 Compiler is generating ARM instructions for 32-bit mode.
 
#define CE_ARCHITECTURE_ARM64   0
 Compiler is generating ARM instructions for 64-bit mode.
 
#define CE_ARCHITECTURE_WASM   0
 Compiler is generating WebAssembly instructions.
 
#define CE_ARCHITECTURE_WASM32   0
 Compiler is generating WebAssembly instructions for 32-bit mode.
 
#define CE_ARCHITECTURE_WASM64   0
 Compiler is generating WebAssembly instructions for 64-bit mode.
 
#define CE_ARCHITECTURE_IS_32BIT   CE_ARCHITECTURE_X86_32 || CE_ARCHITECTURE_ARM32 || CE_ARCHITECTURE_WASM32
 Determines if the target architecture is 32-bit.
 
#define CE_ARCHITECTURE_IS_64BIT   CE_ARCHITECTURE_X86_64 || CE_ARCHITECTURE_ARM64 || CE_ARCHITECTURE_WASM64
 Determines if the target architecture is 64-bit.
 
#define CE_VISIBLE   __attribute__((visibility("default")))
 The CE_VISIBLE macro marks a symbol as visible in a binary.
 
#define CE_HIDDEN   __attribute__((visibility("hidden")))
 The CE_HIDDEN macro marks a symbol as hidden in a binary.
 
#define CE_DLL_EXPORT   CE_VISIBLE
 The CE_DLL_EXPORT macro marks a symbol as expoted in a DLL.
 
#define CE_DLL_IMPORT   CE_VISIBLE
 The CE_DLL_IMPORT macro marks a symbol as imported from a DLL.
 
#define CE_EXPORT
 The CE_EXPORT macro marks a symbol as exported in a DLL.
 
#define CE_SCRIPT_EXPORT(...)
 The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environments.
 
#define CEReflectable(...)
 The CEReflectable macro marks a class or method as reflectable and available in reflection environments.
 
#define CE_BIND_THIS(function)
 Binds a member function as a callable lambda function.
 
#define CE_DEPRECATED   [[deprecated]]
 
#define CE_DEPRECATED_MSG(Message)   [[deprecated(Message)]]
 
#define CE_NON_NULL
 The CE_NON_NULL nullability qualifier indicates that null is not a meaningful value for a value of the pointer type.
 
#define CE_NULLABLE
 The CE_NULLABLE nullability qualifier indicates that a value of the pointer type can be null.
 
#define CE_NULL_UNSPECIFIED
 The CE_NULL_UNSPECIFIED nullability qualifier indicates that neither the CE_NON_NULL nor CE_NULLABLE qualifiers make sense for a particular pointer type. It is used primarily to indicate that the role of null with specific pointers in a nullability-annotated header is unclear, e.g., due to overly-complex implementations or historical factors with a long-lived API.
 
#define CE_EXPECTS(...)
 
#define CE_ENSURES(...)
 
#define CE_ASSERT(...)   assert(__VA_ARGS__)
 
#define CE_ASSERT_UNDEFINED()
 
#define CE_ASSERT_UNIMPLEMENTED()
 
#define CE_ASSERT_DEBUG(...)   CE_ASSERT(__VA_ARGS__)
 
#define CE_CONCEPT(Name)   typename
 
#define CE_CONCEPT_REQUIRES(...)
 
#define CE_NOINLINE
 
#define CE_UNREACHABLE   std::abort()
 
#define CE_FORCE_INLINE
 
#define CE_FORCE_INLINE
 
#define CE_COLD
 
#define CE_LIKELY
 
#define CE_UNLIKELY
 
#define CE_NO_UNIQUE_ADDRESS
 
#define CE_EXPLICIT(EXPR)
 
#define CE_EXPLICIT_FALSE   CE_EXPLICIT(false)
 
#define CE_DISABLE_WARNING_PUSH
 
#define CE_DISABLE_WARNING_POP
 
#define CE_DISABLE_ALL_WARNINGS
 
#define CE_DISABLE_WARNING_UNREFERENCED_FORMAL_PARAMETER
 
#define CE_DISABLE_WARNING_UNREFERENCED_FUNCTION
 
#define CE_DISABLE_WARNING_TAUTOLOGICAL_COMPARE
 
#define CE_DISABLE_WARNING_REORDER
 
#define CE_DISABLE_WARNING_UNUSED_VARIABLE
 
#define CE_DISABLE_WARNING_UNINITIALIZED_VARIABLE
 
#define CE_DISABLE_WARNING_MISSING_FIELD_INITIALIZERS
 
#define CE_DISABLE_WARNING_UNUSED_PRIVATE_FIELD
 
#define CE_DISABLE_WARNING_TYPE_LIMITS
 
#define CE_DISABLE_WARNING_DEPRECATED_VOLATILE
 
#define CE_DISABLE_WARNING_DEPRECATED_DECLARATIONS
 
#define CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS
 
#define CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS
 
#define CE_DISABLE_WARNING_INHERITS_VIA_DOMINANCE
 
#define CE_DISABLE_WARNING_DESTRUCTOR_IMPLICITLY_DELETED
 
#define CE_ASSUME(X)
 
#define CE_CPU_CACHE_LINE   64
 
#define CE_TOKENPASTE2_(x, y)   x##y
 
#define CE_TOKENPASTE2(x, y)   CE_TOKENPASTE2_(x, y)
 
#define CE_TOKENPASTE3_(x, y, z)   x##y##z
 
#define CE_TOKENPASTE3(x, y, z)   CE_TOKENPASTE3_(x, y, z)
 
#define CE_USES_ALLOCATOR(T)    template<typename Alloc> struct std::uses_allocator<T, Alloc> : std::true_type {}
 
#define FMT_CONSTEVAL
 
#define GLM_FORCE_RADIANS
 
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
 
#define GLM_ENABLE_EXPERIMENTAL
 
#define CE_REFL_DATA(N)   RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)
 
#define CE_REFL_DATA_NAMED(N, M)   RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::M>(#N)
 
#define CE_REFL_DATA_GET(N, G)   RTTI.template data(#N, [](const typename std::decay_t<decltype(RTTI)>::ReflectedType* obj) { return obj->G(); })
 
#define CE_REFL_DATA_GETSET(N, G, S)   RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::G, &std::decay_t<decltype(RTTI)>::ReflectedType::S>(#N)
 
#define CE_REFL_FUNC(N)   RTTI.template func<&std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)
 
#define CE_REFL_CTOR(...)   RTTI.template ctor<__VA_ARGS__>()
 
#define CE_REFL_VAL(N)   RTTI.template value<std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)
 
#define CE_REFL_BASE(T)   RTTI.template base<T>()
 
#define CE_SWIFT_SELF_CONTAINED
 
#define CE_SWIFT_SAFE_TO_IMPORT
 
#define CE_SWIFT_REFERENCE_TYPE(_retain, _release)
 
#define CE_SWIFT_NAME(_name)
 

Macro Definition Documentation

◆ CE_ARCHITECTURE_ARM

#define CE_ARCHITECTURE_ARM   0

Compiler is generating ARM instructions.

◆ CE_ARCHITECTURE_ARM32

#define CE_ARCHITECTURE_ARM32   0

Compiler is generating ARM instructions for 32-bit mode.

◆ CE_ARCHITECTURE_ARM64

#define CE_ARCHITECTURE_ARM64   0

Compiler is generating ARM instructions for 64-bit mode.

◆ CE_ARCHITECTURE_IS_32BIT

#define CE_ARCHITECTURE_IS_32BIT   CE_ARCHITECTURE_X86_32 || CE_ARCHITECTURE_ARM32 || CE_ARCHITECTURE_WASM32

Determines if the target architecture is 32-bit.

◆ CE_ARCHITECTURE_IS_64BIT

#define CE_ARCHITECTURE_IS_64BIT   CE_ARCHITECTURE_X86_64 || CE_ARCHITECTURE_ARM64 || CE_ARCHITECTURE_WASM64

Determines if the target architecture is 64-bit.

◆ CE_ARCHITECTURE_WASM

#define CE_ARCHITECTURE_WASM   0

Compiler is generating WebAssembly instructions.

◆ CE_ARCHITECTURE_WASM32

#define CE_ARCHITECTURE_WASM32   0

Compiler is generating WebAssembly instructions for 32-bit mode.

◆ CE_ARCHITECTURE_WASM64

#define CE_ARCHITECTURE_WASM64   0

Compiler is generating WebAssembly instructions for 64-bit mode.

◆ CE_ARCHITECTURE_X86

#define CE_ARCHITECTURE_X86   0

Compiler is generating x86 instructions.

◆ CE_ARCHITECTURE_X86_32

#define CE_ARCHITECTURE_X86_32   0

Compiler is generating x86 instructions for 32-bit mode.

◆ CE_ARCHITECTURE_X86_64

#define CE_ARCHITECTURE_X86_64   0

Compiler is generating x86 instructions for 64-bit mode.

◆ CE_ASSERT

#define CE_ASSERT (   ...)    assert(__VA_ARGS__)

◆ CE_ASSERT_DEBUG

#define CE_ASSERT_DEBUG (   ...)    CE_ASSERT(__VA_ARGS__)

◆ CE_ASSERT_UNDEFINED

#define CE_ASSERT_UNDEFINED ( )
Value:
CE_ASSERT(false && "Undefined Behavior"); \
std::terminate();
#define CE_ASSERT(...)
Definition Macros.hpp:323

◆ CE_ASSERT_UNIMPLEMENTED

#define CE_ASSERT_UNIMPLEMENTED ( )
Value:
CE_ASSERT(false && "Not Implemented"); \
std::terminate();

◆ CE_ASSUME

#define CE_ASSUME (   X)

◆ CE_BIND_THIS

#define CE_BIND_THIS (   function)
Value:
[this](auto&&... args) -> decltype(auto) { \
return this->function(std::forward<decltype(args)>(args)...); \
}

Binds a member function as a callable lambda function.

Parameters
functionThe member function to be called by the lambda.

◆ CE_COLD

#define CE_COLD

◆ CE_COMPILER_CLANG

#define CE_COMPILER_CLANG   0

Code will be compiled with Clang.

◆ CE_COMPILER_CLANGCL

#define CE_COMPILER_CLANGCL   0

Code will be compiled with Clang (with ClangCL).

◆ CE_COMPILER_GNUC

#define CE_COMPILER_GNUC   0

Code will be compiled with GCC.

◆ CE_COMPILER_INTEL

#define CE_COMPILER_INTEL   0

Code will be compiled with Intel compiler.

◆ CE_COMPILER_MSVC

#define CE_COMPILER_MSVC   0

Code will be compiled with MSVC.

◆ CE_CONCEPT

#define CE_CONCEPT (   Name)    typename

◆ CE_CONCEPT_REQUIRES

#define CE_CONCEPT_REQUIRES (   ...)

◆ CE_CPU_CACHE_LINE

#define CE_CPU_CACHE_LINE   64

◆ CE_DEPRECATED

#define CE_DEPRECATED   [[deprecated]]

◆ CE_DEPRECATED_MSG

#define CE_DEPRECATED_MSG (   Message)    [[deprecated(Message)]]

◆ CE_DISABLE_ALL_WARNINGS

#define CE_DISABLE_ALL_WARNINGS

◆ CE_DISABLE_WARNING_DEPRECATED_DECLARATIONS

#define CE_DISABLE_WARNING_DEPRECATED_DECLARATIONS

◆ CE_DISABLE_WARNING_DEPRECATED_VOLATILE

#define CE_DISABLE_WARNING_DEPRECATED_VOLATILE

◆ CE_DISABLE_WARNING_DESTRUCTOR_IMPLICITLY_DELETED

#define CE_DISABLE_WARNING_DESTRUCTOR_IMPLICITLY_DELETED

◆ CE_DISABLE_WARNING_INHERITS_VIA_DOMINANCE

#define CE_DISABLE_WARNING_INHERITS_VIA_DOMINANCE

◆ CE_DISABLE_WARNING_MISSING_FIELD_INITIALIZERS

#define CE_DISABLE_WARNING_MISSING_FIELD_INITIALIZERS

◆ CE_DISABLE_WARNING_POP

#define CE_DISABLE_WARNING_POP

◆ CE_DISABLE_WARNING_PUSH

#define CE_DISABLE_WARNING_PUSH

◆ CE_DISABLE_WARNING_REORDER

#define CE_DISABLE_WARNING_REORDER

◆ CE_DISABLE_WARNING_TAUTOLOGICAL_COMPARE

#define CE_DISABLE_WARNING_TAUTOLOGICAL_COMPARE

◆ CE_DISABLE_WARNING_TYPE_LIMITS

#define CE_DISABLE_WARNING_TYPE_LIMITS

◆ CE_DISABLE_WARNING_UNINITIALIZED_VARIABLE

#define CE_DISABLE_WARNING_UNINITIALIZED_VARIABLE

◆ CE_DISABLE_WARNING_UNREFERENCED_FORMAL_PARAMETER

#define CE_DISABLE_WARNING_UNREFERENCED_FORMAL_PARAMETER

◆ CE_DISABLE_WARNING_UNREFERENCED_FUNCTION

#define CE_DISABLE_WARNING_UNREFERENCED_FUNCTION

◆ CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS [1/2]

#define CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS

◆ CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS [2/2]

#define CE_DISABLE_WARNING_UNSIGNED_UNARY_MINUS

◆ CE_DISABLE_WARNING_UNUSED_PRIVATE_FIELD

#define CE_DISABLE_WARNING_UNUSED_PRIVATE_FIELD

◆ CE_DISABLE_WARNING_UNUSED_VARIABLE

#define CE_DISABLE_WARNING_UNUSED_VARIABLE

◆ CE_DLL_EXPORT

#define CE_DLL_EXPORT   CE_VISIBLE

The CE_DLL_EXPORT macro marks a symbol as expoted in a DLL.

◆ CE_DLL_IMPORT

#define CE_DLL_IMPORT   CE_VISIBLE

The CE_DLL_IMPORT macro marks a symbol as imported from a DLL.

◆ CE_ENSURES

#define CE_ENSURES (   ...)

◆ CE_EXPECTS

#define CE_EXPECTS (   ...)

◆ CE_EXPLICIT

#define CE_EXPLICIT (   EXPR)

◆ CE_EXPLICIT_FALSE

#define CE_EXPLICIT_FALSE   CE_EXPLICIT(false)

◆ CE_EXPORT

#define CE_EXPORT

The CE_EXPORT macro marks a symbol as exported in a DLL.

◆ CE_FORCE_INLINE [1/2]

#define CE_FORCE_INLINE

◆ CE_FORCE_INLINE [2/2]

#define CE_FORCE_INLINE

◆ CE_HIDDEN

#define CE_HIDDEN   __attribute__((visibility("hidden")))

The CE_HIDDEN macro marks a symbol as hidden in a binary.

◆ CE_LIKELY

#define CE_LIKELY

◆ CE_NO_UNIQUE_ADDRESS

#define CE_NO_UNIQUE_ADDRESS

◆ CE_NOINLINE

#define CE_NOINLINE

◆ CE_NON_NULL

#define CE_NON_NULL

The CE_NON_NULL nullability qualifier indicates that null is not a meaningful value for a value of the pointer type.

◆ CE_NULL_UNSPECIFIED

#define CE_NULL_UNSPECIFIED

The CE_NULL_UNSPECIFIED nullability qualifier indicates that neither the CE_NON_NULL nor CE_NULLABLE qualifiers make sense for a particular pointer type. It is used primarily to indicate that the role of null with specific pointers in a nullability-annotated header is unclear, e.g., due to overly-complex implementations or historical factors with a long-lived API.

◆ CE_NULLABLE

#define CE_NULLABLE

The CE_NULLABLE nullability qualifier indicates that a value of the pointer type can be null.

◆ CE_PLATFORM_ANDROID

#define CE_PLATFORM_ANDROID   0

Generated code will run under Android.

◆ CE_PLATFORM_APPLE

#define CE_PLATFORM_APPLE   0

Generated code will run under an Apple operating system.

◆ CE_PLATFORM_BSD

#define CE_PLATFORM_BSD   0

Generated code will run under a BSD system.

◆ CE_PLATFORM_CHEERP

#define CE_PLATFORM_CHEERP   0

Generated code will run on the web with Cheerp.

◆ CE_PLATFORM_EMSCRIPTEN

#define CE_PLATFORM_EMSCRIPTEN   0

Generated code will run on the web with Emscripten.

◆ CE_PLATFORM_FREEBSD

#define CE_PLATFORM_FREEBSD   0

Generated code will run under a FreeBSD system.

◆ CE_PLATFORM_IOS

#define CE_PLATFORM_IOS   0

Generated code will run under iOS.

◆ CE_PLATFORM_LINUX

#define CE_PLATFORM_LINUX   0

Generated code will run under Linux.

◆ CE_PLATFORM_MAC

#define CE_PLATFORM_MAC   0

Generated code will run under macOS.

◆ CE_PLATFORM_POSIX

#define CE_PLATFORM_POSIX   0

Generated code will run under some POSIX-compliant OS (including macOS).

◆ CE_PLATFORM_WASI

#define CE_PLATFORM_WASI   0

Generated code will run on the web with WASI.

◆ CE_PLATFORM_WEB

#define CE_PLATFORM_WEB   0

Generated code will run on the web.

◆ CE_PLATFORM_WIN32

#define CE_PLATFORM_WIN32   0

Generated code will run under WIN32 API.

◆ CE_PLATFORM_WINDOWS

#define CE_PLATFORM_WINDOWS   0

Generated code will run under Windows.

◆ CE_REFL_BASE

#define CE_REFL_BASE (   T)    RTTI.template base<T>()

◆ CE_REFL_CTOR

#define CE_REFL_CTOR (   ...)    RTTI.template ctor<__VA_ARGS__>()

◆ CE_REFL_DATA

#define CE_REFL_DATA (   N)    RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)

◆ CE_REFL_DATA_GET

#define CE_REFL_DATA_GET (   N,
 
)    RTTI.template data(#N, [](const typename std::decay_t<decltype(RTTI)>::ReflectedType* obj) { return obj->G(); })

◆ CE_REFL_DATA_GETSET

#define CE_REFL_DATA_GETSET (   N,
  G,
 
)    RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::G, &std::decay_t<decltype(RTTI)>::ReflectedType::S>(#N)

◆ CE_REFL_DATA_NAMED

#define CE_REFL_DATA_NAMED (   N,
 
)    RTTI.template data<&std::decay_t<decltype(RTTI)>::ReflectedType::M>(#N)

◆ CE_REFL_FUNC

#define CE_REFL_FUNC (   N)    RTTI.template func<&std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)

◆ CE_REFL_VAL

#define CE_REFL_VAL (   N)    RTTI.template value<std::decay_t<decltype(RTTI)>::ReflectedType::N>(#N)

◆ CE_SCRIPT_EXPORT

#define CE_SCRIPT_EXPORT (   ...)

The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environments.

In regular builds, this macro does nothing, but when processing sources files using the SBGen tool, the tool uses this to enumerate exportable classes and parses the arguments given to macro to customize the generated script code.

Parameter can be set using a key-value syntax like the following: key=value.

◆ CE_SWIFT_NAME

#define CE_SWIFT_NAME (   _name)

◆ CE_SWIFT_REFERENCE_TYPE

#define CE_SWIFT_REFERENCE_TYPE (   _retain,
  _release 
)

◆ CE_SWIFT_SAFE_TO_IMPORT

#define CE_SWIFT_SAFE_TO_IMPORT

◆ CE_SWIFT_SELF_CONTAINED

#define CE_SWIFT_SELF_CONTAINED

◆ CE_TOKENPASTE2

#define CE_TOKENPASTE2 (   x,
 
)    CE_TOKENPASTE2_(x, y)

◆ CE_TOKENPASTE2_

#define CE_TOKENPASTE2_ (   x,
 
)    x##y

◆ CE_TOKENPASTE3

#define CE_TOKENPASTE3 (   x,
  y,
 
)    CE_TOKENPASTE3_(x, y, z)

◆ CE_TOKENPASTE3_

#define CE_TOKENPASTE3_ (   x,
  y,
 
)    x##y##z

◆ CE_UNLIKELY

#define CE_UNLIKELY

◆ CE_UNREACHABLE

#define CE_UNREACHABLE   std::abort()

◆ CE_USES_ALLOCATOR

#define CE_USES_ALLOCATOR (   T)     template<typename Alloc> struct std::uses_allocator<T, Alloc> : std::true_type {}

◆ CE_VISIBLE

#define CE_VISIBLE   __attribute__((visibility("default")))

The CE_VISIBLE macro marks a symbol as visible in a binary.

◆ CEReflectable

#define CEReflectable (   ...)

The CEReflectable macro marks a class or method as reflectable and available in reflection environments.

In regular builds, this macro does nothing, but when processing sources files using the ReflGen tool, the tool uses this to enumerate reflectable classes and parses the arguments given to macro to customize the generated reflection description.

Parameter can be set using a key-value syntax like the following: key=value.

◆ FMT_CONSTEVAL

#define FMT_CONSTEVAL

◆ GLM_ENABLE_EXPERIMENTAL

#define GLM_ENABLE_EXPERIMENTAL

◆ GLM_FORCE_DEPTH_ZERO_TO_ONE

#define GLM_FORCE_DEPTH_ZERO_TO_ONE

◆ GLM_FORCE_RADIANS

#define GLM_FORCE_RADIANS