| The Gaudi Framework v32r1 (f65d50dc)

Classes | Macros | Functions
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 >
StreamBuffer & | operator<< (StreamBuffer &s, const std::vector< T > &v)
template<class T >
StreamBuffer & | operator>> (StreamBuffer &s, std::vector< T > &v)
template<class T >
StreamBuffer & | operator<< (StreamBuffer &s, const std::list< T > &l)
template<class T >
StreamBuffer & | operator>> (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; \
}
operator<<
StreamBuffer & operator<<(StreamBuffer &s, const std::vector< T > &v)
Definition: StreamBuffer.h:606
operator>>
StreamBuffer & operator>>(StreamBuffer &s, std::vector< T > &v)
Definition: StreamBuffer.h:614

Definition at line 304 of file StreamBuffer.h.

## ◆ STREAM_ANALYSE

#define STREAM_ANALYSE | ( |  | data,
|  |  | len
| ) |  |

Definition at line 300 of file StreamBuffer.h.

## Function Documentation

## ◆ operator<<() [1/2]

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 }
std::vector::size
T size(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ operator<<() [2/2]

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 }
gaudirun.l
dictionary l
Definition: gaudirun.py:521
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ operator>>() [1/2]

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 }
std::vector::push_back
T push_back(T... args)
std::vector::clear
T clear(T... args)
gaudirun.s
string s
Definition: gaudirun.py:316

## ◆ operator>>() [2/2]

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 }
gaudirun.l
dictionary l
Definition: gaudirun.py:521
gaudirun.s
string s
Definition: gaudirun.py:316