12 #ifndef GAUDIKERNEL_SERIALIZESTL_H_ 13 #define GAUDIKERNEL_SERIALIZESTL_H_ 32 return os << std::forward<T>( t );
36 template <
typename Stream,
typename Iterator,
typename Separator,
typename OutputElement = IdentityOutputter>
38 OutputElement
output = OutputElement{} ) {
39 if ( first != last ) {
43 for ( ; first != last; ++first ) {
output( os << sep, *first ); }
47 template <
typename Stream,
typename Container,
typename Separator,
typename OutputElement = IdentityOutputter>
48 Stream&
ostream_joiner( Stream& os,
const Container&
c, Separator sep, OutputElement
output = OutputElement{} ) {
54 template <
class T,
class ALLOC>
60 template <
class T, std::
size_t N>
66 template <
class T,
class ALLOC>
72 template <
class T1,
class T2>
74 return s <<
'(' << p.first <<
", " << p.second <<
')';
78 template <
class T1,
class T2,
class COMP,
class ALLOC>
82 return os << p.first <<
": " << p.second;
88 template <
class K,
class T,
class M>
91 return s << static_cast<const M&>(
m );
97 template <
class K,
class T,
class H,
class M>
100 return s << GaudiUtils::Map<K, T>(
m.begin(),
m.end() );
Extension of the STL map.
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
std::ostream & operator()(std::ostream &os, T &&t) const
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Forward declarations for the functions in SerializeSTL.h.
Common class providing an architecture-independent hash map.
std::ostream & operator<<(std::ostream &s, const std::vector< T, ALLOC > &v)
Serialize an std::vector in a python like format. E.g. "[1, 2, 3]".