torc-master
|
Device database stream helper class. More...
#include <DDBStreamHelper.hpp>
Static Public Member Functions | |
static const class DDB * | getDDBPtr (std::ostream &os) |
Return the device database pointer associated with this stream. More... | |
static void | dissociate (const class DDB &ddb) |
Dissociate the given device database from any stream. More... | |
Protected Types | |
typedef std::map< std::ostream *, const class DDB * > | OStreamToDDBMap |
Map of streams to database pointers. More... | |
Static Protected Attributes | |
static OStreamToDDBMap | sStreamToDatabase |
Map of streams to databases. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const class DDB &ddb) |
Insertion operator to associate the given device database with the given stream. More... | |
Device database stream helper class.
This helper class allows the caller to associate a device database with an output stream. This allows extremely lightweight classes like Tilewire to decorate their output with additional information, without requiring their own database reference.
std::cout << ddb << ...;
Definition at line 35 of file DDBStreamHelper.hpp.
|
protected |
Map of streams to database pointers.
Definition at line 42 of file DDBStreamHelper.hpp.
|
inlinestatic |
Dissociate the given device database from any stream.
Definition at line 56 of file DDBStreamHelper.hpp.
|
inlinestatic |
Return the device database pointer associated with this stream.
Definition at line 50 of file DDBStreamHelper.hpp.
|
friend |
Insertion operator to associate the given device database with the given stream.
This operator does not generate any stream output, but instead associates the given device database with the stream. This allows lightweight objects such as tilewires to decorate their output with database information, without including a database reference.
|
staticprotected |
Map of streams to databases.
Definition at line 45 of file DDBStreamHelper.hpp.