The Battle for Wesnoth
1.15.9+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
33
class
filter_context
{
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
};
filter_context::get_disp_context
virtual const display_context & get_disp_context() const =0
filter_context::~filter_context
virtual ~filter_context()
Definition:
filter_context.hpp:44
game_lua_kernel
Definition:
game_lua_kernel.hpp:47
display_context
Definition:
display_context.hpp:36
tod_manager
Definition:
tod_manager.hpp:31
filter_context::get_tod_man
virtual const tod_manager & get_tod_man() const =0
game_data
Definition:
game_data.hpp:26
filter_context::get_game_data
virtual const game_data * get_game_data() const =0
filter_context
Definition:
filter_context.hpp:33
filter_context::get_lua_kernel
virtual game_lua_kernel * get_lua_kernel() const =0
Generated by
1.8.13