torc::architecture::DDBStreamHelper Class Reference

Device database stream helper class. More...

#include <DDBStreamHelper.hpp>

List of all members.

Public Types

typedef
torc::common::EncapsulatedInteger
< int > 
IWordIndex
 Encapsulation of a stream iword used as a pword index.

Static Public Member Functions

static IWordIndex getIWordIndex (std::ostream &os)
 Return the iword index for this stream, or allocate it if not defined.
static class DDBgetDDBPtr (std::ostream &os)
 Return the device database pointer associated with this stream.

Protected Types

typedef std::map< std::ostream
*, int > 
OStreamToIntMap
 Map of streams to iwords.

Static Protected Attributes

static OStreamToIntMap sIWordIndexes
 Map of streams to iwords.


Detailed Description

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.

Note:
The database reference only needs to be inserted one time into the stream.
std::cout << ddb << ...;

Definition at line 35 of file DDBStreamHelper.hpp.


Member Typedef Documentation

typedef std::map<std::ostream*, int> torc::architecture::DDBStreamHelper::OStreamToIntMap [protected]

Map of streams to iwords.

Definition at line 39 of file DDBStreamHelper.hpp.

Encapsulation of a stream iword used as a pword index.

Definition at line 46 of file DDBStreamHelper.hpp.


Member Function Documentation

static IWordIndex torc::architecture::DDBStreamHelper::getIWordIndex ( std::ostream &  os  )  [inline, static]

Return the iword index for this stream, or allocate it if not defined.

Definition at line 49 of file DDBStreamHelper.hpp.

static class DDB* torc::architecture::DDBStreamHelper::getDDBPtr ( std::ostream &  os  )  [inline, static]

Return the device database pointer associated with this stream.

Returns:
the device database pointer, or 0 if no database has been associated with the stream.

Definition at line 61 of file DDBStreamHelper.hpp.


Member Data Documentation

Map of streams to iwords.

Definition at line 42 of file DDBStreamHelper.hpp.


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

Generated on Thu Oct 13 16:49:31 2011 for TORC by  doxygen 1.5.6