Proxy_Function fun(const T &t) { typedef typename dispatch::detail::Callable_Traits<T>::Signature Signature; return Proxy_Function( chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Callable_Impl<Signature, T>>(t)); }
Proxy_Function fun(Ret (Class::*t_func)(Param...) const) { auto call = dispatch::detail::Const_Caller<Ret, Class, Param...>(t_func); return Proxy_Function( chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Callable_Impl<Ret (const Class &, Param...), decltype(call)>>(call)); }
Proxy_Function fun(Ret (*func)(Param...)) { auto fun_call = dispatch::detail::Fun_Caller<Ret, Param...>(func); return Proxy_Function( chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Callable_Impl<Ret (Param...), decltype(fun_call)>>(fun_call)); }
static Proxy_Function go(T t) { return Proxy_Function( new Proxy_Function_Impl< typename boost::function_types::function_type<boost::function_types::components<T> >::type> ( boost::function< typename boost::function_types::function_type<boost::function_types::components<T> >::type >(boost::mem_fn(t)))); }
Dynamic_Proxy_Function( const std::function<Boxed_Value (const std::vector<Boxed_Value> &)> &t_f, int t_arity=-1, const AST_NodePtr &t_parsenode = AST_NodePtr(), const std::string &t_description = "", const Proxy_Function &t_guard = Proxy_Function()) : Proxy_Function_Base(build_param_type_list(t_arity)), m_f(t_f), m_arity(t_arity), m_description(t_description), m_guard(t_guard), m_parsenode(t_parsenode) { }
Proxy_Function build_constructor_(Class (*)(Params...)) { typedef std::shared_ptr<Class> (sig)(Params...); return Proxy_Function(new Proxy_Function_Impl<sig>(std::function<sig>(&(constructor_<Class, Params...>)))); }
Proxy_Function fun(T Class::* m /*, typename std::enable_if<std::is_member_object_pointer<T>::value>::type* = 0*/ ) { return Proxy_Function(chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Attribute_Access<T, Class>>(m)); }
Proxy_Function fun(const std::function<T> &f) { return Proxy_Function(new dispatch::Proxy_Function_Impl<T>(f)); }
static Proxy_Function go(T Class::* m) { return Proxy_Function(new Attribute_Access<T, Class>(m)); }
static Proxy_Function go(T t) { /// \todo is it possible to reduce the number of templates generated here? return Proxy_Function( new Proxy_Function_Impl<typename FunctionSignature<decltype(to_function(t)) >::Signature>(to_function(t))); }
Proxy_Function fun(const boost::function<T> &f) { return Proxy_Function(new Proxy_Function_Impl<T>(f)); }
Proxy_Function build_constructor_(Class (*)(BOOST_PP_ENUM_PARAMS(n, Param))) { typedef boost::shared_ptr<Class> (sig)(BOOST_PP_ENUM_PARAMS(n, Param)); return Proxy_Function(new Proxy_Function_Impl<sig>(boost::function<sig>(&(constructor_<Class BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, Param)>)))); }
Proxy_Function fun(Ret (Class::*func)(Param...) const) { return Proxy_Function( chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Impl<typename dispatch::detail::FunctionSignature<decltype(dispatch::detail::to_function(func)) >::Signature>>(dispatch::detail::to_function(func))); }
Proxy_Function fun(const T &t) { return Proxy_Function( chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Impl<typename dispatch::detail::FunctionSignature<decltype(dispatch::detail::to_function(t)) >::Signature>>(dispatch::detail::to_function(t))); }
Proxy_Function fun(const std::function<T> &f) { return Proxy_Function(chaiscript::make_shared<dispatch::Proxy_Function_Base, dispatch::Proxy_Function_Impl<T>>(f)); }