| The Gaudi Framework v29r1 (5cd95fa2)

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

- Namespace List
- Namespace Members

Namespaces | Classes | Functions
GaudiUtils Namespace Reference

Forward declarations for the functions in SerializeSTL.h. More...

## Namespaces
| details

## Classes
class | Allocator
| Allocator. More...
class | AllocatorPool
| Allocator pool. More...
struct | GenericHash
| Generic hash implementation (for easy migration to the new Hash class). More...
class | Hash
| Simple hash function. More...
struct | Hash< const T & >
| remove extra qualifiers: More...
struct | Hash< const T * >
| remove extra qualifiers: More...
struct | Hash< const T >
| remove extra qualifiers: More...
struct | Hash< const T(&)[N]>
| generic specialization for arrays More...
struct | Hash< T & >
| remove extra qualifiers: More...
struct | Hash< T * >
| the partial specialization for pointers More...
struct | Hash< T(&)[N]>
| generic specialization for arrays More...
class | HashMap
| Common class providing an architecture-independent hash map. More...
class | Map
| Extension of the STL map. More...
class | VectorMap
| A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandrescu. More...

## Functions
template<class T , class ALLOC >
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]". More...
template<class T , std::size_t N>
std::ostream & | operator<< (std::ostream &s, const std::array< T, N > &v)
| Serialize an std::array in a python like format. E.g. "[1, 2, 3]". More...
template<class T , class ALLOC >
std::ostream & | operator<< (std::ostream &s, const std::list< T, ALLOC > &l)
| Serialize an std::list in a python like format. E.g. "[1, 2, 3]". More...
template<class T1 , class T2 >
std::ostream & | operator<< (std::ostream &s, const std::pair< T1, T2 > &p)
| Serialize an std::list in a python like format. E.g. "(1, 2)". More...
template<class T1 , class T2 , class COMP , class ALLOC >
std::ostream & | 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}". More...
template<class K , class T , class M >
std::ostream & | operator<< (std::ostream &s, const GaudiUtils::Map< K, T, M > &m)
| Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}". More...
template<class K , class T , class H , class M >
std::ostream & | operator<< (std::ostream &s, const GaudiUtils::HashMap< K, T, H, M > &m)
| Serialize a GaudiUtils::HashMap in a python like format. More...

## Detailed Description

Forward declarations for the functions in SerializeSTL.h.

Author
  Marco Clemencic

See also
  SerializeSTL.h

## Function Documentation

template<class T , class ALLOC >

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

Serialize an std::vector in a python like format. E.g. "[1, 2, 3]".

Definition at line 62 of file SerializeSTL.h.

63 {
64 return details::ostream_joiner( s << '[', v, ", " ) << ']';
65 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:54
template<class T , std::size_t N>

std::ostream& GaudiUtils::operator<< | ( | std::ostream & | s,
|  | const std::array< T, N > & | v
| ) |  |
| inline

Serialize an std::array in a python like format. E.g. "[1, 2, 3]".

Definition at line 69 of file SerializeSTL.h.

70 {
71 return details::ostream_joiner( s << '[', v, ", " ) << ']';
72 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:54
template<class T , class ALLOC >

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

Serialize an std::list in a python like format. E.g. "[1, 2, 3]".

Definition at line 76 of file SerializeSTL.h.

77 {
78 return details::ostream_joiner( s << '[', l, ", " ) << ']';
79 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:54
template<class T1 , class T2 >

std::ostream & GaudiUtils::operator<< | ( | std::ostream & | s,
|  | const std::pair< T1, T2 > & | p
| ) |  |
| inline

Serialize an std::list in a python like format. E.g. "(1, 2)".

Definition at line 83 of file SerializeSTL.h.

84 {
85 return s << '(' << p.first << ", " << p.second << ')';
86 }
template<class T1 , class T2 , class COMP , class ALLOC >

std::ostream & GaudiUtils::operator<< | ( | std::ostream & | s,
|  | const std::map< T1, T2, COMP, ALLOC > & | m
| ) |  |
| inline

Serialize an std::map in a python like format. E.g. "{a: 1, b: 2}".

Definition at line 90 of file SerializeSTL.h.

91 {
92 return details::ostream_joiner( s << "{", m, ", ",
93 []( std::ostream& os, const std::pair<const T1, T2>& p ) -> std::ostream& {
94 return os << p.first << ": " << p.second;
95 } )
96 << "}";
97 }
std::pair
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:54
std::ostream
STL class.
template<class K , class T , class M >

std::ostream & GaudiUtils::operator<< | ( | std::ostream & | s,
|  | const GaudiUtils::Map< K, T, M > & | m
| ) |  |
| inline

Serialize a GaudiUtils::Map in a python like format. E.g. "{a: 1, b: 2}".

Definition at line 101 of file SerializeSTL.h.

102 {
103 // Serialize the internal map.
104 return s << static_cast<const M&>( m );
105 }
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:94
template<class K , class T , class H , class M >

std::ostream & GaudiUtils::operator<< | ( | std::ostream & | s,
|  | const GaudiUtils::HashMap< K, T, H, M > & | m
| ) |  |
| inline

Serialize a GaudiUtils::HashMap in a python like format.

E.g. "{a: 1, b: 2}". This implementation is not efficient, but very simple. Anyway a print-out of a hash map is not something that we do every second.

Definition at line 111 of file SerializeSTL.h.

112 {
113 // Copy the hash map into a map to have it ordered by key.
114 return s << GaudiUtils::Map<K, T>( m.begin(), m.end() );
115 }
GaudiUtils::Map::end
iterator end()
Definition: Map.h:134
GaudiUtils::Map::begin
iterator begin()
Definition: Map.h:133