| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# StreamBuffer::DataIO Class Reference

`#include <StreamBuffer.h>`

Inheritance diagram for StreamBuffer::DataIO:

[legend]
List of all members.

## Detailed Description

A small base class to handle generic data streaming.

Definition at line 39 of file StreamBuffer.h.

## Public Member Functions
| DataIO ()
| Standard constructor.
virtual | ~DataIO ()
| Standard destructor.
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.
virtual void | dump (StreamBuffer &)
| Template function to save stream data.

## Constructor & Destructor Documentation

StreamBuffer::DataIO::DataIO | ( |  | ) | `[inline]`

Standard constructor.

Definition at line 42 of file StreamBuffer.h.

    00042                 {
    00043     }

virtual StreamBuffer::DataIO::~DataIO | ( |  | ) | `[inline, virtual]`

Standard destructor.

Definition at line 45 of file StreamBuffer.h.

    00045                          {
    00046     }

## Member Function Documentation

void StreamBuffer::DataIO::badStreamMode | ( |  | ) | `[inline]`

Throw Exception.

Definition at line 48 of file StreamBuffer.h.

Referenced by dump(), load(), and serialize().

    00048                             {
    00049       throw("Not acceptable stream mode!");
    00050     }

virtual void StreamBuffer::DataIO::serialize | ( | StreamBuffer & | stream | ) | `[inline, virtual]`

Serialization method: loads/dumps streambuffer content.

Definition at line 52 of file StreamBuffer.h.

References badStreamMode(), dump(), StreamBuffer::isReading(), StreamBuffer::isWriting(), and load().

Referenced by StreamBuffer::serialize().

    00052                                                    {
    00053       if (stream.isReading())
    00054         load(stream);
    00055       else if (stream.isWriting())
    00056         dump(stream);
    00057       else
    00058         badStreamMode();
    00059     }

virtual void StreamBuffer::DataIO::load | ( | StreamBuffer & |  | ) | `[inline, virtual]`

Template function to load stream data.

Reimplemented in StreamBuffer::Istream.

Definition at line 61 of file StreamBuffer.h.

References badStreamMode().

Referenced by serialize().

    00061                                        {
    00062       badStreamMode();
    00063     }

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.

References badStreamMode().

Referenced by serialize().

    00065                                        {
    00066       badStreamMode();
    00067     }

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/GaudiKernel/StreamBuffer.h