| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 50 of file SerializeSTL.h.

51 {
52 return details::ostream_joiner( s << '[', v, ", " ) << ']';
53 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:42
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 57 of file SerializeSTL.h.

58 {
59 return details::ostream_joiner( s << '[', v, ", " ) << ']';
60 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:42
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 64 of file SerializeSTL.h.

65 {
66 return details::ostream_joiner( s << '[', l, ", " ) << ']';
67 }
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:42
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 71 of file SerializeSTL.h.

72 {
73 return s << '(' << p.first << ", " << p.second << ')';
74 }
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 78 of file SerializeSTL.h.

80 {
81 return details::ostream_joiner( s << "{", m, ", ",
82 [](std::ostream& os, const std::pair<const T1,T2>& p)
83 -> std::ostream&
84 { return os << p.first << ": " << p.second; } )
85 << "}";
86 }
std::pair
GaudiUtils::details::ostream_joiner
Stream & ostream_joiner(Stream &os, const Container &c, Separator sep, OutputElement output=OutputElement{})
Definition: SerializeSTL.h:42
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 90 of file SerializeSTL.h.

92 {
93 // Serialize the internal map.
94 return s << static_cast<const M&>(m);
95 }
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:93
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 101 of file SerializeSTL.h.

103 {
104 // Copy the hash map into a map to have it ordered by key.
105 return s << GaudiUtils::Map<K,T>(m.begin(),m.end());
106 }
GaudiUtils::Map::end
iterator end()
Definition: Map.h:132
GaudiUtils::Map::begin
iterator begin()
Definition: Map.h:131