DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
ParsersStandardMisc5.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 //==========================================================================
11 #include "Parsers/spirit/ParsersStandardMiscCommon.h"
12 
13 #if defined(DD4HEP_HAVE_ALL_PARSERS)
14 namespace dd4hep {
17  namespace Parsers {
18 
19  template <> int parse(std::map<unsigned int, std::string>& result, const std::string& input) {
20  return parse_(result, input);
21  }
22  }
23 }
24 #endif
25 #if 0
26 namespace dd4hep {
29  namespace Parsers {
30 
31  template <> int parse(std::string& name, std::string& value, const std::string& input ) {
32  Skipper skipper;
33  KeyValueGrammar<IteratorT, Skipper> g;
34  KeyValueGrammar<IteratorT, Skipper>::ResultT result;
35  std::string::const_iterator iter = input.begin();
36  bool parse_result = qi::phrase_parse(iter, input.end(), g, skipper,
37  result) && (iter==input.end());
38  if (parse_result) {
39  name = result.first;
40  value = result.second;
41  }
42  return parse_result;
43  }
44 
45  template <> int parse(std::map<std::string, std::pair<double, double> >& result, const std::string& input) {
46  return parse_(result, input);
47  }
48  }
49 }
50 #endif
dd4hep::Parsers::parse
int parse(Property &result, const std::string &input)
Definition: ComponentProperties.cpp:187
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28