A ostream-like class that may support formatting. More...
#include <Bytestream.h>
Public Types | |
enum | Format { Action, Comment, Definition, Filename, Literal, Operator, Reference, Type, Error, Warning, Info, ErrorLoc, ErrorMessage, Column, Line, Reset } |
Output formats that the bytestream may (optionally) support. | |
Public Member Functions | |
virtual Bytestream & | operator<< (enum Format)=0 |
virtual Bytestream & | operator<< (const Printable &) |
virtual Bytestream & | operator<< (const std::string &) |
virtual Bytestream & | operator<< (char) |
virtual Bytestream & | operator<< (int) |
virtual Bytestream & | operator<< (unsigned long) |
std::ostream & | raw () |
Static Public Member Functions | |
static Bytestream & | Stdout () |
static Bytestream & | Stderr () |
static Bytestream & | None () |
static Bytestream & | Debug (const std::string &name) |
Retrieve the debug output stream or a do-nothing stream, based on the (hierarchical) debug naming scheme. More... | |
static void | SetDebugPattern (const std::string &) |
static void | SetDebugStream (Bytestream &) |
static Bytestream * | Formatted (std::ostream &) |
Construct a formatted fabrique::Bytestream to wrap an std::ostream. More... | |
static Bytestream * | Plain (std::ostream &) |
Construct a plain fabrique::Bytestream to wrap an std::ostream. More... | |
Protected Member Functions | |
Bytestream (std::ostream &o) | |
Protected Attributes | |
std::ostream & | out_ |
A ostream-like class that may support formatting.
Definition at line 43 of file Bytestream.h.
|
static |
Retrieve the debug output stream or a do-nothing stream, based on the (hierarchical) debug naming scheme.
Fabrique runs with a debug pattern (that defaults to "") that is used to select how much debug output is actually output. For instance, if running with –debug=*, all names will match, whereas if running with –debug=parser (equivalent to parser.*), Debug("parser.foo") will return the debug stream but Debug("lexer.bar") will return the do-nothing stream.
Definition at line 181 of file Bytestream.cc.
|
static |
Construct a formatted fabrique::Bytestream to wrap an std::ostream.
The caller is responsible for freeing the returned pointer.
Definition at line 202 of file Bytestream.cc.
|
static |
Construct a plain fabrique::Bytestream to wrap an std::ostream.
The caller is responsible for freeing the returned pointer.
Definition at line 207 of file Bytestream.cc.