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
\***********************************************************************************/
11
#include "
ParsersStandardMiscCommon.h
"
12
13
StatusCode
Gaudi::Parsers::parse
( std::map<unsigned int, std::string>& result, std::string_view input ) {
14
return
Gaudi::Parsers::parse_
( result, input );
15
}
16
17
StatusCode
Gaudi::Parsers::parse
( std::string& name, std::string& value, std::string_view input ) {
18
Skipper
skipper;
19
KeyValueGrammar<IteratorT, Skipper>
g;
20
KeyValueGrammar<IteratorT, Skipper>::ResultT
result;
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;
26
return
StatusCode::SUCCESS
;
27
}
28
return
StatusCode::FAILURE
;
29
}
30
31
StatusCode
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
35
StatusCode
Gaudi::Parsers::parse
( std::map<std::string, std::pair<int, int>>& result, std::string_view input ) {
36
return
Gaudi::Parsers::parse_
( result, input );
37
}
ParsersStandardMiscCommon.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition
StatusCode.h:99
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition
StatusCode.h:100
Gaudi::Parsers::Skipper
SkipperGrammar< IteratorT > Skipper
Definition
Factory.h:24
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:26
Gaudi::Parsers::KeyValueGrammar
Definition
Grammars.h:514
Gaudi::Parsers::KeyValueGrammar::ResultT
std::pair< std::string, std::string > ResultT
Definition
Grammars.h:515
GaudiKernel
src
Lib
ParsersStandardMisc5.cpp
Generated on Wed Oct 8 2025 09:53:37 for The Gaudi Framework by
1.13.1