The Gaudi Framework
master (37c0b60a)
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
}
Gaudi::Parsers::KeyValueGrammar
Definition:
Grammars.h:580
std::string
STL class.
std::pair< std::string, std::string >
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
ParsersStandardMiscCommon.h
Gaudi::Parsers::parse_
StatusCode parse_(ResultT &result, std::string_view input)
Definition:
Factory.h:39
StatusCode
Definition:
StatusCode.h:65
gaudirun.g
dictionary g
Definition:
gaudirun.py:582
Gaudi::Parsers::SkipperGrammar
Definition:
Grammar.h:51
std::map< unsigned int, std::string >
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
ConditionsStallTest.name
name
Definition:
ConditionsStallTest.py:77
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition:
StatusCode.h:101
GaudiKernel
src
Lib
ParsersStandardMisc5.cpp
Generated on Thu Dec 19 2024 15:35:03 for The Gaudi Framework by
1.8.18