Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StreamBuffer.h File Reference
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <string>
#include <typeinfo>
#include <vector>
#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:606
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
Definition: StreamBuffer.h:614

Definition at line 304 of file StreamBuffer.h.

#define STREAM_ANALYSE (   data,
  len 
)

Definition at line 300 of file StreamBuffer.h.

Function Documentation

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

Definition at line 606 of file StreamBuffer.h.

606  {
607  s << v.size();
608  for ( const auto& i : v ) s << i;
609  return s;
610 }
T size(T...args)
string s
Definition: gaudirun.py:312
template<class T >
StreamBuffer& operator<< ( StreamBuffer s,
const std::list< T > &  l 
)
inline

Definition at line 628 of file StreamBuffer.h.

628  {
629  s << l.size();
630  for ( const auto& i : l ) s << i;
631  return s;
632 }
T size(T...args)
string s
Definition: gaudirun.py:312
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::vector< T > &  v 
)
inline

Definition at line 614 of file StreamBuffer.h.

614  {
615  long i, len;
616  s >> len;
617  v.clear();
618  for ( i = 0; i < len; i++ ) {
619  T temp;
620  s >> temp;
621  v.push_back( temp );
622  }
623  return s;
624 }
T push_back(T...args)
T clear(T...args)
string s
Definition: gaudirun.py:312
template<class T >
StreamBuffer& operator>> ( StreamBuffer s,
std::list< T > &  l 
)
inline

Definition at line 636 of file StreamBuffer.h.

636  {
637  long len;
638  s >> len;
639  l.clear();
640  for ( long i = 0; i < len; i++ ) {
641  T temp;
642  s >> temp;
643  l.push_back( temp );
644  }
645  return s;
646 }
T push_back(T...args)
T clear(T...args)
string s
Definition: gaudirun.py:312