Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RwDebug
[Error & Debug Handling]


Typedefs

typedef void(* RwDebugHandler )(RwDebugType type, const RwChar *string)

Enumerations

enum  RwDebugType {
  rwNADEBUGTYPE = 0, rwDEBUGASSERT, rwDEBUGERROR, rwDEBUGMESSAGE,
  rwDEBUGTRACE, rwDEBUGTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

void RwDebugSetTraceState (RwBool state)
RwDebugHandler RwDebugSetHandler (RwDebugHandler handler)
void RwDebugSendMessage (RwDebugType type, const RwChar *funcName, const RwChar *message)

Detailed Description

Debug handling

RwDebug Overview

(DEBUG BUILD ONLY.)

Requirements

Overview

This object represents a debug handler and stream. Error messages can be sent to this object and it will pass them onto the currently registered debug handler. A default handler is registered by default.

Developers should note that this API may degrade performance if too many messages are being sent to the handler.


Typedef Documentation

typedef void(* RwDebugHandler)(RwDebugType type, const RwChar * string)
 

RwDebugHandler This type represents the function called from RwDebugSendMessage for sending a message to the RenderWare debug stream.

Parameters:
type  Type of debug message (assert, error, etc.).
string  Pointer to a string containing the error message.
See also:
RwDebugSetHandler


Enumeration Type Documentation

enum RwDebugType
 

RwDebugType This type represents the different types of debug and trace messages that can be sent to the currently installed debug handler (see API function RwDebugSendMessage)

Enumeration values:
rwNADEBUGTYPE  Invalid
rwDEBUGASSERT  Send an assert message
rwDEBUGERROR  Send an error message
rwDEBUGMESSAGE  Send an informational message
rwDEBUGTRACE  Send a trace message


Function Documentation

void RwDebugSendMessage RwDebugType    type,
const RwChar   funcName,
const RwChar   message
 

RwDebugSendMessage is used to send a message to the currently installed debug handler.

This function is only meaningful when used in conjunction with the debug version of the RenderWare libraries.

Parameters:
type  An RwDebugType value equal to the message type:
  • rwDEBUGASSERT - Send an assert message.
  • rwDEBUGERROR - Send an error message.
  • rwDEBUGMESSAGE - Send an informational message.
  • rwDEBUGTRACE - Send a trace message.
funcName  A pointer to a string containing the name of the function the message originated from.
message  A pointer to a string containing the text of the message.
Returns:
None.
See also:
RwDebugSetHandler , RwDebugSetTraceState , RwErrorGet

RwDebugHandler RwDebugSetHandler RwDebugHandler    handler
 

RwDebugSetHandler is used to register a new handler for the debug stream. A default system error handler is initially defined.

Note that there is no default debug handler. Your application needs to provide its own debug handler. Please refer to the skeleton for an example of how to set a debug handler.

This function is only meaningful when used in conjunction with the debug version of the RenderWare libraries.

Parameters:
handler  A pointer to the new debug message handler.
Returns:
Returns a pointer to the previously registered debug message handler if successful or NULL if no previous handler have been set.
See also:
RwDebugSendMessage , RwDebugSetTraceState , RwErrorGet

void RwDebugSetTraceState RwBool    state
 

RwDebugSetTraceState is used to enable or disable the reporting of debug trace messages. Initially, the trace state is set to FALSE.

This function is only meaningful when used in conjunction with custom versions of the RenderWare libraries that have tracing or stack depth checking enabled.

Parameters:
state  An RwBool value equal to the new message reporting state:
  • TRUE - Enable debug trace message reporting.
  • FALSE - Disable debug trace message reporting.
Returns:
None.
See also:
RwDebugSendMessage , RwDebugSetHandler , RwErrorGet


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:46:51 2004. Send Feedback