The Gaudi Framework  v33r1 (b1225454)
ParsersStandardSingle.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // ============================================================================
12 // Include files
13 // ============================================================================
15 #include <Gaudi/Parsers/Factory.h>
16 // ============================================================================
17 // STD & STL
18 // ============================================================================
19 #include <map>
20 #include <set>
21 #include <string>
22 #include <vector>
23 // ============================================================================
24 // ============================================================================
25 #define PARSERS_DEF_FOR_SINGLE( Type ) \
26  StatusCode Gaudi::Parsers::parse( Type& result, const std::string& input ) { \
27  return Gaudi::Parsers::parse_( result, input ); \
28  }
29 // ============================================================================
32 PARSERS_DEF_FOR_SINGLE( unsigned char )
33 PARSERS_DEF_FOR_SINGLE( signed char )
36 PARSERS_DEF_FOR_SINGLE( unsigned short )
37 PARSERS_DEF_FOR_SINGLE( unsigned int )
39 PARSERS_DEF_FOR_SINGLE( unsigned long )
40 PARSERS_DEF_FOR_SINGLE( long long )
41 PARSERS_DEF_FOR_SINGLE( unsigned long long )
42 PARSERS_DEF_FOR_SINGLE( double )
43 #if BOOST_VERSION <= 105500
45 #else
46 // See GAUDI-1121.
47 StatusCode Gaudi::Parsers::parse( float& result, const std::string& input ) {
48  double tmp{0};
49  StatusCode sc = Gaudi::Parsers::parse_( tmp, input );
50  result = static_cast<float>( tmp );
51  return sc;
52 }
53 #endif
54 PARSERS_DEF_FOR_SINGLE( long double )
StatusCode parse_(ResultT &result, const std::string &input)
Definition: Factory.h:39
#define PARSERS_DEF_FOR_SINGLE(Type)
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
STL class.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61