#include <formula.hpp>
Public Member Functions | |
formula (const std::string &str, function_symbol_table *symbols=NULL) | |
variant | execute (const formula_callable &variables) const |
variant | execute () const |
const std::string & | str () const |
Static Public Member Functions | |
static variant | evaluate (const const_formula_ptr &f, const formula_callable &variables, variant default_res=variant(0)) |
static formula_ptr | create_string_formula (const std::string &str) |
static formula_ptr | create_optional_formula (const std::string &str, function_symbol_table *symbols=NULL) |
Private Member Functions | |
formula () | |
Private Attributes | |
expression_ptr | expr_ |
std::string | str_ |
Definition at line 31 of file formula.hpp.
game_logic::formula::formula | ( | const std::string & | str, | |
function_symbol_table * | symbols = NULL | |||
) | [explicit] |
Definition at line 797 of file formula.cpp.
References expr_, formula_tokenizer::get_token(), game_logic::parse_expression(), formula_tokenizer::TOKEN_COMMENT, and formula_tokenizer::TOKEN_WHITESPACE.
game_logic::formula::formula | ( | ) | [inline, private] |
Definition at line 53 of file formula.hpp.
Referenced by create_optional_formula(), and create_string_formula().
static variant game_logic::formula::evaluate | ( | const const_formula_ptr & | f, | |
const formula_callable & | variables, | |||
variant | default_res = variant(0) | |||
) | [inline, static] |
Definition at line 33 of file formula.hpp.
formula_ptr game_logic::formula::create_string_formula | ( | const std::string & | str | ) | [static] |
formula_ptr game_logic::formula::create_optional_formula | ( | const std::string & | str, | |
function_symbol_table * | symbols = NULL | |||
) | [static] |
Definition at line 783 of file formula.cpp.
References formula().
Referenced by formula_ai::evaluate(), game_logic::parse_expression(), and formula_ai::play_turn().
variant game_logic::formula::execute | ( | const formula_callable & | variables | ) | const |
Definition at line 826 of file formula.cpp.
References expr_, and type_error::message.
Referenced by formula_ai::evaluate(), and unit::internal_matches_filter().
variant game_logic::formula::execute | ( | ) | const |
Definition at line 836 of file formula.cpp.
const std::string& game_logic::formula::str | ( | ) | const [inline] |
expression_ptr game_logic::formula::expr_ [private] |
std::string game_logic::formula::str_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |