Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends

game_logic::formula Class Reference

#include <formula.hpp>

Collaboration diagram for game_logic::formula:
Collaboration graph
[legend]

List of all members.

Public Member Functions

variant evaluate (const formula_callable &variables, formula_debugger *fdb=NULL) const
variant evaluate (formula_debugger *fdb=NULL) const
 formula (const std::string &str, function_symbol_table *symbols=NULL)
 formula (const formula_tokenizer::token *i1, const formula_tokenizer::token *i2, function_symbol_table *symbols=NULL)
const std::string & str () const

Static Public Member Functions

static variant evaluate (const const_formula_ptr &f, const formula_callable &variables, formula_debugger *fdb=NULL, variant default_res=variant(0))
static formula_ptr create_optional_formula (const std::string &str, function_symbol_table *symbols=NULL)

Private Member Functions

variant execute (const formula_callable &variables, formula_debugger *fdb=NULL) const
variant execute (formula_debugger *fdb) const
 formula ()

Private Attributes

expression_ptr expr_
std::string str_

Friends

class formula_debugger

Detailed Description

Definition at line 30 of file formula.hpp.


Constructor & Destructor Documentation

game_logic::formula::formula ( const std::string &  str,
function_symbol_table symbols = NULL 
) [explicit]

Definition at line 1010 of file formula.cpp.

game_logic::formula::formula ( const formula_tokenizer::token i1,
const formula_tokenizer::token i2,
function_symbol_table symbols = NULL 
) [explicit]

Definition at line 1116 of file formula.cpp.

game_logic::formula::formula (  )  [inline, private]

Definition at line 68 of file formula.hpp.


Member Function Documentation

formula_ptr game_logic::formula::create_optional_formula ( const std::string &  str,
function_symbol_table symbols = NULL 
) [static]

Definition at line 1001 of file formula.cpp.

static variant game_logic::formula::evaluate ( const const_formula_ptr f,
const formula_callable variables,
formula_debugger fdb = NULL,
variant  default_res = variant(0) 
) [inline, static]

Definition at line 32 of file formula.hpp.

Referenced by do_interpolation(), ai::stage_unit_formulas::do_play_stage(), ai::formula_ai::evaluate(), and unit::internal_matches_filter().

Here is the caller graph for this function:

variant game_logic::formula::evaluate ( const formula_callable variables,
formula_debugger fdb = NULL 
) const [inline]

Definition at line 42 of file formula.hpp.

References game_logic::evaluate_formula_callback(), and execute().

Here is the call graph for this function:

variant game_logic::formula::evaluate ( formula_debugger fdb = NULL  )  const [inline]

Definition at line 51 of file formula.hpp.

References game_logic::evaluate_formula_callback(), and execute().

Here is the call graph for this function:

variant game_logic::formula::execute ( formula_debugger fdb  )  const [private]

Definition at line 1138 of file formula.cpp.

variant game_logic::formula::execute ( const formula_callable variables,
formula_debugger fdb = NULL 
) const [private]

Definition at line 1128 of file formula.cpp.

Referenced by evaluate(), and game_logic::formula_debugger::evaluate_formula_callback().

Here is the caller graph for this function:

const std::string& game_logic::formula::str (  )  const [inline]

Definition at line 63 of file formula.hpp.

References str_.

Referenced by game_logic::formula_debugger::evaluate_formula_callback().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class formula_debugger [friend]

Definition at line 72 of file formula.hpp.


Member Data Documentation

Definition at line 70 of file formula.hpp.

std::string game_logic::formula::str_ [private]

Definition at line 71 of file formula.hpp.

Referenced by str().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:20:51 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs