14 : method_(method), member_(), ints_(ints), isFunction_(
true) {
34 : method_(), member_(member), ints_(), isFunction_(
false) {
51 : method_(rhs.method_),
54 isFunction_(rhs.isFunction_),
55 retTypeFinal_(rhs.retTypeFinal_) {
73 for (
size_t i = 0;
i <
ints_.size(); ++
i) {
118 if (addr ==
nullptr) {
120 <<
"method \"" <<
methodName() <<
"\" called with " <<
args_.size() <<
" arguments returned a null pointer ";
126 retType = retType.
toType();
145 : name_(name), argsBeforeFixups_(args) {}
155 return *(found->second);
158 auto emplace_result =
invokers_.insert(std::make_pair(thetype, to_add));
159 return *(emplace_result.first->second);
163 pair<edm::ObjectWithDict, bool>
ret(o,
false);
167 type = ret.first.dynamicType();
170 }
while (ret.second ==
false);
175 pair<edm::ObjectWithDict, bool>
ret(o,
false);
180 type = ret.first.dynamicType();
184 }
while (ret.second ==
false);
190 const std::vector<AnyMethodArgument>&
args) {
195 isRefGet_ = !setter.
push(name, args,
"LazyInvoker dynamic resolution",
false);
214 std::vector<edm::ObjectWithDict>&
v)
const {
239 <<
"member \"" <<
invokers_.back().methodName() <<
"\" return type is \"" <<
invokers_.back().returnTypeName()
240 <<
"\" retured a \"" << o.
typeOf().
qualifiedName() <<
"\" which is not convertible to double.";
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
SingleInvoker(const SingleInvoker &)=delete
tuple ret
prodAgent to be discontinued
method::TypeCode retType_
static bool makeStorage(edm::ObjectWithDict &obj, const edm::TypeWithDict &retType)
bool isRefGet_
true if this invoker just pops out a ref and returns (ref.get(), false)
bool storageNeedsDestructor_
std::pair< edm::ObjectWithDict, bool > invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
MethodInvoker(const edm::FunctionWithDict &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
std::string returnTypeName() const
std::vector< edm::TypeWithDict > TypeStack
static double objToDouble(const edm::ObjectWithDict &obj, method::TypeCode type)
std::string qualifiedName() const
double invokeLast(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
invoke and coerce result to double
edm::MemberWithDict member_
TypeWithDict toType() const
TypeWithDict typeOf() const
std::vector< AnyMethodArgument > ints_
std::vector< AnyMethodArgument > MethodArgumentStack
static bool isValidReturnType(method::TypeCode)
std::string typeName() const
method::TypeCode typeCode(const edm::TypeWithDict &)
edm::FunctionWithDict method_
edm::ObjectWithDict storage_
ObjectWithDict get() const
bool push(const std::string &, const std::vector< AnyMethodArgument > &, const char *, bool deep=true) const
TypeWithDict typeOf() const
std::type_info const & typeInfo() const
edm::TypeWithDict retTypeFinal_
void invoke(ObjectWithDict const &obj, ObjectWithDict *ret=nullptr, std::vector< void * > const &values=std::vector< void * >()) const
Call a member function.
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
TypeWithDict finalReturnType() const
std::vector< LazyInvoker > LazyMethodStack
MethodInvoker & operator=(const MethodInvoker &)
void throwFailedConversion(const edm::ObjectWithDict &) const
static void delStorage(edm::ObjectWithDict &)
const SingleInvoker & invoker(const edm::TypeWithDict &) const
TypeWithDict & stripConstRef()
std::string methodName() const
std::vector< void * > args_
std::vector< AnyMethodArgument > argsBeforeFixups_
double retToDouble(const edm::ObjectWithDict &) const
convert the output of invoke to a double, if possible
std::vector< MethodInvoker > invokers_
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)