Loading [MathJax]/jax/input/TeX/config.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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...
 

Macros

#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:645
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
Definition: StreamBuffer.h:653

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.

645  {
646  s << v.size();
647  for ( const auto& i : v ) s << i;
648  return s;
649 }
T size(T...args)
string s
Definition: gaudirun.py:245
template<class T >
StreamBuffer& operator<< ( StreamBuffer s,
const std::list< T > &  l 
)
inline

Definition at line 667 of file StreamBuffer.h.

667  {
668  s << l.size();
669  for ( const auto& i : l ) s << i ;
670  return s;
671 }
T size(T...args)
string s
Definition: gaudirun.py:245
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::vector< T > &  v 
)
inline

Definition at line 653 of file StreamBuffer.h.

653  {
654  long i, len;
655  s >> len;
656  v.clear();
657  for ( i = 0; i < len; i++ ) {
658  T temp;
659  s >> temp;
660  v.push_back(temp);
661  }
662  return s;
663 }
T push_back(T...args)
T clear(T...args)
string s
Definition: gaudirun.py:245
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::list< T > &  l 
)
inline

Definition at line 675 of file StreamBuffer.h.

675  {
676  long len;
677  s >> len;
678  l.clear();
679  for ( long i = 0; i < len; i++ ) {
680  T temp;
681  s >> temp;
682  l.push_back(temp);
683  }
684  return s;
685 }
T push_back(T...args)
T clear(T...args)
string s
Definition: gaudirun.py:245