| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- File List
- File Members

Classes | Macros | Functions
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 >
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:645
operator>>
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 }
std::vector::size
T size(T...args)
gaudirun.s
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 }
std::list::size
T size(T...args)
gaudirun.s
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 }
std::vector::push_back
T push_back(T...args)
std::vector::clear
T clear(T...args)
gaudirun.s
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 }
std::list::push_back
T push_back(T...args)
std::list::clear
T clear(T...args)
gaudirun.s
string s
Definition: gaudirun.py:245