Gaudi Framework, version v20r2

Generated: 18 Jul 2008

StreamBuffer.h File Reference

#include <list>
#include <vector>
#include <string>
#include <iostream>
#include "GaudiKernel/Kernel.h"
#include "GaudiKernel/swab.h"

Include dependency graph for StreamBuffer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StreamBuffer
 The stream buffer is a small object collecting object data. More...
class  StreamBuffer::DataIO
 A small base class to handle generic data streaming. More...
class  StreamBuffer::Istream
 Reader for standard input streams. More...
class  StreamBuffer::Ostream
 Writer for standard output streams. More...
class  StreamBuffer::ContainedLink
 Definition of the contained link set. More...
class  StreamBuffer::IdentifiedLink
 Definition of the contained link set. More...

Defines

#define GAUDIKERNEL_STREAMBUFFER_H   1
#define STREAM_ANALYSE(data, len)
#define IMPLEMENT_STREAMER(TYPE)

Functions

template<class T>
StreamBufferoperator<< (StreamBuffer &s, const std::vector< T > &v)
template<class T>
StreamBufferoperator>> (StreamBuffer &s, std::vector< T > &v)
template<class T>
StreamBufferoperator<< (StreamBuffer &s, const std::list< T > &l)
template<class T>
StreamBufferoperator>> (StreamBuffer &s, std::list< T > &l)


Define Documentation

#define GAUDIKERNEL_STREAMBUFFER_H   1

Definition at line 3 of file StreamBuffer.h.

#define IMPLEMENT_STREAMER ( TYPE   ) 

Value:

/*  Output Streamer                                   */          \
  StreamBuffer& operator<<(TYPE   data)     {                       \
    swapToBuffer(&data, sizeof(data));                              \
    STREAM_ANALYSE(data, sizeof(data));                             \
    return *this;                                                   \
  }                                                                 \
  /*  Input Streamer                                    */          \
  StreamBuffer& operator>>(TYPE & data)     {                       \
    swapFromBuffer(&data, sizeof(data));                            \
    return *this;                                                   \
  }

Definition at line 339 of file StreamBuffer.h.

#define STREAM_ANALYSE ( data,
len   ) 

Definition at line 335 of file StreamBuffer.h.

Referenced by StreamBuffer::operator<<().


Function Documentation

template<class T>
StreamBuffer& operator<< ( StreamBuffer s,
const std::list< T > &  l 
) [inline]

Definition at line 664 of file StreamBuffer.h.

References Gaudi::Units::s.

00664                                                                   {
00665   s << l.size();
00666   for ( typename std::list<T>::const_iterator i = l.begin(); i != l.end(); i++ )  {
00667     s << (*i);
00668   }
00669   return s;
00670 }

template<class T>
StreamBuffer& operator<< ( StreamBuffer s,
const std::vector< T > &  v 
) [inline]

Definition at line 640 of file StreamBuffer.h.

References Gaudi::Units::s.

00640                                                                     {
00641   s << v.size();
00642   for ( typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); i++ )  {
00643     s << (*i);
00644   }
00645   return s;
00646 }

template<class T>
StreamBuffer& operator>> ( StreamBuffer s,
std::list< T > &  l 
) [inline]

Definition at line 674 of file StreamBuffer.h.

References std::list< _Tp, _Alloc >::clear(), std::list< _Tp, _Alloc >::push_back(), and Gaudi::Units::s.

00674                                                             {
00675   long i, len;
00676   s >> len;
00677   l.clear();
00678   for ( i = 0; i < len; i++ )  {
00679     T    temp;
00680     s >> temp;
00681     l.push_back(temp);
00682   }
00683   return s;
00684 }

template<class T>
StreamBuffer& operator>> ( StreamBuffer s,
std::vector< T > &  v 
) [inline]

Definition at line 650 of file StreamBuffer.h.

References std::vector< _Tp, _Alloc >::clear(), std::vector< _Tp, _Alloc >::push_back(), and Gaudi::Units::s.

00650                                                               {
00651   long i, len;
00652   s >> len;
00653   v.clear();
00654   for ( i = 0; i < len; i++ )  {
00655     T    temp;
00656     s >> temp;
00657     v.push_back(temp);
00658   }
00659   return s;
00660 }


Generated at Fri Jul 18 12:03:34 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004