| The Gaudi Framework v32r1 (f65d50dc)

ParsersStandardMisc5.cpp
Go to the documentation of this file.
1 #include "ParsersStandardMiscCommon.h"
2
3 StatusCode Gaudi::Parsers::parse( std::map<unsigned int, std::string>& result, const std::string& input ) {
4 return Gaudi::Parsers::parse_( result, input );
5 }
6
7 StatusCode Gaudi::Parsers::parse( std::string& name, std::string& value, const std::string& input ) {
8 Skipper skipper;
9 KeyValueGrammar<IteratorT, Skipper> g;
10 KeyValueGrammar<IteratorT, Skipper>::ResultT result;
11 auto iter = input.begin();
12 bool parse_result = qi::phrase_parse( iter, input.end(), g, skipper, result ) && ( iter == input.end() );
13 if ( parse_result ) {
14 name = result.first;
15 value = result.second;
16 return StatusCode::SUCCESS;
17 }
18 return StatusCode::FAILURE;
19 }
20
21 StatusCode Gaudi::Parsers::parse( std::map<std::string, std::pair<double, double>>& result, const std::string& input ) {
22 return Gaudi::Parsers::parse_( result, input );
23 }
Gaudi::Parsers::parse_
StatusCode parse_(ResultT &result, const std::string &input)
Definition: Factory.h:29
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
ParsersStandardMiscCommon.h
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:11
std::string::end
T end(T... args)
std::map
STL class.
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Gaudi::Parsers::SkipperGrammar
Definition: Grammar.h:41
std::pair
std::string::begin
T begin(T... args)
gaudirun.g
dictionary g
Definition: gaudirun.py:520
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Gaudi::Parsers::KeyValueGrammar
Definition: Grammars.h:557