The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
filter_context.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2014 - 2025
3 by Chris Beck <render787@gmail.com>
4 Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY.
12
13 See the COPYING file for more details.
14*/
15
16/**
17 *
18 * This class is an abstract base class which represents a display context
19 * (game map, units, and teams) together with a TOD manager. This, plus
20 * the game data (WML variables) and a lua kernel (currently a singleton)
21 * is sufficient to evaluate filters.
22 *
23 **/
24
25#pragma once
26
27#include <vector>
28
29class display_context;
30class tod_manager;
31class game_data;
32class game_lua_kernel;
33
35public:
36 // accessors
37
38 virtual const display_context & get_disp_context() const = 0;
39 virtual const tod_manager & get_tod_man() const = 0;
40 virtual const game_data * get_game_data() const = 0;
41 virtual game_lua_kernel * get_lua_kernel() const = 0;
42
43 // Dtor
44
45 virtual ~filter_context() {}
46};
Abstract class for exposing game data that doesn't depend on the GUI, however which for historical re...
virtual ~filter_context()
virtual const game_data * get_game_data() const =0
virtual const tod_manager & get_tod_man() const =0
virtual game_lua_kernel * get_lua_kernel() const =0
virtual const display_context & get_disp_context() const =0