#include <formula.hpp>
Public Member Functions | |
variant | evaluate (const formula_callable &variables, formula_debugger *fdb=nullptr) const |
variant | evaluate (formula_debugger *fdb=nullptr) const |
formula (const std::string &str, function_symbol_table *symbols=nullptr) | |
formula (const formula_tokenizer::token *i1, const formula_tokenizer::token *i2, function_symbol_table *symbols=nullptr) | |
~formula () | |
const std::string & | str () const |
Static Public Member Functions | |
static variant | evaluate (const const_formula_ptr &f, const formula_callable &variables, formula_debugger *fdb=nullptr, variant default_res=variant(0)) |
static formula_ptr | create_optional_formula (const std::string &str, function_symbol_table *symbols=nullptr) |
Static Public Attributes | |
static const char *const | id_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_" |
Private Member Functions | |
variant | execute (const formula_callable &variables, formula_debugger *fdb=nullptr) const |
variant | execute (formula_debugger *fdb) const |
formula () | |
Private Attributes | |
expression_ptr | expr_ |
std::string | str_ |
function_symbol_table * | symbols_ |
bool | managing_symbols |
Friends | |
class | formula_debugger |
Definition at line 29 of file formula.hpp.
|
explicit |
Definition at line 1219 of file formula.cpp.
References formula_tokenizer::token::begin, formula_tokenizer::token_error::description_, formula_tokenizer::token::end, expr_, formula_tokenizer::token_error::formula_, formula_tokenizer::get_token(), formula_tokenizer::token::line_number, symbols_, formula_tokenizer::TOKEN_COMMENT, formula_tokenizer::TOKEN_EOL, formula_tokenizer::TOKEN_KEYWORD, formula_tokenizer::TOKEN_STRING_LITERAL, and formula_tokenizer::TOKEN_WHITESPACE.
|
explicit |
Definition at line 1352 of file formula.cpp.
game_logic::formula::~formula | ( | ) |
Definition at line 1203 of file formula.cpp.
References managing_symbols, and symbols_.
|
inlineprivate |
Definition at line 69 of file formula.hpp.
Referenced by create_optional_formula().
|
static |
Definition at line 1210 of file formula.cpp.
References formula().
Referenced by ai::formula_ai::create_optional_formula().
|
inlinestatic |
Definition at line 31 of file formula.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), game_logic::candidate_action_with_filters::do_filtering(), do_interpolation(), ai::stage_unit_formulas::do_play_stage(), ai::formula_ai::evaluate(), gui2::tformula< T >::execute(), game_logic::base_candidate_action::execute_formula(), basic_unit_filter_impl::internal_matches_filter(), side_filter::match_internal(), terrain_filter::match_internal(), matches_simple_filter(), variant::serialize_from_string(), and gui2::twindow_builder::tresolution::tresolution().
|
inline |
Definition at line 41 of file formula.hpp.
References game_logic::evaluate_formula_callback(), and execute().
|
inline |
Definition at line 50 of file formula.hpp.
References game_logic::evaluate_formula_callback(), and execute().
|
private |
Definition at line 1369 of file formula.cpp.
References expr_, and game::error::message.
Referenced by evaluate(), game_logic::formula_debugger::evaluate_formula_callback(), and execute().
|
private |
Definition at line 1379 of file formula.cpp.
References execute().
|
inline |
Definition at line 63 of file formula.hpp.
References str_.
Referenced by game_logic::formula_debugger::evaluate_formula_callback().
|
friend |
Definition at line 75 of file formula.hpp.
|
private |
Definition at line 71 of file formula.hpp.
|
static |
Definition at line 65 of file formula.hpp.
Referenced by lua_callable::get_inputs(), and config_callable::get_inputs().
|
private |
Definition at line 74 of file formula.hpp.
Referenced by ~formula().
|
private |
Definition at line 72 of file formula.hpp.
Referenced by str().
|
private |
Definition at line 73 of file formula.hpp.
Referenced by formula(), and ~formula().