#include <StreamBuffer.h>
Inheritance diagram for StreamBuffer::Ostream:
Public Member Functions | |
Ostream (std::ostream &str) | |
Standard constructor: pass reference to stream object. | |
virtual | ~Ostream () |
Standard Destructor. | |
virtual void | dump (StreamBuffer &stream) |
Output dumper. | |
void | badStreamMode () |
Throw Exception. | |
virtual void | serialize (StreamBuffer &stream) |
Serialization method: loads/dumps streambuffer content. | |
virtual void | load (StreamBuffer &) |
Template function to load stream data. | |
Private Attributes | |
std::ostream * | m_stream |
Definition at line 95 of file StreamBuffer.h.
StreamBuffer::Ostream::Ostream | ( | std::ostream & | str | ) | [inline] |
Standard constructor: pass reference to stream object.
Definition at line 99 of file StreamBuffer.h.
00099 : m_stream(&str) { 00100 }
virtual StreamBuffer::Ostream::~Ostream | ( | ) | [inline, virtual] |
virtual void StreamBuffer::Ostream::dump | ( | StreamBuffer & | stream | ) | [inline, virtual] |
Output dumper.
Reimplemented from StreamBuffer::DataIO.
Definition at line 105 of file StreamBuffer.h.
00105 { 00106 // Generic implementation for ostreams: 00107 (*m_stream) << stream.buffPointer(); 00108 m_stream->write(stream.data(), stream.buffPointer()); 00109 }
void StreamBuffer::DataIO::badStreamMode | ( | ) | [inline, inherited] |
virtual void StreamBuffer::DataIO::serialize | ( | StreamBuffer & | stream | ) | [inline, virtual, inherited] |
Serialization method: loads/dumps streambuffer content.
Definition at line 55 of file StreamBuffer.h.
00055 { 00056 if (stream.isReading()) 00057 load(stream); 00058 else if (stream.isWriting()) 00059 dump(stream); 00060 else 00061 badStreamMode(); 00062 }
virtual void StreamBuffer::DataIO::load | ( | StreamBuffer & | ) | [inline, virtual, inherited] |
Template function to load stream data.
Reimplemented in StreamBuffer::Istream.
Definition at line 64 of file StreamBuffer.h.
00064 { 00065 badStreamMode(); 00066 }
std::ostream* StreamBuffer::Ostream::m_stream [private] |
Definition at line 96 of file StreamBuffer.h.