StreamBuffer.h File Reference
#include <list>
#include <vector>
#include <algorithm>
#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...
 
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...
 

Macros

#define STREAM_ANALYSE(data, len)
 
#define IMPLEMENT_STREAMER(TYPE)
 
#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)
 

Macro Definition 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; \
}
StreamBuffer & operator<<(StreamBuffer &s, const std::vector< T > &v)
Definition: StreamBuffer.h:634
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:328
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
Definition: StreamBuffer.h:642

Definition at line 332 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; \
}
StreamBuffer & operator<<(StreamBuffer &s, const std::vector< T > &v)
Definition: StreamBuffer.h:634
#define STREAM_ANALYSE(data, len)
Definition: StreamBuffer.h:328
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
Definition: StreamBuffer.h:642

Definition at line 332 of file StreamBuffer.h.

#define STREAM_ANALYSE (   data,
  len 
)

Definition at line 328 of file StreamBuffer.h.

#define STREAM_ANALYSE (   data,
  len 
)

Definition at line 328 of file StreamBuffer.h.

Function Documentation

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

Definition at line 634 of file StreamBuffer.h.

634  {
635  s << v.size();
636  for ( const auto& i : v ) s << i;
637  return s;
638 }
string s
Definition: gaudirun.py:246
list i
Definition: ana.py:128
template<class T >
StreamBuffer & operator<< ( StreamBuffer s,
const std::list< T > &  l 
)
inline

Definition at line 656 of file StreamBuffer.h.

656  {
657  s << l.size();
658  for ( const auto& i : l ) s << i ;
659  return s;
660 }
string s
Definition: gaudirun.py:246
list i
Definition: ana.py:128
template<class T >
StreamBuffer & operator>> ( StreamBuffer s,
std::vector< T > &  v 
)
inline

Definition at line 642 of file StreamBuffer.h.

642  {
643  long i, len;
644  s >> len;
645  v.clear();
646  for ( i = 0; i < len; i++ ) {
647  T temp;
648  s >> temp;
649  v.push_back(temp);
650  }
651  return s;
652 }
string s
Definition: gaudirun.py:246
list i
Definition: ana.py:128
template<class T >
StreamBuffer & operator>> ( StreamBuffer s,
std::list< T > &  l 
)
inline

Definition at line 664 of file StreamBuffer.h.

664  {
665  long len;
666  s >> len;
667  l.clear();
668  for ( long i = 0; i < len; i++ ) {
669  T temp;
670  s >> temp;
671  l.push_back(temp);
672  }
673  return s;
674 }
string s
Definition: gaudirun.py:246
list i
Definition: ana.py:128