Classes | |
class | Allocator |
Allocator. More... | |
class | AllocatorPool |
Allocator pool. More... | |
class | Hash |
Simple hash function based on Stroustrup example. More... | |
struct | Hash< T * > |
struct | Hash< const T * > |
struct | Hash< T & > |
struct | Hash< const T & > |
struct | Hash< void * > |
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 'LokiAssocVector' 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]". | |
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]". | |
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)". | |
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}". | |
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}". | |
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. | |
void | _throw_out_of_range_exception_ () |
throw the out_of_range_exception |
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 29 of file SerializeSTL.h.
00030 { 00031 s << "["; 00032 //int cnt = 0; 00033 for(typename std::vector<T,ALLOC>::const_iterator i=v.begin(); i!=v.end(); ++i) { 00034 if ( i != v.begin()) s << ", "; 00035 s << (*i); 00036 //if ((++cnt)%NUMBERS_PER_LINE == 0) s << std::endl; 00037 } 00038 s << "]"; 00039 return s; 00040 }
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 44 of file SerializeSTL.h.
00045 { 00046 s << "["; 00047 //int cnt = 0; 00048 for(typename std::list<T,ALLOC>::const_iterator i=l.begin(); i!=l.end(); ++i) { 00049 if ( i != l.begin()) s << ", "; 00050 s << (*i); 00051 //if ((++cnt)%NUMBERS_PER_LINE == 0) s << std::endl; 00052 } 00053 s << "]"; 00054 return s; 00055 }
std::ostream& GaudiUtils::operator<< | ( | std::ostream & | s, | |
const std::pair< T1, T2 > & | p | |||
) | [inline] |
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 66 of file SerializeSTL.h.
00068 { 00069 s << "{"; 00070 for ( typename std::map<T1,T2,COMP,ALLOC>::const_iterator i = m.begin(); 00071 i != m.end(); ++i ) { 00072 if ( i != m.begin() ) s << ", "; 00073 s << i->first << ": " << i->second; 00074 } 00075 s << "}"; 00076 return s; 00077 }
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 81 of file SerializeSTL.h.
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 92 of file SerializeSTL.h.
00094 { 00095 // Copy the hash map into a map to have it ordered by key. 00096 return s << GaudiUtils::Map<K,T>(m.begin(),m.end()); 00097 }
void GaudiUtils::_throw_out_of_range_exception_ | ( | ) |
throw the out_of_range_exception