The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
StreamBuffer.h File Reference
#include <GaudiKernel/Kernel.h>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <string>
#include <typeinfo>
#include <unistd.h>
#include <vector>
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

◆ IMPLEMENT_STREAMER

#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; \
}
std::ostream & operator<<(std::ostream &s, AlgsExecutionStates::State x)
Streaming of State values.
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
The stream buffer is a small object collecting object data.

Definition at line 312 of file StreamBuffer.h.

312#define IMPLEMENT_STREAMER( TYPE ) \
313 /* Output Streamer */ \
314 StreamBuffer& operator<<( TYPE data ) { \
315 swapToBuffer( &data, sizeof( data ) ); \
316 STREAM_ANALYSE( data, sizeof( data ) ); \
317 return *this; \
318 } \
319 /* Input Streamer */ \
320 StreamBuffer& operator>>( TYPE& data ) { \
321 swapFromBuffer( &data, sizeof( data ) ); \
322 return *this; \
323 }

◆ STREAM_ANALYSE

#define STREAM_ANALYSE ( data,
len )

Definition at line 308 of file StreamBuffer.h.

Function Documentation

◆ operator<<() [1/2]

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

Definition at line 631 of file StreamBuffer.h.

631 {
632 s << l.size();
633 for ( const auto& i : l ) s << i;
634 return s;
635}
dict l
Definition gaudirun.py:583

◆ operator<<() [2/2]

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

Definition at line 609 of file StreamBuffer.h.

609 {
610 s << v.size();
611 for ( const auto& i : v ) s << i;
612 return s;
613}

◆ operator>>() [1/2]

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

Definition at line 639 of file StreamBuffer.h.

639 {
640 long len;
641 s >> len;
642 l.clear();
643 for ( long i = 0; i < len; i++ ) {
644 T temp;
645 s >> temp;
646 l.push_back( temp );
647 }
648 return s;
649}

◆ operator>>() [2/2]

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

Definition at line 617 of file StreamBuffer.h.

617 {
618 long i, len;
619 s >> len;
620 v.clear();
621 for ( i = 0; i < len; i++ ) {
622 T temp;
623 s >> temp;
624 v.push_back( temp );
625 }
626 return s;
627}