CMS 3D CMS Logo

ComparisonSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ComparisonSetter_h
2 #define CommonTools_Utils_ComparisonSetter_h
3 /* \class reco::parser::ComparisonSetter
4  *
5  * Comparison 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 <iostream>
17 #include <string>
18 #endif
19 #include <memory>
20 
21 namespace reco {
22  namespace parser {
23 #ifdef BOOST_SPIRIT_DEBUG
24  template <typename Op>
25  struct cmp_out {
26  static const std::string value;
27  };
28 #endif
29 
30  template <class CompT>
33  void operator()(const char) const {
34 #ifdef BOOST_SPIRIT_DEBUG
35  BOOST_SPIRIT_DEBUG_OUT << "pushing comparison: " << cmp_out<CompT>::value << std::endl;
36 #endif
37  stack_.push_back(std::shared_ptr<ComparisonBase>(new Comparison<CompT>()));
38  }
39 
40  private:
42  };
43  } // namespace parser
44 } // namespace reco
45 
46 #endif
std::vector< std::shared_ptr< ComparisonBase > > ComparisonStack
ComparisonSetter(ComparisonStack &stack)
stack
Definition: svgfig.py:559
fixed size matrix
void operator()(const char) const