| The Gaudi Framework v27r1

- 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...
virtual | ~Istream ()=default
| Destructor. More...
virtual void | load (StreamBuffer &stream)
| 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 74 of file StreamBuffer.h.

## Constructor & Destructor Documentation

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

Constructor.

Definition at line 79 of file StreamBuffer.h.

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

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

Destructor.

## Member Function Documentation

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

Data load method.

Reimplemented from StreamBuffer::DataIO.

Definition at line 85 of file StreamBuffer.h.

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

## Member Data Documentation

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

Reference to input stream.

Definition at line 76 of file StreamBuffer.h.

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

- GaudiKernel/GaudiKernel/StreamBuffer.h