|
GameApi 28
Library used by GameApi Builder tool
|
#include <dispatchkit.hpp>
Classes | |
| struct | State |
Public Types | |
| typedef std::map< std::string, chaiscript::Type_Info > | Type_Name_Map |
| typedef std::vector< std::pair< std::string, Boxed_Value > > | Scope |
| typedef Stack_Holder::StackData | StackData |
Public Member Functions | |
| Dispatch_Engine (chaiscript::parser::ChaiScript_Parser_Base &parser) | |
| template<typename Type> | |
| decltype(auto) | boxed_cast (const Boxed_Value &bv) const |
| casts an object while applying any Dynamic_Conversion available | |
| void | add (const Type_Conversion &d) |
| Add a new conversion for upcasting to a base class. | |
| void | add (const Proxy_Function &f, const std::string &name) |
| Add a new named Proxy_Function to the system. | |
| void | add (Boxed_Value obj, const std::string &name) |
| Boxed_Value & | add_get_object (const std::string &t_name, Boxed_Value obj, Stack_Holder &t_holder) |
| void | add_object (const std::string &t_name, Boxed_Value obj, Stack_Holder &t_holder) |
| void | add_object (const std::string &name, Boxed_Value obj) |
| void | add_global_const (const Boxed_Value &obj, const std::string &name) |
| Adds a new global shared object, between all the threads. | |
| Boxed_Value | add_global_no_throw (const Boxed_Value &obj, const std::string &name) |
| Adds a new global (non-const) shared object, between all the threads. | |
| void | add_global (const Boxed_Value &obj, const std::string &name) |
| Adds a new global (non-const) shared object, between all the threads. | |
| void | set_global (const Boxed_Value &obj, const std::string &name) |
| Updates an existing global shared object or adds a new global shared object if not found. | |
| void | new_scope () |
| Adds a new scope to the stack. | |
| void | pop_scope () |
| Pops the current scope from the stack. | |
| Boxed_Value | get_object (const std::string &name, std::atomic_uint_fast32_t &t_loc, Stack_Holder &t_holder) const |
| void | add (const Type_Info &ti, const std::string &name) |
| Registers a new named type. | |
| Type_Info | get_type (const std::string &name, bool t_throw=true) const |
| Returns the type info for a named type. | |
| std::string | get_type_name (const Type_Info &ti) const |
| std::vector< std::pair< std::string, Type_Info > > | get_types () const |
| Return all registered types. | |
| std::shared_ptr< std::vector< Proxy_Function > > | get_method_missing_functions () const |
| std::pair< size_t, std::shared_ptr< std::vector< Proxy_Function > > > | get_function (const std::string &t_name, const size_t t_hint) const |
| Return a function by name. | |
| Boxed_Value | get_function_object (const std::string &t_name) const |
| std::pair< size_t, Boxed_Value > | get_function_object_int (const std::string &t_name, const size_t t_hint) const |
| bool | function_exists (const std::string &name) const |
| Return true if a function exists. | |
| std::map< std::string, Boxed_Value > | get_parent_locals () const |
| std::map< std::string, Boxed_Value > | get_locals () const |
| void | set_locals (const std::map< std::string, Boxed_Value > &t_locals) |
| Sets all of the locals for the current thread state. | |
| std::map< std::string, Boxed_Value > | get_scripting_objects () const |
| std::map< std::string, Boxed_Value > | get_function_objects () const |
| std::vector< std::pair< std::string, Proxy_Function > > | get_functions () const |
| Get a vector of all registered functions. | |
| const Type_Conversions & | conversions () const |
| Boxed_Value | call_member (const std::string &t_name, std::atomic_uint_fast32_t &t_loc, const std::vector< Boxed_Value > ¶ms, bool t_has_params, const Type_Conversions_State &t_conversions) |
| Boxed_Value | call_function (const std::string &t_name, std::atomic_uint_fast32_t &t_loc, const std::vector< Boxed_Value > ¶ms, const Type_Conversions_State &t_conversions) const |
| void | dump_object (const Boxed_Value &o) const |
| Dump object info to stdout. | |
| void | dump_type (const Type_Info &type) const |
| Dump type info to stdout. | |
| void | dump_function (const std::pair< const std::string, Proxy_Function > &f) const |
| Dump function to stdout. | |
| Boxed_Value | call_exists (const std::vector< Boxed_Value > ¶ms) const |
| void | dump_system () const |
| Dump all system info to stdout. | |
| bool | is_type (const Boxed_Value &r, const std::string &user_typename) const |
| return true if the Boxed_Value matches the registered type by name | |
| std::string | type_name (const Boxed_Value &obj) const |
| State | get_state () const |
| void | set_state (const State &t_state) |
| void | save_function_params (std::initializer_list< Boxed_Value > t_params) |
| void | save_function_params (std::vector< Boxed_Value > &&t_params) |
| void | save_function_params (const std::vector< Boxed_Value > &t_params) |
| void | new_function_call (Stack_Holder &t_s, Type_Conversions::Conversion_Saves &t_saves) |
| void | pop_function_call (Stack_Holder &t_s, Type_Conversions::Conversion_Saves &t_saves) |
| void | new_function_call () |
| void | pop_function_call () |
| Stack_Holder & | get_stack_holder () |
| const StackData & | get_stack_data () const |
| StackData & | get_stack_data () |
| parser::ChaiScript_Parser_Base & | get_parser () |
Static Public Member Functions | |
| static void | new_scope (Stack_Holder &t_holder) |
| Adds a new scope to the stack. | |
| static void | pop_scope (Stack_Holder &t_holder) |
| Pops the current scope from the stack. | |
| static void | new_stack (Stack_Holder &t_holder) |
| Pushes a new stack on to the list of stacks. | |
| static void | pop_stack (Stack_Holder &t_holder) |
| static bool | is_attribute_call (const std::vector< Proxy_Function > &t_funs, const std::vector< Boxed_Value > &t_params, bool t_has_params, const Type_Conversions_State &t_conversions) |
| static void | save_function_params (Stack_Holder &t_s, std::initializer_list< Boxed_Value > t_params) |
| static void | save_function_params (Stack_Holder &t_s, std::vector< Boxed_Value > &&t_params) |
| static void | save_function_params (Stack_Holder &t_s, const std::vector< Boxed_Value > &t_params) |
| static StackData & | get_stack_data (Stack_Holder &t_holder) |
Main class for the dispatchkit. Handles management of the object stack, functions and registered types.
| typedef std::vector<std::pair<std::string, Boxed_Value> > chaiscript::detail::Dispatch_Engine::Scope |
| typedef std::map<std::string, chaiscript::Type_Info> chaiscript::detail::Dispatch_Engine::Type_Name_Map |
|
inlineexplicit |

|
inline |
Set the value of an object, by name. If the object is not available in the current scope it is created
|
inline |
Add a new named Proxy_Function to the system.
|
inline |
Add a new conversion for upcasting to a base class.

|
inline |
Registers a new named type.
|
inline |
Adds a named object to the current scope
|
inline |
Adds a new global (non-const) shared object, between all the threads.
|
inline |
Adds a new global shared object, between all the threads.

|
inline |
Adds a new global (non-const) shared object, between all the threads.

|
inline |
Adds a named object to the current scope
|
inline |
Adds a named object to the current scope

|
inline |
casts an object while applying any Dynamic_Conversion available

|
inline |
Returns true if a call can be made that consists of the first parameter (the function) with the remaining parameters as its arguments.
|
inline |

|
inline |

|
inline |
|
inline |
Dump function to stdout.

|
inline |
Dump object info to stdout.
|
inline |
Dump all system info to stdout.
|
inline |
Dump type info to stdout.

|
inline |
Return true if a function exists.
|
inline |
Return a function by name.

|
inline |
| std::range_error | if it does not |
|
inline |
| std::range_error | if it does not \warn does not obtain a mutex lock. |

|
inline |
Get a map of all functions that can be seen from a scripting context
|
inline |
Get a vector of all registered functions.

|
inline |
|
inline |

|
inline |
Searches the current stack for an object of the given name includes a special overload for the _ place holder object to ensure that it is always in scope.
|
inline |
|
inline |

|
inline |
Get a map of all objects that can be seen from the current scope in a scripting context
|
inline |
|
inline |
Returns the current stack make const/non const versions

|
inlinestatic |
|
inline |

|
inline |
|
inline |
Returns the type info for a named type.

|
inline |
Returns the registered name of a known type_info object compares the "bare_type_info" for the broadest possible match

|
inline |
Return all registered types.

|
inlinestatic |

|
inline |
return true if the Boxed_Value matches the registered type by name
|
inline |
|
inline |

|
inline |
Adds a new scope to the stack.

|
inlinestatic |
Adds a new scope to the stack.
|
inlinestatic |
Pushes a new stack on to the list of stacks.
|
inline |
|
inline |

|
inline |
Pops the current scope from the stack.

|
inlinestatic |
Pops the current scope from the stack.
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |

|
inlinestatic |
|
inline |
|
inline |
|
inline |
Updates an existing global shared object or adds a new global shared object if not found.
|
inline |
Sets all of the locals for the current thread state.
| [in] | t_locals | The map<name, value> set of variables to replace the current state with |
Any existing locals are removed and the given set of variables is added
|
inline |
|
inline |
