CommonTools
Utils
src
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
*/
13
#include "
CommonTools/Utils/src/ExpressionUnaryOperator.h
"
14
#include "
CommonTools/Utils/src/ExpressionStack.h
"
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>
24
struct
op1_out {
25
static
const
std::string
value
;
26
};
27
#endif
28
29
template
<
typename
Op>
30
struct
ExpressionUnaryOperatorSetter
{
31
ExpressionUnaryOperatorSetter
(
ExpressionStack
&
stack
) :
stack_
(
stack
) {}
32
void
operator()
(
const
char
*,
const
char
*)
const
{
33
#ifdef BOOST_SPIRIT_DEBUG
34
BOOST_SPIRIT_DEBUG_OUT <<
"pushing unary operator"
<<
op1_out<Op>::value
<< std::endl;
35
#endif
36
stack_
.push_back(
ExpressionPtr
(
new
ExpressionUnaryOperator<Op>
(
stack_
)));
37
}
38
39
private
:
40
ExpressionStack
&
stack_
;
41
};
42
}
// namespace parser
43
}
// namespace reco
44
45
#endif
reco::parser::ExpressionUnaryOperatorSetter::ExpressionUnaryOperatorSetter
ExpressionUnaryOperatorSetter(ExpressionStack &stack)
Definition:
ExpressionUnaryOperatorSetter.h:31
reco::parser::ExpressionUnaryOperatorSetter::operator()
void operator()(const char *, const char *) const
Definition:
ExpressionUnaryOperatorSetter.h:32
reco::parser::ExpressionUnaryOperatorSetter::stack_
ExpressionStack & stack_
Definition:
ExpressionUnaryOperatorSetter.h:40
writedatasetfile.parser
parser
Definition:
writedatasetfile.py:7
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
ExpressionStack.h
svgfig.stack
stack
Definition:
svgfig.py:559
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:25
ExpressionUnaryOperator.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
reco::parser::ExpressionStack
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
Definition:
ExpressionStack.h:19
reco::parser::ExpressionUnaryOperator
Definition:
ExpressionUnaryOperator.h:19
reco::parser::ExpressionUnaryOperatorSetter
Definition:
ExpressionUnaryOperatorSetter.h:30
Generated for CMSSW Reference Manual by
1.8.16