41 for (
const Reg&
l : callbacks) {
42 if (
l.name !=
nullptr) {
46 for (
const aReg&
r : accessors) {
47 if (
r.name !=
nullptr) {
83 set_accessor(name, std::bind(&make_config<std::string>, name, std::bind(func, _1)));
88 set_accessor(name, std::bind(&make_config<int>, name, std::bind(func, _1)));
121 const std::function< std::string ( const config & , const std::string & ) >
get_str =
125 const std::function< int ( const config & , const std::string &, int ) >
get_int =
130 const std::function< size_t ( const config & , const std::string &, size_t ) >
get_size_t =
const std::function< size_t(const config &, const std::string &, size_t) > get_size_t
void set_callback(const std::string &name, callback_function)
size_t to_size_t(size_t def=0) const
static bool shim(config cfg, std::function< void(config)> func, bool return_value)
const std::function< int(const config &, const std::string &, int) > get_int
GLuint const GLfloat * val
size_t erase_accessor(const std::string &name)
Variant for storing WML attributes.
size_t erase_callback(const std::string &name)
void set_accessor_int(const std::string &name, std::function< int(config)>)
void initialize(const std::vector< Reg > &callbacks, const std::vector< aReg > &accessors)
std::map< std::string, accessor_function > accessor_list
void play_slice(const plugins_context &)
GLdouble GLdouble GLdouble r
std::function< config(config)> accessor_function
GLuint const GLchar * name
void set_accessor(const std::string &name, accessor_function)
const std::function< std::string(const config &, const std::string &) > get_str
int to_int(int def=0) const
plugins_context(const std::string &name)
std::map< std::string, callback_function > callback_list
A config object defines a single node in a WML file, with access to child nodes.
void set_accessor_string(const std::string &name, std::function< std::string(config)>)
static config make_config(const std::string &name, const T &val)
GLsizei const GLcharARB ** string
std::function< bool(config)> callback_function
static plugins_manager * get()