The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
Factory.h
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\***********************************************************************************/
11#pragma once
12
15#include <boost/mpl/assert.hpp>
16#include <boost/type_traits.hpp>
17#include <map>
18#include <string>
19#include <vector>
20
21namespace Gaudi {
22 namespace Parsers {
23 typedef std::string_view::const_iterator IteratorT;
25 template <typename ResultT>
26 inline StatusCode parse_( ResultT& result, std::string_view input ) {
27 Skipper skipper;
29 IteratorT iter = input.begin(), end = input.end();
30 return ( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ? StatusCode::SUCCESS
32 }
33 template <>
34 inline StatusCode parse_( std::string& result, std::string_view input ) {
35 Skipper skipper;
37 IteratorT iter = input.begin(), end = input.end();
38 if ( !( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ) ) { result = input; }
39 //@attention always
41 }
42 template <typename ResultT>
43 inline StatusCode parse( ResultT& result, std::string_view input ) {
44 return parse_( result, input );
45 }
46 } // namespace Parsers
47} // namespace Gaudi
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.
std::string_view::const_iterator IteratorT
Definition Factory.h:23
StatusCode parse_(ResultT &result, std::string_view input)
Definition Factory.h:26
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1