The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
SerializeSTL.h File Reference

Provide serialization function (output only) for some common STL classes (vectors, lists, pairs, maps). More...

#include <array>
#include <list>
#include <map>
#include <ostream>
#include <set>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for SerializeSTL.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GaudiUtils::details::IdentityOutputter
 

Namespaces

namespace  GaudiUtils
 
namespace  GaudiUtils::details
 

Functions

template<class T1, class T2>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::pair< T1, T2 > &p)
 Serialize an std::pair in a python like format. E.g. "(1, 2)".
 
template<typename... Args>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::tuple< Args... > &tuple)
 Serialize an std::tuple in a python like format. E.g. "(1, 2)".
 
template<class T, class ALLOC>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::vector< T, ALLOC > &v)
 Serialize an std::vector in a python like format. E.g. "[1, 2, 3]".
 
template<class T, std::size_t N>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::array< T, N > &v)
 Serialize an std::array in a python like format. E.g. "[1, 2, 3]".
 
template<class T, class ALLOC>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::list< T, ALLOC > &l)
 Serialize an std::list in a python like format. E.g. "[1, 2, 3]".
 
template<class T, class ALLOC>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::set< T, ALLOC > &l)
 Serialize an std::set in a python like format. E.g. "[1, 2, 3]".
 
template<class T, class ALLOC>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::unordered_set< T, ALLOC > &l)
 Serialize an std::unordered_set in a python like format. E.g. "{1, 2, 3}".
 
template<class T1, class T2, class COMP, class ALLOC>
std::ostream & GaudiUtils::operator<< (std::ostream &s, const std::map< T1, T2, COMP, ALLOC > &m)
 Serialize an std::map in a python like format. E.g. "{a: 1, b: 2}".
 
template<typename Stream, typename Iterator, typename Separator, typename OutputElement = IdentityOutputter>
Stream & GaudiUtils::details::ostream_joiner (Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
 
template<typename Stream, typename Container, typename Separator, typename OutputElement = IdentityOutputter>
Stream & GaudiUtils::details::ostream_joiner (Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
 

Detailed Description

Provide serialization function (output only) for some common STL classes (vectors, lists, pairs, maps).

To use the serializer provided by this file, one should add "using namespace GaudiUtils" (possibly inside the function (scope) calling "<<").

Author
Marco Clemencic (adapted from the code found in LHCbKernel, original author unknown)

Definition in file SerializeSTL.h.