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  private:
34  };
35  }
36 }
37 
38 #endif
std::vector< AnyMethodArgument > MethodArgumentStack
MethodArgumentSetter(MethodArgumentStack &stack)
stack
Definition: svgfig.py:559
#define end
Definition: vmac.h:39
boost::mpl::if_< matches_another_integral_type< unsigned long >, boost::variant< int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, float, std::string >, boost::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
void operator()(const char *begin, const char *end) const
fixed size matrix
#define begin
Definition: vmac.h:32
long double T