1 #ifndef CommonTools_Utils_MethodInvoker_h
2 #define CommonTools_Utils_MethodInvoker_h
11 #include <boost/shared_ptr.hpp>
12 #include <boost/utility.hpp>
24 std::vector<AnyMethodArgument>
ints_;
33 const std::vector<AnyMethodArgument>& ints =
34 std::vector<AnyMethodArgument>());
68 const std::vector<AnyMethodArgument>&
args);
78 std::pair<edm::ObjectWithDict, bool>
80 std::vector<edm::ObjectWithDict>&
v)
const;
98 mutable std::map<edm::TypeID, SingleInvokerPtr>
invokers_;
103 const std::vector<AnyMethodArgument>&
args);
113 std::vector<edm::ObjectWithDict>&
v)
const;
117 std::vector<edm::ObjectWithDict>&
v)
const;
123 #endif // CommonTools_Utils_MethodInvoker_h
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
method::TypeCode 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
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
std::vector< AnyMethodArgument > ints_
Keeps different SingleInvokers for each dynamic type of the objects passed to invoke() ...
edm::MemberWithDict const member() const
edm::FunctionWithDict method_
edm::ObjectWithDict storage_
edm::TypeWithDict retTypeFinal_
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
MethodInvoker & operator=(const MethodInvoker &)
void throwFailedConversion(const edm::ObjectWithDict &) const
edm::FunctionWithDict const method() const
const SingleInvoker & invoker(const edm::TypeWithDict &) const
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_
std::map< edm::TypeID, SingleInvokerPtr > invokers_
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)