co_ecs 0.9.0
Cobalt ECS
Loading...
Searching...
No Matches
macro.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace co_ecs::detail {
4#if defined __clang__
5#define CO_ECS_PRETTY_FUNCTION __PRETTY_FUNCTION__
6constexpr auto PrettyFunctionPrefix = '=';
7constexpr auto prettyFunctionSuffix = ']';
8#elif defined __GNUC__
9#define CO_ECS_PRETTY_FUNCTION __PRETTY_FUNCTION__
10constexpr auto PrettyFunctionPrefix = '=';
11constexpr auto prettyFunctionSuffix = ';';
12#elif defined _MSC_VER
13#define CO_ECS_PRETTY_FUNCTION __FUNCSIG__
14constexpr auto PrettyFunctionPrefix = '<';
15constexpr auto prettyFunctionSuffix = '>';
16#endif
17} // namespace co_ecs::detail
18
19#ifndef CO_ECS_EXPORT
20#if defined _WIN32 || defined __CYGWIN__ || defined _MSC_VER
21#define CO_ECS_EXPORT __declspec(dllexport)
22#define CO_ECS_IMPORT __declspec(dllimport)
23#define CO_ECS_HIDDEN
24#elif defined __GNUC__ && __GNUC__ >= 4
25#define CO_ECS_EXPORT __attribute__((visibility("default")))
26#define CO_ECS_IMPORT __attribute__((visibility("default")))
27#define CO_ECS_HIDDEN __attribute__((visibility("hidden")))
28#else // Unsupported compiler
29#define CO_ECS_EXPORT
30#define CO_ECS_IMPORT
31#define CO_ECS_HIDDEN
32#endif
33#endif
34
35#ifndef CO_ECS_API
36#if defined CO_ECS_HOST
37#define CO_ECS_API CO_ECS_EXPORT
38#elif defined CO_ECS_CLIENT
39#define CO_ECS_API CO_ECS_IMPORT
40#else // No API
41#define CO_ECS_API
42#endif
43#endif
Definition component.hpp:17