| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | List of all members
StreamBuffer::DataIO Class Reference

A small base class to handle generic data streaming. More...

`#include <GaudiKernel/StreamBuffer.h>`

Inheritance diagram for StreamBuffer::DataIO:
[legend]

## Public Member Functions
| 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 | load (StreamBuffer &)
| Template function to load stream data. More...
virtual void | dump (StreamBuffer &)
| Template function to save stream data. More...

## Detailed Description

A small base class to handle generic data streaming.

Definition at line 45 of file StreamBuffer.h.

## Constructor & Destructor Documentation

## ◆ DataIO()

StreamBuffer::DataIO::DataIO | ( |  | ) |
| default

Standard constructor.

## ◆ ~DataIO()

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

Standard destructor.

## Member Function Documentation

## ◆ badStreamMode()

void StreamBuffer::DataIO::badStreamMode | ( |  | ) |
| inline

Throw Exception.

Definition at line 52 of file StreamBuffer.h.

52 { throw( "Not acceptable stream mode!" ); }

## ◆ dump()

virtual void StreamBuffer::DataIO::dump | ( | StreamBuffer & |  | ) |
| inline virtual

Template function to save stream data.

Reimplemented in StreamBuffer::Ostream.

Definition at line 65 of file StreamBuffer.h.

65 { badStreamMode(); }
StreamBuffer::DataIO::badStreamMode
void badStreamMode()
Throw Exception.
Definition: StreamBuffer.h:52

## ◆ load()

virtual void StreamBuffer::DataIO::load | ( | StreamBuffer & |  | ) |
| inline virtual

Template function to load stream data.

Reimplemented in StreamBuffer::Istream.

Definition at line 63 of file StreamBuffer.h.

63 { badStreamMode(); }
StreamBuffer::DataIO::badStreamMode
void badStreamMode()
Throw Exception.
Definition: StreamBuffer.h:52

## ◆ serialize()

virtual void StreamBuffer::DataIO::serialize | ( | StreamBuffer & | stream | ) |
| inline virtual

Serialization method: loads/dumps streambuffer content.

Definition at line 54 of file StreamBuffer.h.

54 {
55 if ( stream.isReading() )
56 load( stream );
57 else if ( stream.isWriting() )
58 dump( stream );
59 else
60 badStreamMode();
61 }
StreamBuffer::DataIO::load
virtual void load(StreamBuffer &)
Template function to load stream data.
Definition: StreamBuffer.h:63
StreamBuffer::isWriting
bool isWriting() const
Get stream buffer state.
Definition: StreamBuffer.h:253
StreamBuffer::DataIO::dump
virtual void dump(StreamBuffer &)
Template function to save stream data.
Definition: StreamBuffer.h:65
StreamBuffer::DataIO::badStreamMode
void badStreamMode()
Throw Exception.
Definition: StreamBuffer.h:52
StreamBuffer::isReading
bool isReading() const
Get stream buffer state.
Definition: StreamBuffer.h:250

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

- GaudiKernel/GaudiKernel/StreamBuffer.h