Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

game_logic::formula_callable Class Reference

#include <formula_callable.hpp>

Inheritance diagram for game_logic::formula_callable:
Inheritance graph
[legend]
Collaboration diagram for game_logic::formula_callable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 formula_callable (bool has_self=true)
variant query_value (const std::string &key) const
void mutate_value (const std::string &key, const variant &value)
std::vector< formula_inputinputs () const
bool equals (const formula_callable *other) const
bool less (const formula_callable *other) const
virtual void get_inputs (std::vector< formula_input > *) const
void serialize (std::string &str) const
bool has_key (const std::string &key) const

Protected Types

enum  TYPE {
  FORMULA_C, TERRAIN_C, LOCATION_C, UNIT_TYPE_C,
  UNIT_C, ATTACK_TYPE_C, MOVE_PARTIAL_C, MOVE_C,
  ATTACK_C, MOVE_MAP_C
}

Protected Member Functions

virtual ~formula_callable ()
virtual void set_value (const std::string &key, const variant &value)
virtual int do_compare (const formula_callable *callable) const
virtual void serialize_to_string (std::string &) const

Protected Attributes

TYPE type_

Private Member Functions

virtual variant get_value (const std::string &key) const =0

Private Attributes

bool has_self_

Detailed Description

Definition at line 35 of file formula_callable.hpp.


Member Enumeration Documentation

Enumerator:
FORMULA_C 
TERRAIN_C 
LOCATION_C 
UNIT_TYPE_C 
UNIT_C 
ATTACK_TYPE_C 
MOVE_PARTIAL_C 
MOVE_C 
ATTACK_C 
MOVE_MAP_C 

Definition at line 97 of file formula_callable.hpp.


Constructor & Destructor Documentation

game_logic::formula_callable::formula_callable ( bool  has_self = true  )  [inline, explicit]

Definition at line 37 of file formula_callable.hpp.

virtual game_logic::formula_callable::~formula_callable (  )  [inline, protected, virtual]

Definition at line 76 of file formula_callable.hpp.


Member Function Documentation

virtual int game_logic::formula_callable::do_compare ( const formula_callable callable  )  const [inline, protected, virtual]

Reimplemented in game_logic::attack_callable, game_logic::move_callable, game_logic::move_partial_callable, and location_callable.

Definition at line 79 of file formula_callable.hpp.

References type_.

Referenced by equals(), and less().

Here is the caller graph for this function:

bool game_logic::formula_callable::equals ( const formula_callable other  )  const [inline]

Definition at line 57 of file formula_callable.hpp.

References do_compare().

Referenced by variant::operator==().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void game_logic::formula_callable::get_inputs ( std::vector< formula_input > *   )  const [inline, virtual]
virtual variant game_logic::formula_callable::get_value ( const std::string &  key  )  const [private, pure virtual]
bool game_logic::formula_callable::has_key ( const std::string &  key  )  const [inline]

Definition at line 72 of file formula_callable.hpp.

References variant::is_null(), and query_value().

Here is the call graph for this function:

std::vector<formula_input> game_logic::formula_callable::inputs (  )  const [inline]

Definition at line 51 of file formula_callable.hpp.

References get_inputs().

Referenced by ai::formula_ai::on_create(), and variant::to_debug_string().

Here is the call graph for this function:

Here is the caller graph for this function:

bool game_logic::formula_callable::less ( const formula_callable other  )  const [inline]

Definition at line 61 of file formula_callable.hpp.

References do_compare().

Referenced by variant::operator<=().

Here is the call graph for this function:

Here is the caller graph for this function:

void game_logic::formula_callable::mutate_value ( const std::string &  key,
const variant value 
) [inline]

Definition at line 47 of file formula_callable.hpp.

References set_value().

Here is the call graph for this function:

variant game_logic::formula_callable::query_value ( const std::string &  key  )  const [inline]

Definition at line 40 of file formula_callable.hpp.

References get_value(), and has_self_.

Referenced by variant::get_member(), game_logic::formula_variant_callable_with_backup::get_value(), game_logic::formula_callable_with_backup::get_value(), has_key(), and variant::to_debug_string().

Here is the call graph for this function:

Here is the caller graph for this function:

void game_logic::formula_callable::serialize ( std::string &  str  )  const [inline]

Definition at line 68 of file formula_callable.hpp.

References serialize_to_string().

Referenced by variant::serialize_to_string().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void game_logic::formula_callable::serialize_to_string ( std::string &   )  const [inline, protected, virtual]

Reimplemented in location_callable.

Definition at line 90 of file formula_callable.hpp.

Referenced by serialize().

Here is the caller graph for this function:

void game_logic::formula_callable::set_value ( const std::string &  key,
const variant value 
) [protected, virtual]

Reimplemented in game_logic::map_formula_callable.

Definition at line 26 of file formula.cpp.

Referenced by mutate_value().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 103 of file formula_callable.hpp.

Referenced by query_value().


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:53 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs