The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
ai::keeps_cache Class Reference

#include <contexts.hpp>

Inheritance diagram for ai::keeps_cache:

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 103 of file contexts.hpp.

Constructor & Destructor Documentation

◆ keeps_cache()

ai::keeps_cache::keeps_cache ( )

◆ ~keeps_cache()

ai::keeps_cache::~keeps_cache ( )

Member Function Documentation

◆ clear()

void ai::keeps_cache::clear ( )

Definition at line 900 of file contexts.cpp.

References keeps_.

Referenced by handle_generic_event(), and ai::readonly_context_impl::invalidate_keeps_cache().

◆ get()

const std::set< map_location > & ai::keeps_cache::get ( )

◆ handle_generic_event()

void ai::keeps_cache::handle_generic_event ( const std::string &  event_name)
virtual

Implements events::observer.

Definition at line 864 of file contexts.cpp.

References clear().

◆ init()

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

Definition at line 905 of file contexts.cpp.

References map_.

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

Member Data Documentation

◆ keeps_

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

Definition at line 114 of file contexts.hpp.

Referenced by clear(), and get().

◆ map_

const gamemap* ai::keeps_cache::map_
private

Definition at line 113 of file contexts.hpp.

Referenced by get(), and init().


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