2 #ifndef GAUDIPROPERTYPARSERS_PARSERVALUETOSTREAM_H 3 #define GAUDIPROPERTYPARSERS_PARSERVALUETOSTREAM_H 1 18 #include <type_traits> 62 template <
class ITERATOR>
80 auto c = ( std::string::npos == obj.
find(
'\'') ?
'\'' :
'\"' );
81 return s <<
c << obj <<
c;
89 {
return s << ( obj ?
"True" :
"False" ) ; }
128 template<
class KTYPE,
class VTYPE>
133 toStream( obj.first, s <<
"( " ) <<
" , " )
143 template<
class TYPE,
class ALLOCATOR>
156 template<
class TYPE,
class ALLOCATOR>
169 template<
class TYPE,
class CMP,
class ALLOCATOR>
183 template<
class KTYPE,
class VTYPE,
class CMP,
class ALLOCATOR>
203 template<
class KTYPE,
class VTYPE,
class CMP,
class ALLOCATOR>
223 template<
class KTYPE,
class VTYPE,
class MAP>
243 template<
class KTYPE,
class VTYPE,
class HASH,
class MAP>
255 template <
class TYPE,
unsigned int N>
258 return toStream ( obj , obj + N , s ,
"( " ,
" )" ,
" , " ) ;
265 template <
class TYPE, std::
size_t N>
275 template <
unsigned int N>
293 {
return s << obj ; }
306 template <
class ITERATOR>
319 {
return toStream( i, os ); } ) << close;
323 template<
class Tuple, std::
size_t N>
332 template<
class Tuple>
346 template<
typename... Args>
359 template <
class TYPE>
363 std::ios::fmtflags orig_flags = s.
flags();
364 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)
AttribStringParser::Iterator end(const AttribStringParser &)
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)
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Helper functions to set/get the application return code.