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
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
cms::cuda::assert
assert(be >=bs)
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::parser::AnyMethodArgument
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
Definition: AnyMethodArgument.h:45
reco::parser::MethodArgumentSetter
Definition: MethodArgumentSetter.h:17
mps_fire.end
end
Definition: mps_fire.py:242
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::parser::MethodArgumentSetter::operator()
void operator()(const T &n) const
Definition: MethodArgumentSetter.h:20
svgfig.stack
stack
Definition: svgfig.py:559
reco::parser::MethodArgumentSetter::stack_
MethodArgumentStack & stack_
Definition: MethodArgumentSetter.h:34
reco::parser::MethodArgumentSetter::MethodArgumentSetter
MethodArgumentSetter(MethodArgumentStack &stack)
Definition: MethodArgumentSetter.h:18
T
long double T
Definition: Basic3DVectorLD.h:48
MethodArgumentStack.h
reco::parser::MethodArgumentStack
std::vector< AnyMethodArgument > MethodArgumentStack
Definition: MethodArgumentStack.h:17
reco::parser::MethodArgumentSetter::operator()
void operator()(const char *begin, const char *end) const
Definition: MethodArgumentSetter.h:23