1 #ifndef CommonTools_Utils_MethodInvoker_h
2 #define CommonTools_Utils_MethodInvoker_h
3 #include "Reflex/Object.h"
4 #include "Reflex/Member.h"
7 #include <boost/utility.hpp>
8 #include <boost/shared_ptr.hpp>
17 const std::vector<AnyMethodArgument> & ints = std::vector<AnyMethodArgument>() );
24 invoke(
const Reflex::Object &
o, Reflex::Object &retstore)
const;
29 std::vector<AnyMethodArgument>
ints_;
41 const std::string &
name,
42 const std::vector<AnyMethodArgument> &
args) ;
49 std::pair<Reflex::Object,bool>
invoke(
const Reflex::Object &
o, std::vector<Reflex::Object> &
v)
const;
67 const std::vector<AnyMethodArgument> &
args);
73 Reflex::Object
invoke(
const Reflex::Object &
o, std::vector<Reflex::Object> &
v)
const;
75 double invokeLast(
const Reflex::Object & o, std::vector<Reflex::Object> &v)
const;
80 mutable std::map<void *, SingleInvokerPtr>
invokers_;
std::map< void *, SingleInvokerPtr > invokers_
method::TypeCode retType_
std::vector< void * > args_
MethodInvoker & operator=(const MethodInvoker &)
bool isRefGet_
true if this invoker just pops out a ref and returns (ref.get(), false)
bool storageNeedsDestructor_
MethodInvoker(const Reflex::Member &method, const std::vector< AnyMethodArgument > &ints=std::vector< AnyMethodArgument >())
double retToDouble(const Reflex::Object &o) const
Reflex::Object invoke(const Reflex::Object &o, Reflex::Object &retstore) const
boost::shared_ptr< SingleInvoker > SingleInvokerPtr
Keeps different SingleInvokers for each dynamic type of the objects passed to invoke() ...
double invokeLast(const Reflex::Object &o, std::vector< Reflex::Object > &v) const
invoke and coerce result to double
Reflex::Object invoke(const Reflex::Object &o, std::vector< Reflex::Object > &v) const
std::pair< Reflex::Object, bool > invoke(const Reflex::Object &o, std::vector< Reflex::Object > &v) const
SingleInvoker(const Reflex::Type &t, const std::string &name, const std::vector< AnyMethodArgument > &args)
const SingleInvoker & invoker(const Reflex::Type &t) const
std::vector< AnyMethodArgument > ints_
void throwFailedConversion(const Reflex::Object &o) const
std::vector< AnyMethodArgument > argsBeforeFixups_
std::vector< MethodInvoker > invokers_
const Reflex::Member & method() const
LazyInvoker(const std::string &name, const std::vector< AnyMethodArgument > &args)