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
reco::parser::FunctionSetter
Definition: FunctionSetter.h:17
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
reco::parser::FunctionSetter::stack_
FunctionStack & stack_
Definition: FunctionSetter.h:29
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::parser::FunctionSetter::FunctionSetter
FunctionSetter(Function fun, FunctionStack &stack)
Definition: FunctionSetter.h:18
reco::parser::FunctionSetter::operator()
void operator()(const char *, const char *) const
Definition: FunctionSetter.h:20
reco::parser::FunctionStack
std::vector< Function > FunctionStack
Definition: FunctionStack.h:17
reco::parser::FunctionSetterCommit::FunctionSetterCommit
FunctionSetterCommit(FunctionStack &stackFrom, FunctionStack &stackTo)
Definition: FunctionSetter.h:33
reco::parser::FunctionSetterCommit
Definition: FunctionSetter.h:32
svgfig.stack
stack
Definition: svgfig.py:559
reco::parser::FunctionSetterCommit::operator()
void operator()(const char &) const
Definition: FunctionSetter.h:34
reco::parser::FunctionSetter::fun_
Function fun_
Definition: FunctionSetter.h:28
FunctionStack.h
reco::parser::FunctionSetterCommit::to_
FunctionStack & to_
Definition: FunctionSetter.h:41
Function.h
reco::parser::Function
Function
Definition: Function.h:18
reco::parser::FunctionSetterCommit::from_
FunctionStack & from_
Definition: FunctionSetter.h:40