| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

ParsersStandardSingle.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 #include "GaudiKernel/Parsers.h"
5 #include "GaudiKernel/ParsersFactory.h"
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <string>
10 #include <vector>
11 #include <set>
12 #include <map>
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: ParsersFactory.h:31
Parsers.h
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
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
ParsersFactory.h
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26