#include <debug.h>
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> | |
| Debug & | operator<< (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 | |
| static void | init (Mask mask) |
| Set the debugging channel mask. | |
| static void | addChannels (Mask mask) |
| Add a debugging channel to the mask. | |
| static void | removeChannels (Mask mask) |
| Add a debugging channel to the mask. | |
| static Debug & | channel (Mask mask) |
| Like std::cerr for a particular debugging channel. | |
Static Public Attributes | |
| static Debug | out |
| Like std::cerr, if DEBUG is defined and debugging is turned on. | |
| static Endl | endl |
| The Debug std::endl emulator. | |
| static Flush | flush |
| The Debug std::flush emulator. | |
Classes | |
| class | Endl |
| A class that emulates std::endl when DEBUG is defined, but doesn't require <iostream> when it's not. More... | |
| class | Flush |
| A class that emulates std::flush when DEBUG is defined, but doesn't require <iostream> when it's not. More... | |
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.
|
|
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. |
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.