The Gaudi Framework  master (37c0b60a)
StreamBuffer::Istream Class Reference

Reader for standard input streams. More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/StreamBuffer.h>

Inheritance diagram for StreamBuffer::Istream:
Collaboration diagram for StreamBuffer::Istream:

Public Member Functions

 Istream (std::istream &str)
 Constructor. 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::istreamm_stream
 Reference to input stream. More...
 

Detailed Description

Reader for standard input streams.

Definition at line 79 of file StreamBuffer.h.

Constructor & Destructor Documentation

◆ Istream()

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

Constructor.

Definition at line 85 of file StreamBuffer.h.

85 : m_stream( &str ) {}

Member Function Documentation

◆ load()

void StreamBuffer::Istream::load ( StreamBuffer stream)
inlineoverridevirtual

Data load method.

Reimplemented from StreamBuffer::DataIO.

Definition at line 88 of file StreamBuffer.h.

88  {
89  // Generic implementation for istreams:
90  int len;
91  ( *m_stream ) >> len;
92  stream.erase();
93  stream.reserve( len );
94  m_stream->read( stream.data(), len );
95  }

Member Data Documentation

◆ m_stream

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

Reference to input stream.

Definition at line 81 of file StreamBuffer.h.


The documentation for this class was generated from the following file:
StreamBuffer::Istream::m_stream
std::istream * m_stream
Reference to input stream.
Definition: StreamBuffer.h:81
Write.stream
stream
Definition: Write.py:32
std::istream::read
T read(T... args)