#include <context.hpp>
Classes | |
| struct | aReg |
| struct | Reg |
Public Types | |
| typedef std::function< bool(config)> | callback_function |
| typedef std::function< config(config)> | accessor_function |
Public Member Functions | |
| plugins_context (const std::string &name) | |
| plugins_context (const std::string &name, const std::vector< Reg > &callbacks, const std::vector< aReg > &accessors) | |
| template<int N, int M> | |
| plugins_context (const std::string &name, const Reg(&callbacks)[N], const aReg(&accessors)[M]) | |
| void | play_slice () |
| void | set_callback (const std::string &name, callback_function) |
| void | set_callback (const std::string &name, std::function< void(config)> function, bool preserves_context) |
| size_t | erase_callback (const std::string &name) |
| size_t | clear_callbacks () |
| void | set_accessor (const std::string &name, accessor_function) |
| void | set_accessor_string (const std::string &name, std::function< std::string(config)>) |
| void | set_accessor_int (const std::string &name, std::function< int(config)>) |
| size_t | erase_accessor (const std::string &name) |
| size_t | clear_accessors () |
Private Types | |
| typedef std::map< std::string, callback_function > | callback_list |
| typedef std::map< std::string, accessor_function > | accessor_list |
Private Member Functions | |
| void | initialize (const std::vector< Reg > &callbacks, const std::vector< aReg > &accessors) |
Private Attributes | |
| callback_list | callbacks_ |
| accessor_list | accessors_ |
| std::string | name_ |
Friends | |
| class | application_lua_kernel |
Definition at line 31 of file context.hpp.
| typedef std::function<config(config)> plugins_context::accessor_function |
Definition at line 37 of file context.hpp.
|
private |
Definition at line 76 of file context.hpp.
| typedef std::function<bool(config)> plugins_context::callback_function |
Definition at line 34 of file context.hpp.
|
private |
Definition at line 75 of file context.hpp.
| plugins_context::plugins_context | ( | const std::string & | name | ) |
Definition at line 25 of file context.cpp.
| plugins_context::plugins_context | ( | const std::string & | name, |
| const std::vector< Reg > & | callbacks, | ||
| const std::vector< aReg > & | accessors | ||
| ) |
Definition at line 31 of file context.cpp.
References initialize().
|
inline |
Definition at line 43 of file context.hpp.
References i, and initialize().
| size_t plugins_context::clear_accessors | ( | ) |
Definition at line 97 of file context.cpp.
References accessors_.
| size_t plugins_context::clear_callbacks | ( | ) |
Definition at line 63 of file context.cpp.
References callbacks_.
| size_t plugins_context::erase_accessor | ( | const std::string & | name | ) |
Definition at line 92 of file context.cpp.
References accessors_.
| size_t plugins_context::erase_callback | ( | const std::string & | name | ) |
Definition at line 58 of file context.cpp.
References callbacks_.
|
private |
Definition at line 39 of file context.cpp.
References accessors_, and callbacks_.
Referenced by plugins_context().
| void plugins_context::play_slice | ( | ) |
Definition at line 104 of file context.cpp.
References plugins_manager::get(), and plugins_manager::play_slice().
Referenced by do_gameloop(), game_launcher::init_lua_script(), and gui::dialog::show().
| void plugins_context::set_accessor | ( | const std::string & | name, |
| accessor_function | func | ||
| ) |
Definition at line 70 of file context.cpp.
References accessors_.
Referenced by set_accessor_int(), and set_accessor_string().
| void plugins_context::set_accessor_int | ( | const std::string & | name, |
| std::function< int(config)> | func | ||
| ) |
Definition at line 86 of file context.cpp.
References set_accessor().
| void plugins_context::set_accessor_string | ( | const std::string & | name, |
| std::function< std::string(config)> | func | ||
| ) |
Definition at line 81 of file context.cpp.
References set_accessor().
| void plugins_context::set_callback | ( | const std::string & | name, |
| callback_function | func | ||
| ) |
Definition at line 53 of file context.cpp.
References callbacks_.
Referenced by do_gameloop(), set_callback(), and gui::dialog::show().
| void plugins_context::set_callback | ( | const std::string & | name, |
| std::function< void(config)> | function, | ||
| bool | preserves_context | ||
| ) |
Definition at line 116 of file context.cpp.
References set_callback(), and shim().
|
friend |
Definition at line 72 of file context.hpp.
|
private |
Definition at line 81 of file context.hpp.
Referenced by clear_accessors(), erase_accessor(), initialize(), application_lua_kernel::thread::run_script(), and set_accessor().
|
private |
Definition at line 80 of file context.hpp.
Referenced by clear_callbacks(), erase_callback(), initialize(), application_lua_kernel::thread::run_script(), and set_callback().
|
private |
Definition at line 82 of file context.hpp.
Referenced by application_lua_kernel::thread::run_script().
1.8.8