ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <debug-channels.h>

Inheritance diagram for Common::DebugManager:
Collaboration diagram for Common::DebugManager:

List of all members.

Classes

struct  DebugChannel

Public Types

typedef List< DebugChannelDebugChannelList

Public Member Functions

bool addDebugChannel (uint32 channel, const String &name, const String &description)
 Adds a debug channel.
void clearAllDebugChannels ()
 Resets all engine specific debug channels.
bool enableDebugChannel (const String &name)
 Enables an debug channel.
bool disableDebugChannel (const String &name)
 Disables an debug channel.
DebugChannelList listDebugChannels ()
 Lists all engine specific debug channels.
void enableAllDebugChannels ()
 Enable all debug channels.
void disableAllDebugChannels ()
 Disable all debug channels.
bool isDebugChannelEnabled (uint32 channel, bool enforce=false)
 Test whether the given debug channel is enabled.

Private Types

typedef HashMap< String,
DebugChannel, IgnoreCase_Hash,
IgnoreCase_EqualTo
DebugChannelMap

Private Member Functions

 DebugManager ()

Private Attributes

DebugChannelMap gDebugChannels
uint32 gDebugChannelsEnabled

Friends

class Singleton< SingletonBaseType >

Detailed Description

Definition at line 38 of file debug-channels.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Common::DebugManager::DebugManager (  )  [inline, private]

Definition at line 129 of file debug-channels.h.


Member Function Documentation

bool Common::DebugManager::addDebugChannel ( uint32  channel,
const String name,
const String description 
)

Adds a debug channel.

A debug channel is considered roughly similar to what our debug levels described by gDebugLevel try to achieve:

Debug channels should only affect the display of additional debug output, based on their state. That is if they are enabled, channel specific debug messages should be shown. If they are disabled on the other hand, those messages will be hidden.

See also:
gDebugLevel.

Note that we have debug* functions which depend both on the debug level set and specific debug channels. Those functions will only show output, when *both* criteria are satisfied.

Parameters:
channel the channel flag (should be OR-able i.e. first one should be 1 then 2, 4, etc.)
name the option name which is used in the debugger/on the command line to enable this special debug level (case will be ignored)
description the description which shows up in the debugger
Returns:
true on success false on failure

Definition at line 49 of file common/debug.cpp.

void Common::DebugManager::clearAllDebugChannels (  ) 

Resets all engine specific debug channels.

Definition at line 63 of file common/debug.cpp.

void Common::DebugManager::disableAllDebugChannels (  ) 

Disable all debug channels.

Definition at line 108 of file common/debug.cpp.

bool Common::DebugManager::disableDebugChannel ( const String name  ) 

Disables an debug channel.

Parameters:
name the name of the debug channel to disable
Returns:
true on success, false on failure

Definition at line 81 of file common/debug.cpp.

void Common::DebugManager::enableAllDebugChannels (  ) 

Enable all debug channels.

Definition at line 103 of file common/debug.cpp.

bool Common::DebugManager::enableDebugChannel ( const String name  ) 

Enables an debug channel.

Parameters:
name the name of the debug channel to enable
Returns:
true on success, false on failure

Definition at line 68 of file common/debug.cpp.

bool Common::DebugManager::isDebugChannelEnabled ( uint32  channel,
bool  enforce = false 
)

Test whether the given debug channel is enabled.

Definition at line 113 of file common/debug.cpp.

DebugManager::DebugChannelList Common::DebugManager::listDebugChannels (  ) 

Lists all engine specific debug channels.

Returns:
returns an array with all debug channels

Definition at line 94 of file common/debug.cpp.


Friends And Related Function Documentation

friend class Singleton< SingletonBaseType > [friend]

Definition at line 128 of file debug-channels.h.


Member Data Documentation


The documentation for this class was generated from the following files:


Generated on Sat Mar 23 2019 05:06:56 for ResidualVM by doxygen 1.7.1
curved edge   curved edge