orx  stable
Portable Game Engine
OrxDebug

Macros

#define orxASSERT(TEST, ...)
 
#define orxBREAK()
 
#define orxDEBUG_ENABLE_LEVEL(LEVEL, ENABLE)   _orxDebug_EnableLevel(LEVEL, ENABLE)
 
#define orxDEBUG_EXIT()    _orxDebug_Exit()
 
#define orxDEBUG_GET_FLAGS()    _orxDebug_GetFlags()
 
#define orxDEBUG_INIT()
 
#define orxDEBUG_IS_LEVEL_ENABLED(LEVEL)    _orxDebug_IsLevelEnabled(LEVEL)
 
#define orxDEBUG_KS32_BUFFER_OUTPUT_SIZE   2048
 
#define orxDEBUG_KU32_STATIC_FLAG_CONSOLE   0x00000040
 
#define orxDEBUG_KU32_STATIC_FLAG_FILE   0x00000010
 
#define orxDEBUG_KU32_STATIC_FLAG_FULL_TIMESTAMP   0x00000002
 
#define orxDEBUG_KU32_STATIC_FLAG_NONE   0x00000000
 
#define orxDEBUG_KU32_STATIC_FLAG_TAGGED   0x00000008
 
#define orxDEBUG_KU32_STATIC_FLAG_TERMINAL   0x00000020
 
#define orxDEBUG_KU32_STATIC_FLAG_TIMESTAMP   0x00000001
 
#define orxDEBUG_KU32_STATIC_FLAG_TYPE   0x00000004
 
#define orxDEBUG_KU32_STATIC_MASK_DEBUG   0x0000003D
 
#define orxDEBUG_KU32_STATIC_MASK_DEFAULT   0x00000075
 
#define orxDEBUG_KU32_STATIC_MASK_USER_ALL   0x0FFFFFFF
 
#define orxDEBUG_KZ_DATE_FORMAT   orxANSI_KZ_COLOR_FG_CYAN "[%H:%M:%S]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_KZ_DATE_FULL_FORMAT   orxANSI_KZ_COLOR_FG_CYAN "[%Y-%m-%d %H:%M:%S]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_KZ_DEFAULT_DEBUG_FILE   "orx-debug.log"
 
#define orxDEBUG_KZ_DEFAULT_DEBUG_SUFFIX   "-debug.log"
 
#define orxDEBUG_KZ_DEFAULT_LOG_FILE   "orx.log"
 
#define orxDEBUG_KZ_DEFAULT_LOG_SUFFIX   ".log"
 
#define orxDEBUG_KZ_FILE_FORMAT   orxANSI_KZ_COLOR_FG_MAGENTA "[%s:%s(%u)]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_KZ_TYPE_ERROR_FORMAT   orxANSI_KZ_COLOR_FG_RED "[%s]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_KZ_TYPE_LOG_FORMAT   orxANSI_KZ_COLOR_FG_GREEN "[%s]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_KZ_TYPE_WARNING_FORMAT   orxANSI_KZ_COLOR_FG_YELLOW "[%s]" orxANSI_KZ_COLOR_RESET
 
#define orxDEBUG_PRINT(LEVEL, STRING, ...)
 
#define orxDEBUG_SET_FLAGS(SET, UNSET)    _orxDebug_SetFlags(SET, UNSET)
 
#define orxDEBUG_SETBASEFILENAME(FILE)
 
#define orxDEBUG_SETDEBUGFILE(FILE)
 
#define orxDEBUG_SETLOGFILE(FILE)    _orxDebug_SetLogFile(FILE)
 

Enumerations

enum  orxDEBUG_LEVEL {
  orxDEBUG_LEVEL_ANIM = 0, orxDEBUG_LEVEL_CONFIG, orxDEBUG_LEVEL_CLOCK, orxDEBUG_LEVEL_DISPLAY,
  orxDEBUG_LEVEL_FILE, orxDEBUG_LEVEL_INPUT, orxDEBUG_LEVEL_JOYSTICK, orxDEBUG_LEVEL_KEYBOARD,
  orxDEBUG_LEVEL_MEMORY, orxDEBUG_LEVEL_MOUSE, orxDEBUG_LEVEL_OBJECT, orxDEBUG_LEVEL_PARAM,
  orxDEBUG_LEVEL_PHYSICS, orxDEBUG_LEVEL_PLUGIN, orxDEBUG_LEVEL_PROFILER, orxDEBUG_LEVEL_RENDER,
  orxDEBUG_LEVEL_SCREENSHOT, orxDEBUG_LEVEL_SOUND, orxDEBUG_LEVEL_SYSTEM, orxDEBUG_LEVEL_TIMER,
  orxDEBUG_LEVEL_LOG, orxDEBUG_LEVEL_ASSERT, orxDEBUG_LEVEL_USER, orxDEBUG_LEVEL_NUMBER,
  orxDEBUG_LEVEL_MAX_NUMBER = 32, orxDEBUG_LEVEL_ALL = 0xFFFFFFFE, orxDEBUG_LEVEL_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI void orxFASTCALL _orxDebug_Break ()
 
orxDLLAPI void orxFASTCALL _orxDebug_EnableLevel (orxDEBUG_LEVEL _eLevel, orxBOOL _bEnable)
 
orxDLLAPI void orxFASTCALL _orxDebug_Exit ()
 
orxDLLAPI orxU32 orxFASTCALL _orxDebug_GetFlags ()
 
orxDLLAPI orxSTATUS orxFASTCALL _orxDebug_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL _orxDebug_IsLevelEnabled (orxDEBUG_LEVEL _eLevel)
 
orxDLLAPI void orxCDECL _orxDebug_Log (orxDEBUG_LEVEL _eLevel, const orxSTRING _zFunction, const orxSTRING _zFile, orxU32 _u32Line, const orxSTRING _zFormat,...)
 
orxDLLAPI void orxFASTCALL _orxDebug_SetDebugFile (const orxSTRING _zFileName)
 
orxDLLAPI void orxFASTCALL _orxDebug_SetFlags (orxU32 _u32Add, orxU32 _u32Remove)
 
orxDLLAPI void orxFASTCALL _orxDebug_SetLogFile (const orxSTRING _zFileName)
 

Detailed Description

Debug module Module used to output debug info and assert code

Macro Definition Documentation

#define orxASSERT (   TEST,
  ... 
)

Definition at line 298 of file orxDebug.h.

#define orxBREAK ( )

Definition at line 281 of file orxDebug.h.

#define orxDEBUG_ENABLE_LEVEL (   LEVEL,
  ENABLE 
)    _orxDebug_EnableLevel(LEVEL, ENABLE)

Definition at line 283 of file orxDebug.h.

#define orxDEBUG_EXIT ( )    _orxDebug_Exit()

Definition at line 202 of file orxDebug.h.

#define orxDEBUG_GET_FLAGS ( )    _orxDebug_GetFlags()

Definition at line 301 of file orxDebug.h.

#define orxDEBUG_INIT ( )
Value:
do \
{ \
orxU32 u32DebugFlags; \
u32DebugFlags = _orxDebug_GetFlags(); \
{ \
orxLOG("The version of the runtime library [" orxANSI_KZ_COLOR_FG_GREEN "%s" \
orxANSI_KZ_COLOR_FG_DEFAULT orxANSI_KZ_COLOR_BLINK_OFF " than the version used when compiling this program [" \
orxANSI_KZ_COLOR_FG_RED orxANSI_KZ_COLOR_BLINK_ON " Problems will likely ensue!", \
} \
{ \
orxLOG("The version of the runtime library [" orxANSI_KZ_COLOR_FG_GREEN "%s" \
orxANSI_KZ_COLOR_FG_DEFAULT orxANSI_KZ_COLOR_BLINK_OFF " than the version used when compiling this program [" \
orxANSI_KZ_COLOR_FG_YELLOW orxANSI_KZ_COLOR_BLINK_ON " Problems may arise due to possible incompatibilities!",\
} \
} \
while(orxFALSE)
#define __orxVERSION_FULL_STRING__
Definition: orxVersion.h:71
#define orxANSI_KZ_COLOR_BLINK_ON
Definition: orxDecl.h:459
#define orxANSI_KZ_COLOR_FG_DEFAULT
Definition: orxDecl.h:478
#define orxANSI_KZ_COLOR_BLINK_OFF
Definition: orxDecl.h:466
#define orxANSI_KZ_COLOR_FG_RED
Definition: orxDecl.h:471
#define orxFALSE
Definition: orxType.h:185
#define orxANSI_KZ_COLOR_FG_GREEN
Definition: orxDecl.h:472
#define orxDEBUG_KU32_STATIC_MASK_USER_ALL
Definition: orxDebug.h:68
orxDLLAPI orxU32 orxFASTCALL orxSystem_GetVersionNumeric()
#define __orxVERSION__
Definition: orxVersion.h:80
orxDLLAPI orxSTATUS orxFASTCALL _orxDebug_Init()
orxDLLAPI orxU32 orxFASTCALL _orxDebug_GetFlags()
#define orxDEBUG_KU32_STATIC_MASK_DEBUG
Definition: orxDebug.h:66
orxDLLAPI void orxFASTCALL _orxDebug_SetFlags(orxU32 _u32Add, orxU32 _u32Remove)
orxDLLAPI const orxSTRING orxFASTCALL orxSystem_GetVersionFullString()
#define orxANSI_KZ_COLOR_FG_YELLOW
Definition: orxDecl.h:473

Definition at line 174 of file orxDebug.h.

#define orxDEBUG_IS_LEVEL_ENABLED (   LEVEL)    _orxDebug_IsLevelEnabled(LEVEL)

Definition at line 284 of file orxDebug.h.

#define orxDEBUG_KS32_BUFFER_OUTPUT_SIZE   2048

Definition at line 311 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_CONSOLE   0x00000040

Definition at line 62 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_FILE   0x00000010

Definition at line 60 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_FULL_TIMESTAMP   0x00000002

Definition at line 56 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_NONE   0x00000000

Definition at line 53 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_TAGGED   0x00000008

Definition at line 58 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_TERMINAL   0x00000020

Definition at line 61 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_TIMESTAMP   0x00000001

Definition at line 55 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_TYPE   0x00000004

Definition at line 57 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_MASK_DEBUG   0x0000003D

Definition at line 66 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_MASK_DEFAULT   0x00000075

Definition at line 64 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_MASK_USER_ALL   0x0FFFFFFF

Definition at line 68 of file orxDebug.h.

#define orxDEBUG_KZ_DATE_FORMAT   orxANSI_KZ_COLOR_FG_CYAN "[%H:%M:%S]" orxANSI_KZ_COLOR_RESET

Definition at line 313 of file orxDebug.h.

#define orxDEBUG_KZ_DATE_FULL_FORMAT   orxANSI_KZ_COLOR_FG_CYAN "[%Y-%m-%d %H:%M:%S]" orxANSI_KZ_COLOR_RESET

Definition at line 314 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_DEBUG_FILE   "orx-debug.log"

Definition at line 73 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_DEBUG_SUFFIX   "-debug.log"

Definition at line 76 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_LOG_FILE   "orx.log"

Definition at line 74 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_LOG_SUFFIX   ".log"

Definition at line 75 of file orxDebug.h.

#define orxDEBUG_KZ_FILE_FORMAT   orxANSI_KZ_COLOR_FG_MAGENTA "[%s:%s(%u)]" orxANSI_KZ_COLOR_RESET

Definition at line 320 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_ERROR_FORMAT   orxANSI_KZ_COLOR_FG_RED "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 318 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_LOG_FORMAT   orxANSI_KZ_COLOR_FG_GREEN "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 316 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_WARNING_FORMAT   orxANSI_KZ_COLOR_FG_YELLOW "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 317 of file orxDebug.h.

#define orxDEBUG_PRINT (   LEVEL,
  STRING,
  ... 
)

Definition at line 279 of file orxDebug.h.

#define orxDEBUG_SET_FLAGS (   SET,
  UNSET 
)    _orxDebug_SetFlags(SET, UNSET)

Definition at line 300 of file orxDebug.h.

#define orxDEBUG_SETBASEFILENAME (   FILE)
Value:
do \
{ \
orxCHAR zBuffer[256]; \
zBuffer[255] = orxCHAR_NULL; \
strncpy(zBuffer, FILE, 255); \
strncat(zBuffer, orxDEBUG_KZ_DEFAULT_LOG_SUFFIX, 255); \
_orxDebug_SetLogFile(zBuffer); \
} while(orxFALSE)
#define orxDEBUG_KZ_DEFAULT_LOG_SUFFIX
Definition: orxDebug.h:75
#define orxFALSE
Definition: orxType.h:185
#define orxCHAR_NULL
Definition: orxType.h:214

Definition at line 288 of file orxDebug.h.

#define orxDEBUG_SETDEBUGFILE (   FILE)

Definition at line 286 of file orxDebug.h.

#define orxDEBUG_SETLOGFILE (   FILE)    _orxDebug_SetLogFile(FILE)

Definition at line 287 of file orxDebug.h.

Enumeration Type Documentation

Enumerator
orxDEBUG_LEVEL_ANIM 

Anim Debug

orxDEBUG_LEVEL_CONFIG 

Config Debug

orxDEBUG_LEVEL_CLOCK 

Clock Debug

orxDEBUG_LEVEL_DISPLAY 

Display Debug

orxDEBUG_LEVEL_FILE 

File Debug

orxDEBUG_LEVEL_INPUT 

Input Debug

orxDEBUG_LEVEL_JOYSTICK 

Joystick Debug

orxDEBUG_LEVEL_KEYBOARD 

Keyboard Debug

orxDEBUG_LEVEL_MEMORY 

Memory Debug

orxDEBUG_LEVEL_MOUSE 

Mouse Debug

orxDEBUG_LEVEL_OBJECT 

Object Debug

orxDEBUG_LEVEL_PARAM 

Param Debug

orxDEBUG_LEVEL_PHYSICS 

Physics Debug

orxDEBUG_LEVEL_PLUGIN 

Plug-in Debug

orxDEBUG_LEVEL_PROFILER 

Profiler Debug

orxDEBUG_LEVEL_RENDER 

Render Debug

orxDEBUG_LEVEL_SCREENSHOT 

Screenshot Debug

orxDEBUG_LEVEL_SOUND 

Sound Debug

orxDEBUG_LEVEL_SYSTEM 

System Debug

orxDEBUG_LEVEL_TIMER 

Timer Debug

orxDEBUG_LEVEL_LOG 

Log Debug

orxDEBUG_LEVEL_ASSERT 

Assert Debug

orxDEBUG_LEVEL_USER 

User Debug

orxDEBUG_LEVEL_NUMBER 
orxDEBUG_LEVEL_MAX_NUMBER 
orxDEBUG_LEVEL_ALL 

All Debugs

orxDEBUG_LEVEL_NONE 

Definition at line 326 of file orxDebug.h.

Function Documentation

orxDLLAPI void orxFASTCALL _orxDebug_Break ( )

Software break function

orxDLLAPI void orxFASTCALL _orxDebug_EnableLevel ( orxDEBUG_LEVEL  _eLevel,
orxBOOL  _bEnable 
)

Enables/disables a given log level

Parameters
[in]_eLevelDebug level to enable/disable
[in]_bEnableEnable / disable
orxDLLAPI void orxFASTCALL _orxDebug_Exit ( )

Exits from the debug module

orxDLLAPI orxU32 orxFASTCALL _orxDebug_GetFlags ( )

Gets current debug flags

Returns
Current debug flags
orxDLLAPI orxSTATUS orxFASTCALL _orxDebug_Init ( )

Inits the debug module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE
orxDLLAPI orxBOOL orxFASTCALL _orxDebug_IsLevelEnabled ( orxDEBUG_LEVEL  _eLevel)

Is a given log level enabled?

Parameters
[in]_eLevelConcerned debug level
orxDLLAPI void orxCDECL _orxDebug_Log ( orxDEBUG_LEVEL  _eLevel,
const orxSTRING  _zFunction,
const orxSTRING  _zFile,
orxU32  _u32Line,
const orxSTRING  _zFormat,
  ... 
)

Logs given debug text

Parameters
[in]_eLevelDebug level associated with this output
[in]_zFunctionCalling function name
[in]_zFileCalling file name
[in]_u32LineCalling file line
[in]_zFormatPrintf formatted text
orxDLLAPI void orxFASTCALL _orxDebug_SetDebugFile ( const orxSTRING  _zFileName)

Sets debug file name

Parameters
[in]_zFileNameDebug file name
orxDLLAPI void orxFASTCALL _orxDebug_SetFlags ( orxU32  _u32Add,
orxU32  _u32Remove 
)

Sets current debug flags

Parameters
[in]_u32AddFlags to add
[in]_u32RemoveFlags to remove
orxDLLAPI void orxFASTCALL _orxDebug_SetLogFile ( const orxSTRING  _zFileName)

Sets log file name

Parameters
[in]_zFileNameLog file name

Generated for orx by doxygen 1.5.6