| The Gaudi Framework v32r1 (f65d50dc)

ParsersStandardSingle.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 #include <Gaudi/Parsers/CommonParsers.h>
5 #include <Gaudi/Parsers/Factory.h>
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <map>
10 #include <set>
11 #include <string>
12 #include <vector>
13 // ============================================================================
14 // ============================================================================
15 #define PARSERS_DEF_FOR_SINGLE( Type ) \
16 StatusCode Gaudi::Parsers::parse( Type& result, const std::string& input ) { \
17 return Gaudi::Parsers::parse_( result, input ); \
18 }
19 // ============================================================================
20 PARSERS_DEF_FOR_SINGLE( bool )
21 PARSERS_DEF_FOR_SINGLE( char )
22 PARSERS_DEF_FOR_SINGLE( unsigned char )
23 PARSERS_DEF_FOR_SINGLE( signed char )
24 PARSERS_DEF_FOR_SINGLE( int )
25 PARSERS_DEF_FOR_SINGLE( short )
26 PARSERS_DEF_FOR_SINGLE( unsigned short )
27 PARSERS_DEF_FOR_SINGLE( unsigned int )
28 PARSERS_DEF_FOR_SINGLE( long )
29 PARSERS_DEF_FOR_SINGLE( unsigned long )
30 PARSERS_DEF_FOR_SINGLE( long long )
31 PARSERS_DEF_FOR_SINGLE( unsigned long long )
32 PARSERS_DEF_FOR_SINGLE( double )
33 #if BOOST_VERSION <= 105500
34 PARSERS_DEF_FOR_SINGLE( float )
35 #else
36 // See GAUDI-1121.
37 StatusCode Gaudi::Parsers::parse( float& result, const std::string& input ) {
38 double tmp{0};
39 StatusCode sc = Gaudi::Parsers::parse_( tmp, input );
40 result = static_cast<float>( tmp );
41 return sc;
42 }
43 #endif
44 PARSERS_DEF_FOR_SINGLE( long double )
45 PARSERS_DEF_FOR_SINGLE( std::string )
Gaudi::Parsers::parse_
StatusCode parse_(ResultT &result, const std::string &input)
Definition: Factory.h:29
PARSERS_DEF_FOR_SINGLE
#define PARSERS_DEF_FOR_SINGLE(Type)
Definition: ParsersStandardSingle.cpp:15
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:11
CommonParsers.h
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Factory.h