orx  1.14
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_CALLBACK   0x00000080
 
#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   0x000000BD
 
#define orxDEBUG_KU32_STATIC_MASK_DEFAULT   0x000000F5
 
#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_SET_LOG_CALLBACK(CALLBACK)   _orxDebug_SetLogCallback(CALLBACK)
 
#define orxDEBUG_SETBASEFILENAME(FILE)
 
#define orxDEBUG_SETDEBUGFILE(FILE)
 
#define orxDEBUG_SETLOGFILE(FILE)    _orxDebug_SetLogFile(FILE)
 

Typedefs

typedef orxSTATUS(orxFASTCALL * orxDEBUG_CALLBACK_FUNCTION) (orxDEBUG_LEVEL _eLevel, const orxSTRING _zFunction, const orxSTRING _zFile, orxU32 _u32Line, const orxSTRING _zLog)
 

Enumerations

enum  orxDEBUG_LEVEL {
  orxDEBUG_LEVEL_ANIM = 0, orxDEBUG_LEVEL_CLOCK, orxDEBUG_LEVEL_COMMAND, orxDEBUG_LEVEL_CONFIG,
  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_SetLogCallback (const orxDEBUG_CALLBACK_FUNCTION _pfnLogCallback)
 
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 372 of file orxDebug.h.

#define orxBREAK ( )

Definition at line 349 of file orxDebug.h.

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

Definition at line 340 of file orxDebug.h.

#define orxDEBUG_EXIT ( )    _orxDebug_Exit()

Definition at line 249 of file orxDebug.h.

#define orxDEBUG_GET_FLAGS ( )    _orxDebug_GetFlags()

Definition at line 344 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:443
#define orxANSI_KZ_COLOR_FG_DEFAULT
Definition: orxDecl.h:462
#define orxANSI_KZ_COLOR_BLINK_OFF
Definition: orxDecl.h:450
#define orxANSI_KZ_COLOR_FG_RED
Definition: orxDecl.h:455
#define orxFALSE
Definition: orxType.h:197
#define orxANSI_KZ_COLOR_FG_GREEN
Definition: orxDecl.h:456
#define orxDEBUG_KU32_STATIC_MASK_USER_ALL
Definition: orxDebug.h:69
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:67
orxDLLAPI void orxFASTCALL _orxDebug_SetFlags(orxU32 _u32Add, orxU32 _u32Remove)
orxDLLAPI const orxSTRING orxFASTCALL orxSystem_GetVersionFullString()
#define orxANSI_KZ_COLOR_FG_YELLOW
Definition: orxDecl.h:457

Definition at line 221 of file orxDebug.h.

#define orxDEBUG_IS_LEVEL_ENABLED (   LEVEL)    _orxDebug_IsLevelEnabled(LEVEL)

Definition at line 341 of file orxDebug.h.

#define orxDEBUG_KS32_BUFFER_OUTPUT_SIZE   2048

Definition at line 382 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_FLAG_CALLBACK   0x00000080

Definition at line 63 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   0x000000BD

Definition at line 67 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_MASK_DEFAULT   0x000000F5

Definition at line 65 of file orxDebug.h.

#define orxDEBUG_KU32_STATIC_MASK_USER_ALL   0x0FFFFFFF

Definition at line 69 of file orxDebug.h.

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

Definition at line 384 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 385 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_DEBUG_FILE   "orx-debug.log"

Definition at line 74 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_DEBUG_SUFFIX   "-debug.log"

Definition at line 77 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_LOG_FILE   "orx.log"

Definition at line 75 of file orxDebug.h.

#define orxDEBUG_KZ_DEFAULT_LOG_SUFFIX   ".log"

Definition at line 76 of file orxDebug.h.

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

Definition at line 391 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_ERROR_FORMAT   orxANSI_KZ_COLOR_FG_RED "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 389 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_LOG_FORMAT   orxANSI_KZ_COLOR_FG_GREEN "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 387 of file orxDebug.h.

#define orxDEBUG_KZ_TYPE_WARNING_FORMAT   orxANSI_KZ_COLOR_FG_YELLOW "[%s]" orxANSI_KZ_COLOR_RESET

Definition at line 388 of file orxDebug.h.

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

Definition at line 338 of file orxDebug.h.

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

Definition at line 343 of file orxDebug.h.

#define orxDEBUG_SET_LOG_CALLBACK (   CALLBACK)    _orxDebug_SetLogCallback(CALLBACK)

Definition at line 346 of file orxDebug.h.

#define orxDEBUG_SETBASEFILENAME (   FILE)
Value:
do \
{ \
if((FILE != orxNULL) && (FILE != orxSTRING_EMPTY)) \
{ \
orxCHAR zBuffer[512]; \
zBuffer[511] = orxCHAR_NULL; \
/* The redundant check is a workaround for some buggy compilers that don't realize FILE is not null here */ \
strncpy(zBuffer, FILE ? FILE : orxSTRING_EMPTY, 256); \
strncat(zBuffer, orxDEBUG_KZ_DEFAULT_LOG_SUFFIX, 255); \
_orxDebug_SetLogFile(zBuffer); \
} \
else \
{ \
_orxDebug_SetLogFile(FILE); \
} \
} while(orxFALSE)
#define orxDEBUG_KZ_DEFAULT_LOG_SUFFIX
Definition: orxDebug.h:76
#define orxFALSE
Definition: orxType.h:197
orxDLLAPI const orxSTRING orxSTRING_EMPTY
#define orxCHAR_NULL
Definition: orxType.h:227

Definition at line 354 of file orxDebug.h.

#define orxDEBUG_SETDEBUGFILE (   FILE)

Definition at line 352 of file orxDebug.h.

#define orxDEBUG_SETLOGFILE (   FILE)    _orxDebug_SetLogFile(FILE)

Definition at line 353 of file orxDebug.h.

Typedef Documentation

typedef orxSTATUS(orxFASTCALL * orxDEBUG_CALLBACK_FUNCTION) (orxDEBUG_LEVEL _eLevel, const orxSTRING _zFunction, const orxSTRING _zFile, orxU32 _u32Line, const orxSTRING _zLog)

Definition at line 123 of file orxDebug.h.

Enumeration Type Documentation

Enumerator
orxDEBUG_LEVEL_ANIM 

Anim Debug

orxDEBUG_LEVEL_CLOCK 

Clock Debug

orxDEBUG_LEVEL_COMMAND 

Command Debug

orxDEBUG_LEVEL_CONFIG 

Config 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 81 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_SetLogCallback ( const orxDEBUG_CALLBACK_FUNCTION  _pfnLogCallback)

Sets log callback function, if the callback returns orxSTATUS_FAILURE, the log entry will be entirely inhibited

Parameters
[in]_pfnLogCallbackLog callback function, orxNULL to remove it
orxDLLAPI void orxFASTCALL _orxDebug_SetLogFile ( const orxSTRING  _zFileName)

Sets log file name

Parameters
[in]_zFileNameLog file name

Generated for orx by doxygen 1.8.11