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)
207 pair<edm::ObjectWithDict, bool>
ret(o,
false);
211 type = ret.first.dynamicType();
215 while (ret.second ==
false);
222 std::vector<edm::ObjectWithDict>&
v)
const
224 pair<edm::ObjectWithDict, bool>
ret(o,
false);
229 type = ret.first.dynamicType();
234 while (ret.second ==
false);
240 const std::vector<AnyMethodArgument>&
args)
246 isRefGet_ = !setter.
push(name, args,
"LazyInvoker dynamic resolution",
false);
269 pair<edm::ObjectWithDict, bool>
279 pair<edm::ObjectWithDict, bool>
304 <<
"member \"" <<
invokers_.back().methodName()
305 <<
"\" return type is \"" <<
invokers_.back().returnTypeName()
307 <<
"\" which is not convertible to double.";
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
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_
boost::shared_ptr< SingleInvoker > SingleInvokerPtr
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_
std::map< edm::TypeID, SingleInvokerPtr > invokers_
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)