CMS 3D CMS Logo

ExpressionUnaryOperatorSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ExpressionUnaryOperatorSetter_h
2 #define CommonTools_Utils_ExpressionUnaryOperatorSetter_h
3 /* \class reco::parser::ExpressionUnaryOperator
4  *
5  * Unary Operator expression setter
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted by Luca Lista, INFN
9  *
10  * \version $Revision: 1.2 $
11  *
12  */
15 #ifdef BOOST_SPIRIT_DEBUG
16 #include <string>
17 #include <iostream>
18 #endif
19 namespace reco {
20  namespace parser {
21 
22 #ifdef BOOST_SPIRIT_DEBUG
23  template <typename Op> struct op1_out { static const std::string value; };
24 #endif
25 
26  template<typename Op>
29  void operator()(const char*, const char*) const {
30 #ifdef BOOST_SPIRIT_DEBUG
31  BOOST_SPIRIT_DEBUG_OUT << "pushing unary operator" << op1_out<Op>::value << std::endl;
32 #endif
33  stack_.push_back(ExpressionPtr(new ExpressionUnaryOperator<Op>(stack_)));
34  }
35  private:
37  };
38  }
39 }
40 
41 #endif
void operator()(const char *, const char *) const
boost::shared_ptr< ExpressionBase > ExpressionPtr
std::vector< boost::shared_ptr< ExpressionBase > > ExpressionStack
stack
Definition: svgfig.py:558
fixed size matrix