#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 102 of file contexts.hpp.
| ai::keeps_cache::keeps_cache | ( | ) |
Definition at line 874 of file contexts.cpp.
References ai::manager::add_map_changed_observer(), ai::manager::add_turn_started_observer(), and ai::manager::get_singleton().
| ai::keeps_cache::~keeps_cache | ( | ) |
Definition at line 882 of file contexts.cpp.
References ai::manager::get_singleton(), ai::manager::remove_map_changed_observer(), and ai::manager::remove_turn_started_observer().
| void ai::keeps_cache::clear | ( | ) |
Definition at line 888 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 898 of file contexts.cpp.
References get_adjacent_tiles(), gamemap_base::h(), gamemap::is_castle(), gamemap::is_keep(), keeps_, loc, map_, and gamemap_base::w().
Referenced by ai::readonly_context_impl::keeps().
|
virtual |
| void ai::keeps_cache::init | ( | const gamemap & | map | ) |
Definition at line 893 of file contexts.cpp.
References map_.
Referenced by ai::readonly_context_impl::readonly_context_impl().
|
private |
Definition at line 113 of file contexts.hpp.
|
private |
Definition at line 112 of file contexts.hpp.