39 for (
const Reg& l : callbacks) {
40 if (l.name !=
nullptr) {
44 for (
const aReg& r : accessors) {
45 if (r.name !=
nullptr) {
104 set_callback(name, [func, preserves_context](
config cfg) { func(cfg);
return preserves_context; });
A config object defines a single node in a WML file, with access to child nodes.
std::vector< Reg > reg_vec
std::function< bool(config)> callback_function
std::vector< aReg > areg_vec
std::map< std::string, accessor_function > accessor_list
void set_callback(const std::string &name, callback_function)
std::size_t erase_callback(const std::string &name)
std::size_t erase_accessor(const std::string &name)
void set_accessor_int(const std::string &name, std::function< int(config)>)
void set_accessor(const std::string &name, accessor_function)
std::size_t clear_callbacks()
plugins_context(const std::string &name)
void initialize(const reg_vec &callbacks, const areg_vec &accessors)
std::map< std::string, callback_function > callback_list
std::size_t clear_accessors()
std::function< config(config)> accessor_function
void set_accessor_string(const std::string &name, std::function< std::string(config)>)
static plugins_manager * get()
void play_slice(const plugins_context &)