|
resonance 1.0.1
|
Registry that routes each source file's diagnostic stream to a named output channel. More...
#include <spewtable.h>
Classes | |
| struct | Channel |
| Output channel, 0xc bytes, created by Connect() and destroyed by the destructor. More... | |
| struct | Connection |
| One source file's registration, 0x10 bytes. More... | |
Public Member Functions | |
| SpewTable () | |
| Construct an empty registry. | |
| ~SpewTable () | |
| Close every channel and release both lists. | |
| void | Register (std::ostream **ppStream, const char *pszFile) |
| Register a source file's stream pointer. | |
| void | Connect (const HxStr &file, const HxStr &channel) |
| Point the registered streams of a source file at a channel. | |
| void | PrintConnections (std::ostream &stream) |
| Write every registration and its channel name, one per line. | |
Static Public Member Functions | |
| static SpewTable & | shared () |
| Report the one registry, constructing it on first use. | |
Registry that routes each source file's diagnostic stream to a named output channel.
The class emits no RTTI. Its name comes from the debugging symbols of the North American demo release. The one instance is a function-local static of shared() at 0x00894df8, 0x18 bytes, destroyed at exit through the thunk at 0x004b4660.
A source file registers the address of its stream pointer under its own base name through SpewRegister. Connect() then points every registered stream of a file at a channel, creating the channel on first use. A channel is the console, nothing, or a file of that name.
| SpewTable::SpewTable | ( | ) |
Construct an empty registry.
| SpewTable::~SpewTable | ( | ) |
Close every channel and release both lists.
|
inlinestatic |
Report the one registry, constructing it on first use.
The body is inline. SpewRegister's constructor expands it, and the script binding calls the out-of-line copy.
| void SpewTable::Register | ( | std::ostream ** | ppStream, |
| const char * | pszFile ) |
Register a source file's stream pointer.
The file name loses its extension and its directory, is lower-cased, and is appended with no channel.
| ppStream | The file's stream pointer. |
| pszFile | The source file name. |
Point the registered streams of a source file at a channel.
The channel name is lower-cased and the channel created on first use. The file name is lower-cased, and the first registration of that name receives the channel's stream. A file that was never registered only creates the channel.
| file | The source file's base name. |
| channel | The channel name: off, console, debug, or a file to write. |
| void SpewTable::PrintConnections | ( | std::ostream & | stream | ) |
Write every registration and its channel name, one per line.
| stream | The stream to write to. |