1 #ifndef CommonTools_Utils_MethodInvoker_h
2 #define CommonTools_Utils_MethodInvoker_h
9 #include <boost/utility.hpp>
10 #include <boost/shared_ptr.hpp>
19 const std::vector<AnyMethodArgument> & ints = std::vector<AnyMethodArgument>() );
37 std::vector<AnyMethodArgument>
ints_;
50 const std::vector<AnyMethodArgument> &
args) ;
75 const std::vector<AnyMethodArgument> &
args);
88 mutable std::map<edm::TypeID, SingleInvokerPtr>
invokers_;
SingleInvoker(const edm::TypeWithDict &t, const std::string &name, const std::vector< AnyMethodArgument > &args)
method::TypeCode retType_
std::vector< void * > args_
MethodInvoker & operator=(const MethodInvoker &)
MethodInvoker(const edm::FunctionWithDict &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
edm::FunctionWithDict method_
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
edm::FunctionWithDict const method() const
double invokeLast(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
invoke and coerce result to double
boost::shared_ptr< SingleInvoker > SingleInvokerPtr
Keeps different SingleInvokers for each dynamic type of the objects passed to invoke() ...
edm::ObjectWithDict storage_
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
std::string returnTypeName() const
double retToDouble(const edm::ObjectWithDict &o) const
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, edm::ObjectWithDict &retstore) const
std::vector< AnyMethodArgument > ints_
const SingleInvoker & invoker(const edm::TypeWithDict &t) const
void throwFailedConversion(const edm::ObjectWithDict &o) const
std::vector< AnyMethodArgument > argsBeforeFixups_
std::string methodName() const
std::vector< MethodInvoker > invokers_
std::map< edm::TypeID, SingleInvokerPtr > invokers_
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)
edm::MemberWithDict member_
edm::MemberWithDict const member() const