Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Classes | Defines | Functions

StreamBuffer.h File Reference

#include <list>
#include <vector>
#include <string>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <typeinfo>
#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 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 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 343 of file StreamBuffer.h.

#define STREAM_ANALYSE (   data,
  len 
)

Definition at line 339 of file StreamBuffer.h.


Function Documentation

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

Definition at line 645 of file StreamBuffer.h.

                                                                    {
  s << v.size();
  for ( typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); i++ )  {
    s << (*i);
  }
  return s;
}
template<class T >
StreamBuffer& operator<< ( StreamBuffer s,
const std::list< T > &  l 
) [inline]

Definition at line 669 of file StreamBuffer.h.

                                                                  {
  s << l.size();
  for ( typename std::list<T>::const_iterator i = l.begin(); i != l.end(); i++ )  {
    s << (*i);
  }
  return s;
}
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::list< T > &  l 
) [inline]

Definition at line 679 of file StreamBuffer.h.

                                                            {
  long i, len;
  s >> len;
  l.clear();
  for ( i = 0; i < len; i++ )  {
    T    temp;
    s >> temp;
    l.push_back(temp);
  }
  return s;
}
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::vector< T > &  v 
) [inline]

Definition at line 655 of file StreamBuffer.h.

                                                              {
  long i, len;
  s >> len;
  v.clear();
  for ( i = 0; i < len; i++ )  {
    T    temp;
    s >> temp;
    v.push_back(temp);
  }
  return s;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:32 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004