CMS 3D CMS Logo

MethodArgumentSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_MethodArgumentSetter_h
2 #define CommonTools_Utils_MethodArgumentSetter_h
3 /* \class reco::parser::MethodArgumentSetter
4  *
5  * MethodArgumenteger setter
6  *
7  * \author Luca Lista, INFN
8  *
9  * \version $Revision: 1.1 $
10  *
11  */
13 #include <cassert>
14 
15 namespace reco {
16  namespace parser {
19  template <typename T>
20  void operator()(const T &n) const {
21  stack_.push_back(AnyMethodArgument(n));
22  }
23  void operator()(const char *begin, const char *end) const {
24  assert(begin + 1 <= end - 1); // the quotes are included in [begin,end[ range.
25  //in boost 1.67, the parser appends any extra white space to the
26  // end
27  if (*(end - 1) != *begin) {
28  --end;
29  }
30  stack_.push_back(AnyMethodArgument(std::string(begin + 1, end - 1)));
31  }
32 
33  private:
35  };
36  } // namespace parser
37 } // namespace reco
38 
39 #endif
assert(be >=bs)
void operator()(const char *begin, const char *end) const
std::vector< AnyMethodArgument > MethodArgumentStack
MethodArgumentSetter(MethodArgumentStack &stack)
stack
Definition: svgfig.py:559
std::conditional< matches_another_integral_type< unsigned long >::value, std::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, float, std::string >, std::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, unsigned long, double, float, std::string > >::type AnyMethodArgument
fixed size matrix
long double T