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

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

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

Inheritance diagram for StreamBuffer::DataIO:

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 55 of file StreamBuffer.h.

Constructor & Destructor Documentation

◆ DataIO()

StreamBuffer::DataIO::DataIO ( )
default

Standard constructor.

◆ ~DataIO()

virtual StreamBuffer::DataIO::~DataIO ( )
virtualdefault

Standard destructor.

Member Function Documentation

◆ badStreamMode()

void StreamBuffer::DataIO::badStreamMode ( )
inline

Throw Exception.

Definition at line 62 of file StreamBuffer.h.

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

◆ dump()

virtual void StreamBuffer::DataIO::dump ( StreamBuffer )
inlinevirtual

Template function to save stream data.

Reimplemented in StreamBuffer::Ostream.

Definition at line 75 of file StreamBuffer.h.

75 { badStreamMode(); }

◆ load()

virtual void StreamBuffer::DataIO::load ( StreamBuffer )
inlinevirtual

Template function to load stream data.

Reimplemented in StreamBuffer::Istream.

Definition at line 73 of file StreamBuffer.h.

73 { badStreamMode(); }

◆ serialize()

virtual void StreamBuffer::DataIO::serialize ( StreamBuffer stream)
inlinevirtual

Serialization method: loads/dumps streambuffer content.

Definition at line 64 of file StreamBuffer.h.

64  {
65  if ( stream.isReading() )
66  load( stream );
67  else if ( stream.isWriting() )
68  dump( stream );
69  else
70  badStreamMode();
71  }

The documentation for this class was generated from the following file:
Write.stream
stream
Definition: Write.py:32
StreamBuffer::DataIO::badStreamMode
void badStreamMode()
Throw Exception.
Definition: StreamBuffer.h:62
StreamBuffer::DataIO::load
virtual void load(StreamBuffer &)
Template function to load stream data.
Definition: StreamBuffer.h:73
StreamBuffer::DataIO::dump
virtual void dump(StreamBuffer &)
Template function to save stream data.
Definition: StreamBuffer.h:75