Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::Debug Class Reference

The Debug class handles the debug channels. More...

#include <debug.h>

List of all members.

Public Types

typedef unsigned long Mask
 The type of the debugging channel mask.
enum  {
  INVALIDATE = 1 << 16, GENERIC = 1 << 17, DRAWING = 1 << 18, MAINLOOP = 1 << 19,
  STARTUP = 1 << 20, SOUND = 1 << 21, EVENTS = 1 << 22, WIDGET_CREATE = 1 << 23,
  TEXT_WIDGETS = 1 << 24, FONTS = 1 << 25, PACKING = 1 << 26, OPENGL = 1 << 27,
  DRAW_TIMING = 1 << 28, APP_MASK = 0xffff, LIB_MASK = 0xffff0000
}
 Flags 0-15 appear reserved for user development, 16-31 for wftk library debugging. More...

Public Member Functions

 Debug ()
 Create a generic Debug instance.
 Debug (Mask mask)
 Create a Debug instance for a particular channel.
template<class C>
Debugoperator<< (const C &c)
 Write to std::cerr if debugging is turned on.
 operator bool () const
 cast to bool: true if debugging is turned on for this channel

Static Public Member Functions

void init (Mask mask)
 Set the debugging channel mask.
void addChannels (Mask mask)
 Add a debugging channel to the mask.
void removeChannels (Mask mask)
 Add a debugging channel to the mask.
Debugchannel (Mask mask)
 Like std::cerr for a particular debugging channel.

Static Public Attributes

Debug out
 Like std::cerr, if DEBUG is defined and debugging is turned on.
Endl endl
 The Debug std::endl emulator.
Flush flush
 The Debug std::flush emulator.


Detailed Description

The Debug class handles the debug channels.

It also has a few convenience classes and methods to make debugging cleaner.

To use the debugging output, create an instance of the Debug::out class, and then write to it using the << operator. Use the 'Debug::endl' symbol instead of std::endl.

The debug() and debugN() macros are now deprecated.


Member Enumeration Documentation

anonymous enum
 

Flags 0-15 appear reserved for user development, 16-31 for wftk library debugging.

This is a list specifying what the wftk library flags are used for.


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

Generated Tue Oct 26 19:02:12 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.