src
CommonTools
Utils
interface
parser
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
*/
12
#include "
CommonTools/Utils/interface/parser/Function.h
"
13
#include "
CommonTools/Utils/interface/parser/FunctionStack.h
"
14
15
namespace
reco
{
16
namespace
parser
{
17
struct
FunctionSetter
{
18
FunctionSetter
(
Function
fun,
FunctionStack
&
stack
) :
fun_
(fun),
stack_
(
stack
) {}
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
:
28
Function
fun_
;
29
FunctionStack
&
stack_
;
30
};
31
32
struct
FunctionSetterCommit
{
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
:
40
FunctionStack
&
from_
;
41
FunctionStack
&
to_
;
42
};
43
}
// namespace parser
44
}
// namespace reco
45
46
#endif
reco::parser::FunctionSetterCommit::operator()
void operator()(const char &) const
Definition:
FunctionSetter.h:34
reco::parser::Function
Function
Definition:
Function.h:18
FunctionStack.h
reco::parser::FunctionSetterCommit::to_
FunctionStack & to_
Definition:
FunctionSetter.h:41
Function.h
reco::parser::FunctionSetter::operator()
void operator()(const char *, const char *) const
Definition:
FunctionSetter.h:20
reco::parser::FunctionSetterCommit::from_
FunctionStack & from_
Definition:
FunctionSetter.h:40
reco::parser::FunctionSetter::FunctionSetter
FunctionSetter(Function fun, FunctionStack &stack)
Definition:
FunctionSetter.h:18
reco::parser::FunctionSetter::stack_
FunctionStack & stack_
Definition:
FunctionSetter.h:29
svgfig.stack
stack
Definition:
svgfig.py:559
reco::parser::FunctionSetterCommit
Definition:
FunctionSetter.h:32
reco::parser::FunctionSetterCommit::FunctionSetterCommit
FunctionSetterCommit(FunctionStack &stackFrom, FunctionStack &stackTo)
Definition:
FunctionSetter.h:33
reco::parser::FunctionSetter::fun_
Function fun_
Definition:
FunctionSetter.h:28
writedatasetfile.parser
parser
Definition:
writedatasetfile.py:7
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
reco::parser::FunctionSetter
Definition:
FunctionSetter.h:17
reco::parser::FunctionStack
std::vector< Function > FunctionStack
Definition:
FunctionStack.h:17
Generated for CMSSW Reference Manual by
1.8.14