GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
chaiscript::dispatch::detail Namespace Reference

Classes

struct  Constructor
struct  Const_Caller
struct  Fun_Caller
struct  Caller
struct  Arity
struct  Arity< Ret(Params...)>
struct  Function_Signature
struct  Function_Signature< Ret(Params...)>
struct  Function_Signature< Ret(T::*)(Params...) const >
struct  Callable_Traits
class  Dynamic_Object_Function
class  Dynamic_Object_Constructor
struct  Function_Caller_Ret
struct  Function_Caller_Ret< Ret, true >
struct  Function_Caller_Ret< void, false >
struct  Build_Function_Caller_Helper
struct  Handle_Return
 Used internally for handling a return value from a Proxy_Function call. More...
struct  Handle_Return< const std::function< Ret > & >
struct  Handle_Return< std::function< Ret > >
struct  Handle_Return< const std::shared_ptr< std::function< Ret > > >
struct  Handle_Return< const std::shared_ptr< std::function< Ret > > & >
struct  Handle_Return< std::shared_ptr< std::function< Ret > > >
struct  Handle_Return< std::function< Ret > & >
struct  Handle_Return< Ret *& >
struct  Handle_Return< const Ret *& >
struct  Handle_Return< Ret * >
struct  Handle_Return< const Ret * >
struct  Handle_Return< std::shared_ptr< Ret > & >
struct  Handle_Return< std::shared_ptr< Ret > >
struct  Handle_Return< const std::shared_ptr< Ret > & >
struct  Handle_Return< std::unique_ptr< Ret > >
struct  Handle_Return< const Ret & >
struct  Handle_Return< const Ret >
struct  Handle_Return< Ret & >
struct  Handle_Return< Boxed_Value >
struct  Handle_Return< const Boxed_Value >
struct  Handle_Return< Boxed_Value & >
struct  Handle_Return< const Boxed_Value & >
struct  Handle_Return< Boxed_Number >
struct  Handle_Return< const Boxed_Number >
struct  Handle_Return< void >

Functions

template<typename Ret, typename ... Params>
std::function< Ret(Params...)> build_function_caller_helper (Ret(Params...), const std::vector< Const_Proxy_Function > &funcs, const Type_Conversions_State *t_conversions)
template<typename Class, typename ... Params>
Proxy_Function build_constructor_ (Class(*)(Params...))
template<typename FuncType>
bool types_match_except_for_arithmetic (const FuncType &t_func, const std::vector< Boxed_Value > &plist, const Type_Conversions_State &t_conversions)
template<typename InItr, typename Funcs>
Boxed_Value dispatch_with_conversions (InItr begin, const InItr &end, const std::vector< Boxed_Value > &plist, const Type_Conversions_State &t_conversions, const Funcs &t_funcs)
template<typename Ret, typename ... Params>
std::vector< Type_Info > build_param_type_list (Ret(*)(Params...))
template<typename Ret, typename ... Params>
bool compare_types_cast (Ret(*)(Params...), const std::vector< Boxed_Value > &params, const Type_Conversions_State &t_conversions)
template<typename Callable, typename Ret, typename ... Params, size_t ... I>
Ret call_func (const chaiscript::dispatch::detail::Function_Signature< Ret(Params...)> &, std::index_sequence< I... >, const Callable &f, const std::vector< Boxed_Value > &params, const Type_Conversions_State &t_conversions)
template<typename Callable, typename Ret, typename ... Params>
Boxed_Value call_func (const chaiscript::dispatch::detail::Function_Signature< Ret(Params...)> &sig, const Callable &f, const std::vector< Boxed_Value > &params, const Type_Conversions_State &t_conversions)
template<typename Callable, typename ... Params>
Boxed_Value call_func (const chaiscript::dispatch::detail::Function_Signature< void(Params...)> &sig, const Callable &f, const std::vector< Boxed_Value > &params, const Type_Conversions_State &t_conversions)

Function Documentation

◆ build_constructor_()

template<typename Class, typename ... Params>
Proxy_Function chaiscript::dispatch::detail::build_constructor_ ( Class(*  )(Params...))
Here is the caller graph for this function:

◆ build_function_caller_helper()

template<typename Ret, typename ... Params>
std::function< Ret(Params...)> chaiscript::dispatch::detail::build_function_caller_helper ( Ret(Params...) ,
const std::vector< Const_Proxy_Function > & funcs,
const Type_Conversions_State * t_conversions )
Todo
what happens if t_conversions is deleted out from under us?!
Here is the caller graph for this function:

◆ build_param_type_list()

template<typename Ret, typename ... Params>
std::vector< Type_Info > chaiscript::dispatch::detail::build_param_type_list ( Ret(*  )(Params...))

Used by Proxy_Function_Impl to return a list of all param types it contains.

Note
somehow this is responsible for a large part of the code generation
Here is the caller graph for this function:

◆ call_func() [1/3]

template<typename Callable, typename Ret, typename ... Params, size_t ... I>
Ret chaiscript::dispatch::detail::call_func ( const chaiscript::dispatch::detail::Function_Signature< Ret(Params...)> & ,
std::index_sequence< I... > ,
const Callable & f,
const std::vector< Boxed_Value > & params,
const Type_Conversions_State & t_conversions )
Here is the caller graph for this function:

◆ call_func() [2/3]

template<typename Callable, typename Ret, typename ... Params>
Boxed_Value chaiscript::dispatch::detail::call_func ( const chaiscript::dispatch::detail::Function_Signature< Ret(Params...)> & sig,
const Callable & f,
const std::vector< Boxed_Value > & params,
const Type_Conversions_State & t_conversions )

Used by Proxy_Function_Impl to perform typesafe execution of a function. The function attempts to unbox each parameter to the expected type. if any unboxing fails the execution of the function fails and the bad_boxed_cast is passed up to the caller.

◆ call_func() [3/3]

template<typename Callable, typename ... Params>
Boxed_Value chaiscript::dispatch::detail::call_func ( const chaiscript::dispatch::detail::Function_Signature< void(Params...)> & sig,
const Callable & f,
const std::vector< Boxed_Value > & params,
const Type_Conversions_State & t_conversions )

◆ compare_types_cast()

template<typename Ret, typename ... Params>
bool chaiscript::dispatch::detail::compare_types_cast ( Ret(*  )(Params...),
const std::vector< Boxed_Value > & params,
const Type_Conversions_State & t_conversions )

Used by Proxy_Function_Impl to determine if it is equivalent to another Proxy_Function_Impl object. This function is primarily used to prevent registration of two functions with the exact same signatures

Here is the caller graph for this function:

◆ dispatch_with_conversions()

template<typename InItr, typename Funcs>
Boxed_Value chaiscript::dispatch::detail::dispatch_with_conversions ( InItr begin,
const InItr & end,
const std::vector< Boxed_Value > & plist,
const Type_Conversions_State & t_conversions,
const Funcs & t_funcs )
Here is the caller graph for this function:

◆ types_match_except_for_arithmetic()

template<typename FuncType>
bool chaiscript::dispatch::detail::types_match_except_for_arithmetic ( const FuncType & t_func,
const std::vector< Boxed_Value > & plist,
const Type_Conversions_State & t_conversions )
Here is the caller graph for this function: