The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros | Typedefs
function.hpp File Reference
#include "formula/formula.hpp"
#include "formula/callable.hpp"
#include <set>
#include <string>
Include dependency graph for function.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wfl::call_stack_manager
 
class  wfl::formula_expression
 
class  wfl::function_expression
 
class  wfl::key_value_pair
 
class  wfl::formula_function_expression
 
class  wfl::formula_function
 
class  wfl::user_formula_function
 
class  wfl::builtin_formula_function< T >
 
class  wfl::function_symbol_table
 
class  wfl::action_function_symbol_table
 
class  wfl::wrapper_formula
 

Namespaces

 wfl
 

Macros

#define DECLARE_WFL_FUNCTION(name)
 Declares a function name in the local function table functions_table. More...
 

Typedefs

typedef std::shared_ptr
< function_expression > 
wfl::function_expression_ptr
 
typedef std::shared_ptr
< formula_function > 
wfl::formula_function_ptr
 
typedef std::map< std::string,
formula_function_ptr > 
wfl::functions_map
 

Macro Definition Documentation

#define DECLARE_WFL_FUNCTION (   name)
Value:
functions_table.add_function(#name, \
formula_function_ptr(new builtin_formula_function<name##_function>(#name)))
std::shared_ptr< formula_function > formula_function_ptr
Definition: function.hpp:138
static const char * name(const std::vector< SDL_Joystick * > &joysticks, const size_t index)
Definition: joystick.cpp:48

Declares a function name in the local function table functions_table.

The function must be defined by a name_function class which is accessible in the current scope.

Definition at line 162 of file function.hpp.

Referenced by wfl::action_function_symbol_table::action_function_symbol_table(), wfl::ai_function_symbol_table::ai_function_symbol_table(), wfl::gamestate_function_symbol_table::gamestate_function_symbol_table(), and wfl::function_symbol_table::get_builtins().