dfool::unit_memory Class Reference

#include <ai_dfool.hpp>

Collaboration diagram for dfool::unit_memory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 unit_memory (const config &cfg)
void add_unit_sighting (unit u, gamemap::location l, size_t t)
void remove_unit_sighting (std::string id)
void write (config &temp)
void known_map (unit_map &units, size_t turn=0)

Private Member Functions

void write_element (int i, config &temp)

Private Attributes

std::vector< unitunits_
std::vector< std::string > ids_
std::vector< size_t > turns_
std::vector< gamemap::locationlocations_


Detailed Description

Definition at line 49 of file ai_dfool.hpp.


Constructor & Destructor Documentation

dfool::unit_memory::unit_memory ( const config cfg  ) 

Definition at line 300 of file ai_dfool.cpp.

References add_unit_sighting(), and config::get_children().


Member Function Documentation

void dfool::unit_memory::add_unit_sighting ( unit  u,
gamemap::location  l,
size_t  t 
)

void dfool::unit_memory::remove_unit_sighting ( std::string  id  ) 

Definition at line 352 of file ai_dfool.cpp.

References ids_, locations_, turns_, and units_.

Referenced by add_unit_sighting().

void dfool::unit_memory::write ( config temp  ) 

Definition at line 369 of file ai_dfool.cpp.

References config::add_child(), units_, and write_element().

Referenced by dfool::dfool_ai::play_turn().

void dfool::unit_memory::known_map ( unit_map units,
size_t  turn = 0 
)

Definition at line 392 of file ai_dfool.cpp.

References unit_map::add(), ids_, locations_, unit_map::replace(), turns_, and units_.

Referenced by dfool::dfool_ai::moveto().

void dfool::unit_memory::write_element ( int  i,
config temp 
) [private]

Definition at line 378 of file ai_dfool.cpp.

References config::add_child(), locations_, turns_, and units_.

Referenced by write().


Member Data Documentation

std::vector<unit> dfool::unit_memory::units_ [private]

Definition at line 61 of file ai_dfool.hpp.

Referenced by add_unit_sighting(), known_map(), remove_unit_sighting(), write(), and write_element().

std::vector<std::string> dfool::unit_memory::ids_ [private]

Definition at line 62 of file ai_dfool.hpp.

Referenced by add_unit_sighting(), known_map(), and remove_unit_sighting().

std::vector<size_t> dfool::unit_memory::turns_ [private]

Definition at line 63 of file ai_dfool.hpp.

Referenced by add_unit_sighting(), known_map(), remove_unit_sighting(), and write_element().

Definition at line 64 of file ai_dfool.hpp.

Referenced by add_unit_sighting(), known_map(), remove_unit_sighting(), and write_element().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs