| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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

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

Definition at line 325 of file StreamBuffer.h.

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

Definition at line 321 of file StreamBuffer.h.

## Function Documentation

template<class T >

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

Definition at line 662 of file StreamBuffer.h.

663 {
664 s << v.size();
665 for ( const auto& i : v ) s << i;
666 return s;
667 }
std::vector::size
T size(T...args)
gaudirun.s
string s
Definition: gaudirun.py:253
template<class T >

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

Definition at line 686 of file StreamBuffer.h.

687 {
688 s << l.size();
689 for ( const auto& i : l ) s << i;
690 return s;
691 }
std::list::size
T size(T...args)
gaudirun.s
string s
Definition: gaudirun.py:253
template<class T >

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

Definition at line 671 of file StreamBuffer.h.

672 {
673 long i, len;
674 s >> len;
675 v.clear();
676 for ( i = 0; i < len; i++ ) {
677 T temp;
678 s >> temp;
679 v.push_back( temp );
680 }
681 return s;
682 }
std::vector::push_back
T push_back(T...args)
std::vector::clear
T clear(T...args)
gaudirun.s
string s
Definition: gaudirun.py:253
template<class T >

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

Definition at line 695 of file StreamBuffer.h.

696 {
697 long len;
698 s >> len;
699 l.clear();
700 for ( long i = 0; i < len; i++ ) {
701 T temp;
702 s >> temp;
703 l.push_back( temp );
704 }
705 return s;
706 }
std::list::push_back
T push_back(T...args)
std::list::clear
T clear(T...args)
gaudirun.s
string s
Definition: gaudirun.py:253