11#ifndef CHAISCRIPT_FUNCTION_CALL_DETAIL_HPP_
12#define CHAISCRIPT_FUNCTION_CALL_DETAIL_HPP_
34 template<
typename Ret,
bool is_arithmetic>
37 static Ret call(
const std::vector<Const_Proxy_Function> &t_funcs,
40 if (t_conversions !=
nullptr) {
53 template<
typename Ret>
56 static Ret call(
const std::vector<Const_Proxy_Function> &t_funcs,
59 if (t_conversions !=
nullptr) {
76 static void call(
const std::vector<Const_Proxy_Function> &t_funcs,
79 if (t_conversions !=
nullptr) {
92 template<
typename Ret,
typename ... Param>
101 template<
typename ...
P>
107 box<P>(std::forward<P>(param))...
112 box<P>(std::forward<P>(param))...
119 template<
typename P,
typename Q>
120 static auto box(
Q&& q) ->
typename std::enable_if<std::is_reference<P>::value&&!std::is_same<chaiscript::Boxed_Value, typename std::remove_const<typename std::remove_reference<P>::type>::type>::value,
Boxed_Value>::type
125 template<
typename P,
typename Q>
126 static auto box(
Q&& q) ->
typename std::enable_if<!std::is_reference<P>::value&&!std::is_same<chaiscript::Boxed_Value, typename std::remove_const<typename std::remove_reference<P>::type>::type>::value,
Boxed_Value>::type
145 template<
typename Ret,
typename ... Params>
Object call(Vector t_params) const
Calls the function with the given set of parameters and returns the value;.
Represents any numeric type, generically. Used internally for generic operations between POD values.
Definition boxed_number.hpp:66
Boxed_Number get_as(const Type_Info &inp_) const
Definition boxed_number.hpp:543
A wrapper for holding any valid C++ type. All types in ChaiScript are Boxed_Value objects.
Definition boxed_value.hpp:28
Definition type_conversions.hpp:512
Definition type_conversions.hpp:321
Conversion_Saves & conversion_saves() const
Definition type_conversions.hpp:466
Definition callable_traits.hpp:14
std::function< Ret(Params...)> build_function_caller_helper(Ret(Params...), const std::vector< Const_Proxy_Function > &funcs, const Type_Conversions_State *t_conversions)
Definition function_call_detail.hpp:146
Classes and functions specific to the runtime dispatch side of ChaiScript. Some items may be of use t...
Definition callable_traits.hpp:13
Boxed_Value dispatch(const Funcs &funcs, const std::vector< Boxed_Value > &plist, const Type_Conversions_State &t_conversions)
Definition proxy_functions.hpp:936
Namespace chaiscript contains every API call that the average user will be concerned with.
decltype(auto) boxed_cast(const Boxed_Value &bv, const Type_Conversions_State *t_conversions=nullptr)
Function for extracting a value stored in a Boxed_Value object.
Definition boxed_cast.hpp:76
Definition GameApi_bm.cc:4579
Definition function_call_detail.hpp:94
const Type_Conversions * m_conversions
Definition function_call_detail.hpp:139
static Boxed_Value box(Boxed_Value bv)
Definition function_call_detail.hpp:132
Build_Function_Caller_Helper(std::vector< Const_Proxy_Function > t_funcs, const Type_Conversions *t_conversions)
Definition function_call_detail.hpp:95
static auto box(Q &&q) -> typename std::enable_if<!std::is_reference< P >::value &&!std::is_same< chaiscript::Boxed_Value, typename std::remove_const< typename std::remove_reference< P >::type >::type >::value, Boxed_Value >::type
Definition function_call_detail.hpp:126
Ret operator()(P &&... param)
Definition function_call_detail.hpp:102
static auto box(Q &&q) -> typename std::enable_if< std::is_reference< P >::value &&!std::is_same< chaiscript::Boxed_Value, typename std::remove_const< typename std::remove_reference< P >::type >::type >::value, Boxed_Value >::type
Definition function_call_detail.hpp:120
std::vector< Const_Proxy_Function > m_funcs
Definition function_call_detail.hpp:138
static Ret call(const std::vector< Const_Proxy_Function > &t_funcs, const std::vector< Boxed_Value > ¶ms, const Type_Conversions_State *t_conversions)
Definition function_call_detail.hpp:56
static void call(const std::vector< Const_Proxy_Function > &t_funcs, const std::vector< Boxed_Value > ¶ms, const Type_Conversions_State *t_conversions)
Definition function_call_detail.hpp:76
Definition function_call_detail.hpp:36
static Ret call(const std::vector< Const_Proxy_Function > &t_funcs, const std::vector< Boxed_Value > ¶ms, const Type_Conversions_State *t_conversions)
Definition function_call_detail.hpp:37