The Battle for Wesnoth
1.13.4+dev
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
scripting
lua_formula_bridge.hpp
Go to the documentation of this file.
1
/*
2
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY.
10
11
See the COPYING file for more details.
12
*/
13
14
#ifndef LUA_FORMULA_BRIDGE_HPP_INCLUDED
15
#define LUA_FORMULA_BRIDGE_HPP_INCLUDED
16
17
#include <string>
18
#include <boost/shared_ptr.hpp>
19
20
struct
lua_State
;
21
22
class
variant
;
23
namespace
game_logic
{
24
class
formula;
25
class
function_symbol_table;
26
class
formula_debugger;
27
class
formula_callable;
28
}
29
30
namespace
lua_formula_bridge
{
31
32
int
intf_eval_formula
(
lua_State
*);
33
int
intf_compile_formula
(
lua_State
*);
34
std::string
register_metatables
(
lua_State
*);
35
36
class
fwrapper
{
37
boost::shared_ptr<game_logic::formula>
formula_ptr
;
38
public
:
39
fwrapper
(
const
std::string
& code,
game_logic::function_symbol_table
* functions =
nullptr
);
40
std::string
str
()
const
;
41
variant
evaluate
(
const
game_logic::formula_callable
& variables,
game_logic::formula_debugger
* fdb =
nullptr
)
const
;
42
};
43
44
}
// end namespace lua_formula_bridge
45
46
#endif
game_logic
Definition:
ai.hpp:43
lua_formula_bridge::fwrapper
Definition:
lua_formula_bridge.hpp:36
lua_formula_bridge::fwrapper::formula_ptr
boost::shared_ptr< game_logic::formula > formula_ptr
Definition:
lua_formula_bridge.hpp:37
lua_formula_bridge::intf_eval_formula
int intf_eval_formula(lua_State *)
Evaluates a formula in the formula engine.
Definition:
lua_formula_bridge.cpp:207
lua_formula_bridge::fwrapper::evaluate
variant evaluate(const game_logic::formula_callable &variables, game_logic::formula_debugger *fdb=nullptr) const
Definition:
lua_formula_bridge.cpp:258
lua_State
Definition:
lstate.h:153
lua_formula_bridge::intf_compile_formula
int intf_compile_formula(lua_State *)
Definition:
lua_formula_bridge.cpp:233
lua_formula_bridge::fwrapper::str
std::string str() const
Definition:
lua_formula_bridge.cpp:250
game_logic::function_symbol_table
Definition:
function.hpp:136
variant
Definition:
variant.hpp:52
lua_formula_bridge::register_metatables
std::string register_metatables(lua_State *)
Definition:
lua_formula_bridge.cpp:281
lua_formula_bridge
Definition:
lua_formula_bridge.hpp:30
game_logic::formula_callable
Definition:
callable.hpp:34
boost::shared_ptr< game_logic::formula >
lua_formula_bridge::fwrapper::fwrapper
fwrapper(const std::string &code, game_logic::function_symbol_table *functions=nullptr)
Definition:
lua_formula_bridge.cpp:245
string
GLsizei const GLcharARB ** string
Definition:
glew.h:4503
game_logic::formula_debugger
Definition:
debugger.hpp:76
Generated by
1.8.8