| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
StreamBuffer::Istream Class Reference

Reader for standard input streams. More...

`#include <GaudiKernel/StreamBuffer.h>`

Inheritance diagram for StreamBuffer::Istream:
[legend]
Collaboration diagram for StreamBuffer::Istream:
[legend]

## Public Member Functions
| Istream (std::istream &str)
| Constructor. More...
| ~Istream () override=default
| Destructor. More...
void | load (StreamBuffer &stream) override
| Data load method. More...
Public Member Functions inherited from StreamBuffer::DataIO
| DataIO ()=default
| Standard constructor. More...
virtual | ~DataIO ()=default
| Standard destructor. More...
void | badStreamMode ()
| Throw Exception. More...
virtual void | serialize (StreamBuffer &stream)
| Serialization method: loads/dumps streambuffer content. More...
virtual void | dump (StreamBuffer &)
| Template function to save stream data. More...

## Private Attributes
std::istream * | m_stream
| Reference to input stream. More...

## Detailed Description

Reader for standard input streams.

Definition at line 71 of file StreamBuffer.h.

## Constructor & Destructor Documentation

StreamBuffer::Istream::Istream | ( | std::istream & | str | ) |
| inline

Constructor.

Definition at line 78 of file StreamBuffer.h.

78 : m_stream( &str ) {}
StreamBuffer::Istream::m_stream
std::istream * m_stream
Reference to input stream.
Definition: StreamBuffer.h:74

StreamBuffer::Istream::~Istream | ( |  | ) |
| override default

Destructor.

## Member Function Documentation

void StreamBuffer::Istream::load | ( | StreamBuffer & | stream | ) |
| inline override virtual

Data load method.

Reimplemented from StreamBuffer::DataIO.

Definition at line 83 of file StreamBuffer.h.

84 {
85 // Generic implementation for istreams:
86 int len;
87 ( *m_stream ) >> len;
88 stream.erase();
89 stream.reserve( len );
90 m_stream->read( stream.data(), len );
91 }
StreamBuffer::Istream::m_stream
std::istream * m_stream
Reference to input stream.
Definition: StreamBuffer.h:74
StreamBuffer::data
const char * data() const
Read access to data buffer.
Definition: StreamBuffer.h:209
StreamBuffer::reserve
void reserve(long len)
Reserve buffer space; Default: 16 k buffer size.
Definition: StreamBuffer.h:226
std::istream::read
T read(T...args)
StreamBuffer::erase
void erase()
Reset the buffer.
Definition: StreamBuffer.h:213

## Member Data Documentation

std::istream* StreamBuffer::Istream::m_stream
| private

Reference to input stream.

Definition at line 74 of file StreamBuffer.h.

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

- GaudiKernel/GaudiKernel/StreamBuffer.h