Debug.hpp File Reference

Debug reporting functions and macros. More...


Namespaces

namespace  Core

Defines

#define ASSERT(x)   if (x) {} else Core::AssertFail((#x), __FILE__, __LINE__)
 Evaluate the expression, and complain if 'false'.
#define ASSERT_FALSE()   Core::AssertFail("FALSE", __FILE__, __LINE__)
 Always fail.
#define TRACE(x)   Core::TraceEx(x)
#define TRACE1(x, a)   Core::TraceEx(x, a)
#define TRACE2(x, a, b)   Core::TraceEx(x, a, b)
#define TRACE3(x, a, b, c)   Core::TraceEx(x, a, b, c)
#define TRACE4(x, a, b, c, d)   Core::TraceEx(x, a, b, c, d)
#define TRACE5(x, a, b, c, d, e)   Core::TraceEx(x, a, b, c, d, e)
#define DBGCRT_NEW   new(_NORMAL_BLOCK, __FILE__, __LINE__)
 Map calls to 'new' to the debug version and track the file and line number.
#define new   DBGCRT_NEW
 Enable tracking of 'new' calls by default.
#define DEBUG_USE_ONLY(x)
 Mark a variable as only used in debug to avoid 'unreferenced variable' warnings.
#define STATIC_ASSERT(x)   short static_assert##__LINE__[(x) ? 1 : -1];static_assert##__LINE__
 Compile time ASSERT.

Functions

void Core::EnableLeakReporting (bool bEnable)
 Enable or disable memory leak reporting.
void Core::DebugWrite (const tchar *pszFormat,...)
 Write a message to the debugger stream in both Debug and Release builds.
void Core::AssertFail (const char *pszExpression, const char *pszFile, uint nLine)
 The function invoked when an ASSERT fails.
void Core::TraceEx (const tchar *pszFormat,...)
 Function to write a message to the debugger output.


Detailed Description

Debug reporting functions and macros.

Author:
Chris Oldwood

Define Documentation

#define ASSERT (  )     if (x) {} else Core::AssertFail((#x), __FILE__, __LINE__)

Evaluate the expression, and complain if 'false'.

 
#define ASSERT_FALSE (  )     Core::AssertFail("FALSE", __FILE__, __LINE__)

Always fail.

#define TRACE (  )     Core::TraceEx(x)

#define TRACE1 ( x,
 )     Core::TraceEx(x, a)

#define TRACE2 ( x,
a,
 )     Core::TraceEx(x, a, b)

#define TRACE3 ( x,
a,
b,
 )     Core::TraceEx(x, a, b, c)

#define TRACE4 ( x,
a,
b,
c,
 )     Core::TraceEx(x, a, b, c, d)

#define TRACE5 ( x,
a,
b,
c,
d,
 )     Core::TraceEx(x, a, b, c, d, e)

#define DBGCRT_NEW   new(_NORMAL_BLOCK, __FILE__, __LINE__)

Map calls to 'new' to the debug version and track the file and line number.

#define new   DBGCRT_NEW

Enable tracking of 'new' calls by default.

#define DEBUG_USE_ONLY (  ) 

Mark a variable as only used in debug to avoid 'unreferenced variable' warnings.

#define STATIC_ASSERT (  )     short static_assert##__LINE__[(x) ? 1 : -1];static_assert##__LINE__

Compile time ASSERT.


Generated on Wed Feb 13 22:53:28 2008 for Core Library by  doxygen 1.5.2