| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# StreamBuffer.h File Reference

`#include <list>`
`#include <vector>`
`#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...
## Defines
#define | GAUDIKERNEL_STREAMBUFFER_H 1
#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)

## Define Documentation

#define GAUDIKERNEL_STREAMBUFFER_H 1

Definition at line 3 of file StreamBuffer.h.

#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;                                                   \
      }

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::list< T > & | l |
| ) |  |  | `[inline]`

Definition at line 668 of file StreamBuffer.h.

    00668                                                                   {
    00669   s << l.size();
    00670   for ( typename std::list<T>::const_iterator i = l.begin(); i != l.end(); i++ )  {
    00671     s << (*i);
    00672   }
    00673   return s;
    00674 }

template<class T >

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

Definition at line 644 of file StreamBuffer.h.

    00644                                                                     {
    00645   s << v.size();
    00646   for ( typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); i++ )  {
    00647     s << (*i);
    00648   }
    00649   return s;
    00650 }

template<class T >

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

Definition at line 678 of file StreamBuffer.h.

    00678                                                             {
    00679   long i, len;
    00680   s >> len;
    00681   l.clear();
    00682   for ( i = 0; i < len; i++ )  {
    00683     T    temp;
    00684     s >> temp;
    00685     l.push_back(temp);
    00686   }
    00687   return s;
    00688 }

template<class T >

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

Definition at line 654 of file StreamBuffer.h.

    00654                                                               {
    00655   long i, len;
    00656   s >> len;
    00657   v.clear();
    00658   for ( i = 0; i < len; i++ )  {
    00659     T    temp;
    00660     s >> temp;
    00661     v.push_back(temp);
    00662   }
    00663   return s;
    00664 }

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines