The Battle for Wesnoth  1.15.2+dev
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 109 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 942 of file contexts.cpp.

References keeps_.

Referenced by 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 902 of file contexts.cpp.

References preferences::clear().

◆ init()

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

Definition at line 948 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 120 of file contexts.hpp.

Referenced by clear(), and get().

◆ map_

const gamemap* ai::keeps_cache::map_
private

Definition at line 119 of file contexts.hpp.

Referenced by get(), init(), and ai::readonly_context_impl::power_projection().


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