2 #ifndef GAUDIPROPERTYPARSERS_PARSERVALUETOSTREAM_H 3 #define GAUDIPROPERTYPARSERS_PARSERVALUETOSTREAM_H 1 17 #include <type_traits> 61 template <
class ITERATOR>
79 auto c = ( std::string::npos == obj.
find(
'\'') ?
'\'' :
'\"' );
80 return s <<
c << obj <<
c;
88 {
return s << ( obj ?
"True" :
"False" ) ; }
127 template<
class KTYPE,
class VTYPE>
132 toStream( obj.first, s <<
"( " ) <<
" , " )
142 template<
class TYPE,
class ALLOCATOR>
155 template<
class TYPE,
class ALLOCATOR>
168 template<
class TYPE,
class CMP,
class ALLOCATOR>
182 template<
class KTYPE,
class VTYPE,
class CMP,
class ALLOCATOR>
202 template<
class KTYPE,
class VTYPE,
class CMP,
class ALLOCATOR>
222 template<
class KTYPE,
class VTYPE,
class MAP>
242 template<
class KTYPE,
class VTYPE,
class HASH,
class MAP>
254 template <
class TYPE,
unsigned int N>
257 return toStream ( obj , obj + N , s ,
"( " ,
" )" ,
" , " ) ;
264 template <
class TYPE,
unsigned int N>
267 return toStream ( obj , obj + N , s ,
"( " ,
" )" ,
" , " ) ;
274 template <
unsigned int N>
282 template <
unsigned int N>
300 {
return s << obj ; }
313 template <
class ITERATOR>
326 {
return toStream( i, os ); } ) << close;
330 template<
class Tuple, std::
size_t N>
339 template<
class Tuple>
353 template<
typename... Args>
366 template <
class TYPE>
370 std::ios::fmtflags orig_flags = s.
flags();
371 s.
setf(std::ios::showpoint);
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Extension of the STL map.
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
static std::ostream & toStream(const Tuple &t, std::ostream &s)
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Provide serialization function (output only) for some common STL classes (vectors, lists, pairs, maps) plus GaudiUtils::Map and GaudiUtils::HashMap.
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
Common class providing an architecture-independent hash map.
static std::ostream & toStream(const Tuple &t, std::ostream &s)
Helper functions to set/get the application return code.