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