#include <MethodInvoker.h>
Public Member Functions | |
std::pair< edm::ObjectWithDict, bool > | invoke (const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const |
double | retToDouble (const edm::ObjectWithDict &) const |
convert the output of invoke to a double, if possible More... | |
SingleInvoker (const edm::TypeWithDict &, const std::string &name, const std::vector< AnyMethodArgument > &args) | |
void | throwFailedConversion (const edm::ObjectWithDict &) const |
~SingleInvoker () | |
Private Attributes | |
std::vector< MethodInvoker > | invokers_ |
bool | isRefGet_ |
true if this invoker just pops out a ref and returns (ref.get(), false) More... | |
method::TypeCode | retType_ |
edm::ObjectWithDict | storage_ |
bool | storageNeedsDestructor_ |
A bigger brother of the MethodInvoker:
Definition at line 69 of file MethodInvoker.h.
SingleInvoker::SingleInvoker | ( | const edm::TypeWithDict & | type, |
const std::string & | name, | ||
const std::vector< AnyMethodArgument > & | args | ||
) |
Definition at line 240 of file MethodInvoker.cc.
References reco::parser::LazyInvoker::invokers_, reco::parser::ExpressionVar::makeStorage(), reco::parser::MethodSetter::push(), reco::typeCode(), and ~SingleInvoker().
Referenced by reco::parser::LazyInvoker::invokeLast().
SingleInvoker::~SingleInvoker | ( | ) |
Definition at line 265 of file MethodInvoker.cc.
References reco::parser::ExpressionVar::delStorage(), and invoke().
Referenced by SingleInvoker().
pair< edm::ObjectWithDict, bool > SingleInvoker::invoke | ( | const edm::ObjectWithDict & | o, |
std::vector< edm::ObjectWithDict > & | v | ||
) | const |
If the member is found in object o, evaluate and return (value,true) If the member is not found but o is a Ref/RefToBase/Ptr, (return o.get(), false) the actual edm::ObjectWithDict where the result is stored will be pushed in vector so that, if needed, its destructor can be called
Definition at line 272 of file MethodInvoker.cc.
References reco::parser::LazyInvoker::invokers_, and retToDouble().
Referenced by reco::parser::LazyInvoker::invoke(), reco::parser::LazyInvoker::invokeLast(), and ~SingleInvoker().
double SingleInvoker::retToDouble | ( | const edm::ObjectWithDict & | o | ) | const |
convert the output of invoke to a double, if possible
Definition at line 292 of file MethodInvoker.cc.
References reco::parser::ExpressionVar::isValidReturnType(), reco::parser::ExpressionVar::objToDouble(), and throwFailedConversion().
Referenced by invoke(), and reco::parser::LazyInvoker::invokeLast().
void SingleInvoker::throwFailedConversion | ( | const edm::ObjectWithDict & | o | ) | const |
Definition at line 302 of file MethodInvoker.cc.
References edm::errors::Configuration, Exception, reco::parser::LazyInvoker::invokers_, edm::TypeWithDict::qualifiedName(), and edm::ObjectWithDict::typeOf().
Referenced by retToDouble().
|
private |
Definition at line 72 of file MethodInvoker.h.
|
private |
true if this invoker just pops out a ref and returns (ref.get(), false)
Definition at line 76 of file MethodInvoker.h.
|
private |
Definition at line 71 of file MethodInvoker.h.
|
mutableprivate |
Definition at line 73 of file MethodInvoker.h.
|
private |
Definition at line 74 of file MethodInvoker.h.