The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
ai::keeps_cache Class Reference

#include <contexts.hpp>

Inheritance diagram for ai::keeps_cache:
Inheritance graph

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 gamemapmap_
 
std::set< map_locationkeeps_
 

Detailed Description

Definition at line 118 of file contexts.hpp.

Constructor & Destructor Documentation

ai::keeps_cache::keeps_cache ( )
ai::keeps_cache::~keeps_cache ( )

Member Function Documentation

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 ( )
void ai::keeps_cache::handle_generic_event ( const std::string event_name)
virtual

Implements events::observer.

Definition at line 932 of file contexts.cpp.

References clear().

void ai::keeps_cache::init ( const gamemap map)

Definition at line 978 of file contexts.cpp.

References map_.

Referenced by ai::readonly_context_impl::readonly_context_impl().

Member Data Documentation

std::set<map_location> ai::keeps_cache::keeps_
private

Definition at line 129 of file contexts.hpp.

Referenced by clear(), and get().

const gamemap* ai::keeps_cache::map_
private

Definition at line 128 of file contexts.hpp.

Referenced by get(), and init().


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