Go to the documentation of this file. 1 #ifndef CommonTools_Utils_MethodInvoker_h
2 #define CommonTools_Utils_MethodInvoker_h
11 #include <boost/utility.hpp>
16 #include "tbb/concurrent_unordered_map.h"
31 std::vector<AnyMethodArgument>
ints_;
42 const std::vector<AnyMethodArgument>& ints = std::vector<AnyMethodArgument>());
86 std::vector<edm::ObjectWithDict>&
v)
const;
97 typedef tbb::concurrent_unordered_map<edm::TypeID, SingleInvokerPtr, edm::TypeIDHasher>
InvokerMap;
129 #endif // CommonTools_Utils_MethodInvoker_h
std::pair< edm::ObjectWithDict, bool > invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
edm::TypeWithDict retTypeFinal_
std::string methodName() const
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)
const edm::MemberWithDict member() const
edm::FunctionWithDict method_
edm::ObjectWithDict storage_
bool storageNeedsDestructor_
MethodInvoker & operator=(const MethodInvoker &)
double invokeLast(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
invoke and coerce result to double
std::string returnTypeName() const
std::vector< AnyMethodArgument > argsBeforeFixups_
const edm::FunctionWithDict method() const
size_t operator()(TypeID const &tid) const
tbb::concurrent_unordered_map< edm::TypeID, SingleInvokerPtr, edm::TypeIDHasher > InvokerMap
std::vector< MethodInvoker > invokers_
bool isRefGet_
true if this invoker just pops out a ref and returns (ref.get(), false)
std::vector< void * > args_
const SingleInvoker & invoker(const edm::TypeWithDict &) const
SingleInvoker(const edm::TypeWithDict &, const std::string &name, const std::vector< AnyMethodArgument > &args)
double retToDouble(const edm::ObjectWithDict &) const
convert the output of invoke to a double, if possible
void throwFailedConversion(const edm::ObjectWithDict &) const
edm::ObjectWithDict invoke(const edm::ObjectWithDict &obj, edm::ObjectWithDict &retstore) const
const char * name() const
Keeps different SingleInvokers for each dynamic type of the objects passed to invoke()
std::shared_ptr< SingleInvoker > SingleInvokerPtr
MethodInvoker(const edm::FunctionWithDict &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
edm::ObjectWithDict invoke(const edm::ObjectWithDict &o, std::vector< edm::ObjectWithDict > &v) const
std::vector< AnyMethodArgument > ints_
method::TypeCode retType_
edm::MemberWithDict member_