#include <contexts.hpp>
Public Member Functions | |
keeps_cache () | |
~keeps_cache () | |
void | handle_generic_event (const std::string &event_name) |
void | clear () |
const std::set< map_location > & | get () |
void | init (const gamemap &map) |
Public Member Functions inherited from events::observer | |
virtual | ~observer () |
Private Attributes | |
const gamemap * | map_ |
std::set< map_location > | keeps_ |
Definition at line 118 of file contexts.hpp.
ai::keeps_cache::keeps_cache | ( | ) |
Definition at line 957 of file contexts.cpp.
References ai::manager::add_map_changed_observer(), and ai::manager::add_turn_started_observer().
ai::keeps_cache::~keeps_cache | ( | ) |
Definition at line 966 of file contexts.cpp.
References ai::manager::remove_map_changed_observer(), and ai::manager::remove_turn_started_observer().
void ai::keeps_cache::clear | ( | ) |
Definition at line 972 of file contexts.cpp.
References keeps_.
Referenced by handle_generic_event(), and ai::readonly_context_impl::invalidate_keeps_cache().
const std::set< map_location > & ai::keeps_cache::get | ( | ) |
Definition at line 983 of file contexts.cpp.
References get_adjacent_tiles(), gamemap::h(), gamemap::is_castle(), gamemap::is_keep(), keeps_, map_, and gamemap::w().
Referenced by ai::readonly_context_impl::keeps().
|
virtual |
Definition at line 978 of file contexts.cpp.
References map_.
Referenced by ai::readonly_context_impl::readonly_context_impl().
|
private |
Definition at line 129 of file contexts.hpp.
|
private |
Definition at line 128 of file contexts.hpp.