CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.3 $
10  *
11  */
14 
15 namespace reco {
16  namespace parser {
17  struct FunctionSetter {
19  fun_(fun), stack_(stack) {}
20 
21  void operator()(const char *, const char *) const {
22 #ifdef BOOST_SPIRIT_DEBUG
23  BOOST_SPIRIT_DEBUG_OUT << "pushing math function: " << functionNames[ fun_ ] << std::endl;
24 #endif
25  stack_.push_back(fun_);
26  }
27  private:
30  };
31 
34  from_(stackFrom), to_(stackTo) {}
35  void operator()(const char &) const {
36  to_.push_back(from_.back());
37  from_.clear();
38  }
39  private:
42  };
43  }
44 }
45 
46 #endif
FunctionSetter(Function fun, FunctionStack &stack)
stack
Definition: svgfig.py:558
FunctionSetterCommit(FunctionStack &stackFrom, FunctionStack &stackTo)
void operator()(const char *, const char *) const
void operator()(const char &) const
std::vector< Function > FunctionStack
Definition: FunctionStack.h:17