The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
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
23#include <string>
24#include <string_view>
25
26#define PARSERS_DEF_FOR_SINGLE( Type ) \
27 StatusCode Gaudi::Parsers::parse( Type& result, std::string_view input ) { \
28 return Gaudi::Parsers::parse_( result, input ); \
29 }
30
33PARSERS_DEF_FOR_SINGLE( unsigned char )
34PARSERS_DEF_FOR_SINGLE( signed char )
37PARSERS_DEF_FOR_SINGLE( unsigned short )
38PARSERS_DEF_FOR_SINGLE( unsigned int )
40PARSERS_DEF_FOR_SINGLE( unsigned long )
41PARSERS_DEF_FOR_SINGLE( long long )
42PARSERS_DEF_FOR_SINGLE( unsigned long long )
44#if BOOST_VERSION <= 105500
46#else
47// See GAUDI-1121.
48StatusCode Gaudi::Parsers::parse( float& result, std::string_view input ) {
49 double tmp{ 0 };
50 StatusCode sc = Gaudi::Parsers::parse_( tmp, input );
51 result = static_cast<float>( tmp );
52 return sc;
53}
54#endif
55PARSERS_DEF_FOR_SINGLE( long double )
56PARSERS_DEF_FOR_SINGLE( std::string )
The declaration of major parsing functions used e.g for (re)implementation of new extended properties...
#define PARSERS_DEF_FOR_SINGLE(Type)
@fixme workaround for a warning in a Boost spirit header
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
StatusCode parse_(ResultT &result, std::string_view input)
Definition Factory.h:26