8 #include <unordered_map>
16 #define ai_log(...) ai::Log::info(__VA_ARGS__)
23 #define ai_log_error(...) ai::Log::error(__VA_ARGS__)
30 #define ai_log_warn(...) ai::Log::warn(__VA_ARGS__)
37 #define ai_log_debug(...) ai::Log::debug(__VA_ARGS__)
44 #define ai_log_trace(...) ai::Log::trace(__VA_ARGS__)
47 #if !(__GNUC__ || __GNUC__)
48 #define __PRETTY_FUNCTION__ __FUNCSIG__
54 #ifndef ai_assert_always
55 #ifdef __clang_analyzer__
56 #define ai_assert_always(condition, ...) assert(condition)
58 #define ai_assert_always(condition, ...) \
59 if ( !(condition) ) { \
60 ai_log_error(__VA_ARGS__); \
61 ai_log_error("%s:%i", __FILE__, __LINE__); \
73 #define ai_assert ai_assert_always
75 #define ai_assert(condition, ...)
83 template<
class T,
class S>
86 ai_assert(dynamic_cast<T>(
object) == static_cast<T>(
object),
"Types don't match");
88 return static_cast<T
>(object);
91 #define AI_STRINGIFY_INTERNAL(x) #x
92 #define AI_STRINGIFY(x) AI_STRINGIFY_INTERNAL(x)
99 #define AI_EXCEPTIONS 0
105 #ifndef AI_LUA_SANTITY
106 #define AI_LUA_SANTITY 1
110 # ifdef SIMPLEAI_EXPORT
111 # define SIMPLEAI_LIB __declspec(dllexport)
112 # elif defined(SIMPLEAI_IMPORT)
113 # define SIMPLEAI_LIB __declspec(dllimport)
115 # define SIMPLEAI_LIB
118 # define SIMPLEAI_LIB
129 typedef int CharacterId;
130 #define PRIChrId PRId32
135 typedef std::unordered_map<std::string, std::string> CharacterAttributes;
#define ai_assert(condition,...)
Provide your own assert - this is only executed in DEBUG mode.
Definition: Types.h:75
T ai_assert_cast(const S object)
If you compile with RTTI activated, you get additional sanity checks when using this macro to perform...
Definition: Types.h:84