Public Member Functions | Private Member Functions | Private Attributes

game_logic::attack_callable Class Reference

#include <callable_objects.hpp>

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

List of all members.

Public Member Functions

 attack_callable (const map_location &move_from, const map_location &src, const map_location &dst, int weapon)
const map_locationmove_from () const
const map_locationsrc () const
const map_locationdst () const
int weapon () const
int defender_weapon () const
int do_compare (const game_logic::formula_callable *callable) const
 Compare two attacks in deterministic way or compare pointers (nondeterministic in consequent game runs) if method argument is not attack_callable.

Private Member Functions

variant get_value (const std::string &key) const
void get_inputs (std::vector< game_logic::formula_input > *inputs) const

Private Attributes

map_location move_from_
map_location src_
map_location dst_
battle_context bc_

Detailed Description

Definition at line 49 of file callable_objects.hpp.


Constructor & Destructor Documentation

game_logic::attack_callable::attack_callable ( const map_location move_from,
const map_location src,
const map_location dst,
int  weapon 
)

Definition at line 114 of file callable_objects.cpp.

References game_logic::formula_callable::type_.


Member Function Documentation

int game_logic::attack_callable::defender_weapon (  )  const [inline]

Definition at line 63 of file callable_objects.hpp.

References battle_context_unit_stats::attack_num, bc_, and battle_context::get_defender_stats().

Referenced by do_compare().

Here is the call graph for this function:

Here is the caller graph for this function:

int game_logic::attack_callable::do_compare ( const game_logic::formula_callable callable  )  const [virtual]

Compare two attacks in deterministic way or compare pointers (nondeterministic in consequent game runs) if method argument is not attack_callable.

Reimplemented from game_logic::formula_callable.

Definition at line 142 of file callable_objects.cpp.

References defender_weapon(), map_location::do_compare(), dst(), dst_, move_from(), move_from_, src(), src_, and weapon().

Here is the call graph for this function:

const map_location& game_logic::attack_callable::dst (  )  const [inline]

Definition at line 61 of file callable_objects.hpp.

References dst_.

Referenced by do_compare().

Here is the caller graph for this function:

void game_logic::attack_callable::get_inputs ( std::vector< game_logic::formula_input > *  inputs  )  const [private, virtual]

Reimplemented from game_logic::formula_callable.

Definition at line 136 of file callable_objects.cpp.

References game_logic::FORMULA_READ_ONLY.

variant game_logic::attack_callable::get_value ( const std::string &  key  )  const [private, virtual]

Implements game_logic::formula_callable.

Definition at line 124 of file callable_objects.cpp.

References dst_, move_from_, and src_.

const map_location& game_logic::attack_callable::move_from (  )  const [inline]

Definition at line 59 of file callable_objects.hpp.

References move_from_.

Referenced by do_compare().

Here is the caller graph for this function:

const map_location& game_logic::attack_callable::src (  )  const [inline]

Definition at line 60 of file callable_objects.hpp.

References src_.

Referenced by do_compare().

Here is the caller graph for this function:

int game_logic::attack_callable::weapon (  )  const [inline]

Definition at line 62 of file callable_objects.hpp.

References battle_context_unit_stats::attack_num, bc_, and battle_context::get_attacker_stats().

Referenced by do_compare().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 51 of file callable_objects.hpp.

Referenced by defender_weapon(), and weapon().

Definition at line 50 of file callable_objects.hpp.

Referenced by do_compare(), dst(), and get_value().

Definition at line 50 of file callable_objects.hpp.

Referenced by do_compare(), get_value(), and move_from().

Definition at line 50 of file callable_objects.hpp.

Referenced by do_compare(), get_value(), and src().


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