The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
ParsersStandardMisc5.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2024 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\***********************************************************************************/
12
13StatusCode Gaudi::Parsers::parse( std::map<unsigned int, std::string>& result, std::string_view input ) {
14 return Gaudi::Parsers::parse_( result, input );
15}
16
17StatusCode Gaudi::Parsers::parse( std::string& name, std::string& value, std::string_view input ) {
18 Skipper skipper;
21 auto iter = input.begin();
22 bool parse_result = qi::phrase_parse( iter, input.end(), g, skipper, result ) && ( iter == input.end() );
23 if ( parse_result ) {
24 name = result.first;
25 value = result.second;
27 }
29}
30
31StatusCode Gaudi::Parsers::parse( std::map<std::string, std::pair<double, double>>& result, std::string_view input ) {
32 return Gaudi::Parsers::parse_( result, input );
33}
34
35StatusCode Gaudi::Parsers::parse( std::map<std::string, std::pair<int, int>>& result, std::string_view input ) {
36 return Gaudi::Parsers::parse_( result, input );
37}
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
SkipperGrammar< IteratorT > Skipper
Definition Factory.h:24
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
std::pair< std::string, std::string > ResultT
Definition Grammars.h:515