Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
debug_macro.h File Reference

Go to the source code of this file.

Classes

struct  _Debug::StaticAssertionFailed< true >
 
struct  _Debug::StaticAssertionTest< x >
 

Namespaces

namespace  _Debug
 

Macros

#define DEBUG_MACRO_H
 
#define DASSERT(expr)
 
#define DASSERT_MSG(expr, msg)
 
#define DCHECK(expr)
 
#define DCHECK_MSG(expr, msg)
 
#define DFAIL_IF(cond)
 
#define DFAIL_IF_MSG(cond, msg)
 
#define DLOG(what)
 
#define DLOG_DESCR(descr)
 
#define DLOG_GROUP(group, what)
 
#define DLOG_GROUP_DESCR(g, d)
 
#define DCRASH(msg)
 
#define DCRASH_RELEASE(msg)
 
#define DFAIL()
 
#define D_ISLOG()
 
#define D_ISLOG_GROUP(group)
 
#define DCTASSERT(expr)
 
#define STRING_IT(a)
 
#define TOKEN_IT(a)
 
#define MESSAGE(a)
 

Macro Definition Documentation

◆ D_ISLOG

#define D_ISLOG ( )
Value:
false

Definition at line 357 of file debug_macro.h.

◆ D_ISLOG_GROUP

#define D_ISLOG_GROUP ( group)
Value:
false

Definition at line 358 of file debug_macro.h.

◆ DASSERT

#define DASSERT ( expr)
Value:
((void)0)

Definition at line 344 of file debug_macro.h.

◆ DASSERT_MSG

#define DASSERT_MSG ( expr,
msg )
Value:
((void)0)

Definition at line 345 of file debug_macro.h.

◆ DCHECK

#define DCHECK ( expr)
Value:
(expr)

Definition at line 346 of file debug_macro.h.

◆ DCHECK_MSG

#define DCHECK_MSG ( expr,
msg )
Value:
(expr)

Definition at line 347 of file debug_macro.h.

◆ DCRASH

#define DCRASH ( msg)
Value:
((void)0)

Definition at line 354 of file debug_macro.h.

◆ DCRASH_RELEASE

#define DCRASH_RELEASE ( msg)
Value:
(Debug::SkipNext(),(Debug::CrashBegin(NULL,0) << msg).CrashDone(true))
#define NULL
Definition BaseType.h:92
static Debug & CrashBegin(const char *file, int line)
static bool SkipNext(void)
MSG msg
Definition patch.cpp:409

Definition at line 355 of file debug_macro.h.

◆ DCTASSERT

#define DCTASSERT ( expr)
Value:

Definition at line 369 of file debug_macro.h.

◆ DEBUG_MACRO_H

#define DEBUG_MACRO_H

Definition at line 33 of file debug_macro.h.

◆ DFAIL

#define DFAIL ( )
Value:
((void)0)

Definition at line 356 of file debug_macro.h.

◆ DFAIL_IF

#define DFAIL_IF ( cond)
Value:
if (cond)

Definition at line 348 of file debug_macro.h.

◆ DFAIL_IF_MSG

#define DFAIL_IF_MSG ( cond,
msg )
Value:
if (cond)

Definition at line 349 of file debug_macro.h.

◆ DLOG

#define DLOG ( what)
Value:
((void)0)

Definition at line 350 of file debug_macro.h.

◆ DLOG_DESCR

#define DLOG_DESCR ( descr)

Definition at line 351 of file debug_macro.h.

◆ DLOG_GROUP

#define DLOG_GROUP ( group,
what )
Value:
((void)0)

Definition at line 352 of file debug_macro.h.

◆ DLOG_GROUP_DESCR

#define DLOG_GROUP_DESCR ( g,
d )

Definition at line 353 of file debug_macro.h.

◆ MESSAGE

#define MESSAGE ( a)
Value:
message (__FILE__ "(" TOKEN_IT(__LINE__) ") : " a)
#define TOKEN_IT(a)
Definition Debug.h:69

The macro MESSAGE allows user to put:

#pragma MESSAGE("Hello world")

anywhere in a source file. The message:

sourcefname.cpp (123) : Hello world

would be printed if put in sourcefname.cpp on line 123 in compile window like an error. You can then use next/prev error hot keys to see where comment is. It is not an error and will be printed everytime it is compiled. Very useful to put comments in code that cannot be forgotten.

Definition at line 392 of file debug_macro.h.

◆ STRING_IT

#define STRING_IT ( a)
Value:
#a

Definition at line 375 of file debug_macro.h.

◆ TOKEN_IT

#define TOKEN_IT ( a)
Value:
STRING_IT(,##a)
#define STRING_IT(a)
Definition Debug.h:68

Definition at line 376 of file debug_macro.h.