CMS 3D CMS Logo

FunctionSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_FunctionSetter_h
2 #define CommonTools_Utils_FunctionSetter_h
3 /* \class reco::parser::FunctionSetter
4  *
5  * Function setter
6  *
7  * \author Luca Lista, INFN
8  *
9  * \version $Revision: 1.2 $
10  *
11  */
14 
15 namespace reco {
16  namespace parser {
17  struct FunctionSetter {
19 
20  void operator()(const char*, const char*) const {
21 #ifdef BOOST_SPIRIT_DEBUG
22  BOOST_SPIRIT_DEBUG_OUT << "pushing math function: " << functionNames[fun_] << std::endl;
23 #endif
24  stack_.push_back(fun_);
25  }
26 
27  private:
30  };
31 
33  FunctionSetterCommit(FunctionStack& stackFrom, FunctionStack& stackTo) : from_(stackFrom), to_(stackTo) {}
34  void operator()(const char&) const {
35  to_.push_back(from_.back());
36  from_.clear();
37  }
38 
39  private:
42  };
43  } // namespace parser
44 } // namespace reco
45 
46 #endif
FunctionSetter(Function fun, FunctionStack &stack)
stack
Definition: svgfig.py:559
FunctionSetterCommit(FunctionStack &stackFrom, FunctionStack &stackTo)
void operator()(const char *, const char *) const
fixed size matrix
void operator()(const char &) const
std::vector< Function > FunctionStack
Definition: FunctionStack.h:17