15 const vector<AnyMethodArgument>& ints)
63 : method_(rhs.method_)
64 , member_(rhs.member_)
66 , isFunction_(rhs.isFunction_)
67 , retTypeFinal_(rhs.retTypeFinal_)
92 for (
size_t i = 0;
i <
ints_.size(); ++
i) {
150 <<
" arguments returned a null pointer ";
156 retType = retType.
toType();
170 <<
"\" returned void invoked on object of type \""
178 const std::vector<AnyMethodArgument>&
args)
180 , argsBeforeFixups_(args)
197 return *(found->second);
200 auto emplace_result =
invokers_.insert(std::make_pair(thetype,to_add) );
201 return *(emplace_result.first->second);
208 pair<edm::ObjectWithDict, bool>
ret(o,
false);
212 type = ret.first.dynamicType();
216 while (ret.second ==
false);
223 std::vector<edm::ObjectWithDict>&
v)
const
225 pair<edm::ObjectWithDict, bool>
ret(o,
false);
230 type = ret.first.dynamicType();
235 while (ret.second ==
false);
241 const std::vector<AnyMethodArgument>&
args)
247 isRefGet_ = !setter.
push(name, args,
"LazyInvoker dynamic resolution",
false);
270 pair<edm::ObjectWithDict, bool>
280 pair<edm::ObjectWithDict, bool>
305 <<
"member \"" <<
invokers_.back().methodName()
306 <<
"\" return type is \"" <<
invokers_.back().returnTypeName()
308 <<
"\" which is not convertible to double.";
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
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)
SingleInvoker(const edm::TypeWithDict &, const std::string &name, const std::vector< AnyMethodArgument > &args)
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
edm::FunctionWithDict method_
edm::ObjectWithDict storage_
TypeCode typeCode(const edm::TypeWithDict &t)
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
volatile std::atomic< bool > shutdown_flag false
std::vector< MethodInvoker > invokers_
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)