The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions | Variables
context.cpp File Reference
#include "scripting/plugins/context.hpp"
#include "scripting/plugins/manager.hpp"
#include "config_assign.hpp"
#include <assert.h>
#include <utility>
#include "utils/functional.hpp"
Include dependency graph for context.cpp:

Go to the source code of this file.

Functions

template<typename T >
static config make_config (const std::string &name, const T &val)
 
static bool shim (config cfg, std::function< void(config)> func, bool return_value)
 

Variables

const std::function
< std::string(const config
&, const std::string &) > 
get_str
 
const std::function< int(const
config &, const std::string
&, int) > 
get_int
 
const std::function< size_t(const
config &, const std::string
&, size_t) > 
get_size_t
 

Function Documentation

template<typename T >
static config make_config ( const std::string name,
const T &  val 
)
static

Definition at line 76 of file context.cpp.

static bool shim ( config  cfg,
std::function< void(config)>  func,
bool  return_value 
)
static

Definition at line 110 of file context.cpp.

Referenced by plugins_context::set_callback().

Variable Documentation

const std::function< int ( const config & , const std::string &, int ) > get_int
Initial value:
=
std::bind(static_cast<const config::attribute_value &(config::*)(const std::string &) const>(&config::operator[]) , _1, _2)
, _3)
Variant for storing WML attributes.
Definition: config.hpp:223
int to_int(int def=0) const
Definition: config.cpp:308
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503

Definition at line 125 of file context.cpp.

Referenced by do_gameloop(), and gui::dialog::show().

const std::function< size_t ( const config & , const std::string &, size_t ) > get_size_t
Initial value:
=
std::bind(static_cast<const config::attribute_value &(config::*)(const std::string &) const>(&config::operator[]) , _1, _2)
, _3)
size_t to_size_t(size_t def=0) const
Definition: config.cpp:323
Variant for storing WML attributes.
Definition: config.hpp:223
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503

Definition at line 130 of file context.cpp.

Referenced by mp::create::create().

const std::function< std::string ( const config & , const std::string & ) > get_str
Initial value:
=
std::bind(static_cast<const config::attribute_value &(config::*)(const std::string &) const>(&config::operator[]) , _1, _2))
std::string str() const
Definition: config.cpp:353
Variant for storing WML attributes.
Definition: config.hpp:223
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503

Definition at line 121 of file context.cpp.

Referenced by mp::configure::configure(), mp::connect::connect(), mp::create::create(), play_controller::init(), mp::lobby::lobby(), and mp::wait::wait().