Doxygen Samurai Engine 0.0.1
Doxygen Samurai Engine Documentation
Loading...
Searching...
No Matches
assert.h
Go to the documentation of this file.
1#pragma once
2#include <Config.h>
3
4
5namespace samurai
6{
7
8 namespace assert
9 {
10
11 //arguments don't do anything here
12 inline void terminate(...);
13
15 const char *expression,
16 const char *file,
17 int line,
18 const char *comment = nullptr);
19
21 (
22 const char *expression,
23 const char *file,
24 int line,
25 const char *comment = nullptr
26 );
27
29 const char *expression,
30 const char *file,
31 int line,
32 const char *comment = nullptr);
33
34 }
35
36}
37
38
39
40#define SAMURAI_ASSERT(expression, comment) (void)( \
41 (!!(expression)) || \
42 (SAMURAI_INTERNAL_CURRENT_ASSERT_FUNCTION(#expression, \
43 __FILE__, __LINE__, comment), 0) \
44)
45
46
47#ifdef SAMURAI_DEVELOPMENT
48
49#define SAMURAI_DEVELOPMENT_ONLY_ASSERT(expression, comment) (void)( \
50 (!!(expression)) || \
51 (samurai::assert::assertFunctionDevelopment(#expression, \
52 __FILE__, __LINE__, comment), 0) \
53)
54
55
56#endif
void terminate(...)
void assertFunctionDevelopment(const char *expression, const char *file, int line, const char *comment=nullptr)
void assertFunctionProduction(const char *expression, const char *file, int line, const char *comment=nullptr)
void assertFunctionToLog(const char *expression, const char *file, int line, const char *comment=nullptr)