Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (f31105fd)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ParsersStandardSingle.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 \***********************************************************************************/
17 #ifndef __clang__
18 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
19 #endif
20 // ============================================================================
21 // Include files
22 // ============================================================================
24 #include <Gaudi/Parsers/Factory.h>
25 // ============================================================================
26 // STD & STL
27 // ============================================================================
28 #include <string>
29 #include <string_view>
30 // ============================================================================
31 // ============================================================================
32 #define PARSERS_DEF_FOR_SINGLE( Type ) \
33  StatusCode Gaudi::Parsers::parse( Type& result, std::string_view input ) { \
34  return Gaudi::Parsers::parse_( result, input ); \
35  }
36 // ============================================================================
39 PARSERS_DEF_FOR_SINGLE( unsigned char )
40 PARSERS_DEF_FOR_SINGLE( signed char )
43 PARSERS_DEF_FOR_SINGLE( unsigned short )
44 PARSERS_DEF_FOR_SINGLE( unsigned int )
46 PARSERS_DEF_FOR_SINGLE( unsigned long )
47 PARSERS_DEF_FOR_SINGLE( long long )
48 PARSERS_DEF_FOR_SINGLE( unsigned long long )
49 PARSERS_DEF_FOR_SINGLE( double )
50 #if BOOST_VERSION <= 105500
52 #else
53 // See GAUDI-1121.
54 StatusCode Gaudi::Parsers::parse( float& result, std::string_view input ) {
55  double tmp{ 0 };
56  StatusCode sc = Gaudi::Parsers::parse_( tmp, input );
57  result = static_cast<float>( tmp );
58  return sc;
59 }
60 #endif
61 PARSERS_DEF_FOR_SINGLE( long double )
std::string
STL class.
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:21
Gaudi::Parsers::parse_
StatusCode parse_(ResultT &result, std::string_view input)
Definition: Factory.h:39
StatusCode
Definition: StatusCode.h:65
Factory.h
PARSERS_DEF_FOR_SINGLE
#define PARSERS_DEF_FOR_SINGLE(Type)
@fixme workaround for a warning in a Boost spirit header
Definition: ParsersStandardSingle.cpp:32
CommonParsers.h