#include "w_defines.h"
#include "w_workaround.h"
#include "w_fill.h"
#include "w_error.h"
#include "w_rc.h"
Go to the source code of this file.
§ ALIGN_BYTE
§ alignon
aligns a pointer p on a size a
§ ALIGNON
§ ALIGNON1
§ alignonarg
| #define alignonarg |
( |
|
a | ) |
(((ptrdiff_t)(a))-1) |
§ ASSERT_FITS_IN_LONGLONG
| #define ASSERT_FITS_IN_LONGLONG |
( |
|
T | ) |
|
§ ASSERT_FITS_IN_POINTER
| #define ASSERT_FITS_IN_POINTER |
( |
|
T | ) |
|
§ CAST
| #define CAST |
( |
|
t, |
|
|
|
o |
|
) |
| ((t)(o)) |
§ W_ADDR
| #define W_ADDR |
( |
|
x | ) |
((void *)(x)) |
Cast to treat a pointer as a non-(char *) value.
This is used when a operator<< is used on a pointer. Without this cast, some values would bind to 'char *' and attempt to print a string, rather than printing the desired pointer value.
§ w_assert0
Value:do { \
if (!(x))
w_base_t::assert_failed(
#x, __FILE__, __LINE__); \} while(0)
Default assert/debug level is 0.
§ w_assert0_msg
| #define w_assert0_msg |
( |
|
x, |
|
|
|
msg |
|
) |
| |
Value:do { \
if(!(x)) { \
std::stringstream s; \
s << #x ; \
s <<
" (detail: " << msg <<
")";
\ } \
}while(0) \
static void assert_failed(const char *desc, const char *file, uint32_t line)
print a message and abort
Definition: w_base.cpp:124
§ w_assert1
| #define w_assert1 |
( |
|
x | ) |
if (false) { (void)(x); } |
Level 1 should not add significant extra time.
§ w_assert2
| #define w_assert2 |
( |
|
x | ) |
if (false) { (void)(x); } |
§ w_assert3
| #define w_assert3 |
( |
|
x | ) |
if (false) { (void)(x); } |
Level 3 definitely adds significant time.
§ w_assert4
| #define w_assert4 |
( |
|
x | ) |
if (false) { (void)(x); } |
§ w_assert5
| #define w_assert5 |
( |
|
x | ) |
if (false) { (void)(x); } |
§ w_assert9
| #define w_assert9 |
( |
|
x | ) |
if (false) { (void)(x); } |
changing an assert to an assert9 turns it off.
§ W_DEBUG_LEVEL
§ W_ENUM
| #define W_ENUM |
( |
|
x | ) |
((int)(x)) |
Cast to treat an enum as integer value.
This is used when a operator<< doesn't exist for the enum. The use of the macro indicates that this enum would be printed if it had a printer, rather than wanting the integer value of the enum
§ W_IFDEBUG
§ W_IFDEBUG1
§ W_IFDEBUG2
§ W_IFDEBUG3
§ W_IFDEBUG4
§ W_IFDEBUG5
§ W_IFDEBUG9
§ W_IFNDEBUG
| #define W_IFNDEBUG |
( |
|
x | ) |
x |
§ W_IFNDEBUG1
| #define W_IFNDEBUG1 |
( |
|
x | ) |
x |
§ W_IFNDEBUG2
| #define W_IFNDEBUG2 |
( |
|
x | ) |
x |
§ W_IFNDEBUG3
| #define W_IFNDEBUG3 |
( |
|
x | ) |
x |
§ W_IFNDEBUG4
| #define W_IFNDEBUG4 |
( |
|
x | ) |
x |
§ W_IFNDEBUG5
| #define W_IFNDEBUG5 |
( |
|
x | ) |
x |
§ W_IFNDEBUG9
| #define W_IFNDEBUG9 |
( |
|
x | ) |
x |
§ W_IFNTRACE
| #define W_IFNTRACE |
( |
|
x | ) |
x |
§ W_IFTRACE
§ W_UNUSED