NW4F G3d
Loading...
Searching...
No Matches
g3d_assert.h File Reference

Go to the source code of this file.

Namespaces

namespace  nw
namespace  nw::g3d

Macros

#define NW_G3D_ASSERTMSG(exp, ...)
#define NW_G3D_ASSERT(exp)
#define NW_G3D_ASSERT_NOT_NULL(exp)
#define NW_G3D_ASSERT_INDEX_BOUNDS(index, size)
#define NW_G3D_ASSERT_ALIGNMENT(value, alignment)
#define NW_G3D_ASSERT_ADDR_ALIGNMENT(addr, alignment)
#define NW_G3D_NOT_IMPLEMENTED()
#define NW_G3D_NOT_SUPPORTED()
#define NW_G3D_WARNING(exp, ...)
#define NW_G3D_DEBUG_BREAK()

Functions

void nw::g3d::DebugPrint (const char *format,...)

Macro Definition Documentation

◆ NW_G3D_ASSERTMSG

#define NW_G3D_ASSERTMSG ( exp,
... )
Value:
((void)0)

◆ NW_G3D_ASSERT

#define NW_G3D_ASSERT ( exp)
Value:
NW_G3D_ASSERTMSG((exp), "NW: Failed assertion. " #exp "\n")
#define NW_G3D_ASSERTMSG(exp,...)
Definition g3d_assert.h:13

◆ NW_G3D_ASSERT_NOT_NULL

#define NW_G3D_ASSERT_NOT_NULL ( exp)
Value:
NW_G3D_ASSERTMSG((exp) != NULL, "NW: Pointer must not be NULL. ("#exp")\n")

◆ NW_G3D_ASSERT_INDEX_BOUNDS

#define NW_G3D_ASSERT_INDEX_BOUNDS ( index,
size )
Value:
NW_G3D_ASSERTMSG(static_cast<uint>(index) < static_cast<uint>(size), \
"NW: " #index " is out of bounds. (%d)\n" \
"0 <= " #index " < %d is not satisfied.\n", \
static_cast<int>(index), static_cast<int>(size))
unsigned int uint
Definition g3d_defs.h:134

◆ NW_G3D_ASSERT_ALIGNMENT

#define NW_G3D_ASSERT_ALIGNMENT ( value,
alignment )
Value:
NW_G3D_ASSERTMSG(static_cast<uint>((value) & (alignment - 1)) == 0, \
"NW: Failed alignment. \n" \
"value: 0x%x\n" \
"alignment: %d\n", \
value, static_cast<int>(alignment))

◆ NW_G3D_ASSERT_ADDR_ALIGNMENT

#define NW_G3D_ASSERT_ADDR_ALIGNMENT ( addr,
alignment )
Value:
NW_G3D_ASSERTMSG((reinterpret_cast<uintptr_t>(addr) & (alignment - 1)) == 0, \
"NW: Failed alignment. \n" \
"ptr: 0x%x\n" \
"alignment: %d\n", \
reinterpret_cast<uintptr_t>(addr), static_cast<int>(alignment))

◆ NW_G3D_NOT_IMPLEMENTED

#define NW_G3D_NOT_IMPLEMENTED ( )
Value:
NW_G3D_ASSERTMSG(0, "NW: Not implemented yet.\n")

◆ NW_G3D_NOT_SUPPORTED

#define NW_G3D_NOT_SUPPORTED ( )
Value:
NW_G3D_ASSERTMSG(0, "NW: Not supported.\n")

◆ NW_G3D_WARNING

#define NW_G3D_WARNING ( exp,
... )
Value:
((void)0)

◆ NW_G3D_DEBUG_BREAK

#define NW_G3D_DEBUG_BREAK ( )