The Battle for Wesnoth  1.17.17+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 107 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 903 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)

Implements events::observer.

Definition at line 867 of file contexts.cpp.

References clear().

◆ init()

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

Definition at line 908 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_

Definition at line 118 of file contexts.hpp.

Referenced by clear(), and get().

◆ map_

const gamemap* ai::keeps_cache::map_

Definition at line 117 of file contexts.hpp.

Referenced by get(), and init().

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