#include <side_filter.hpp>
Public Member Functions | |
~side_filter () | |
side_filter (const std::string &side_string, const filter_context *fc, bool flat_tod=false) | |
side_filter (const vconfig &cfg, const filter_context *fc, bool flat_tod=false) | |
bool | match (const team &t) const |
bool | match (const int side) const |
std::vector< int > | get_teams () const |
const config & | get_config () const |
Private Member Functions | |
side_filter (const side_filter &other) | |
side_filter & | operator= (const side_filter &other) |
bool | match_internal (const team &t) const |
Private Attributes | |
const vconfig | cfg_ |
bool | flat_ |
std::string | side_string_ |
const filter_context * | fc_ |
The filter context for this filter. More... | |
std::unique_ptr< unit_filter > | ufilter_ |
std::unique_ptr< side_filter > | allied_filter_ |
std::unique_ptr< side_filter > | enemy_filter_ |
std::unique_ptr< side_filter > | has_ally_filter_ |
std::unique_ptr< side_filter > | has_enemy_filter_ |
Definition at line 29 of file side_filter.hpp.
side_filter::~side_filter | ( | ) |
Definition at line 44 of file side_filter.cpp.
side_filter::side_filter | ( | const std::string & | side_string, |
const filter_context * | fc, | ||
bool | flat_tod = false |
||
) |
Definition at line 54 of file side_filter.cpp.
Referenced by match(), and match_internal().
side_filter::side_filter | ( | const vconfig & | cfg, |
const filter_context * | fc, | ||
bool | flat_tod = false |
||
) |
Definition at line 46 of file side_filter.cpp.
|
private |
|
inline |
Definition at line 41 of file side_filter.hpp.
References cfg_, and vconfig::get_config().
Referenced by game_events::filter_side::serialize().
std::vector< int > side_filter::get_teams | ( | ) | const |
Definition at line 59 of file side_filter.cpp.
References fc_, filter_context::get_disp_context(), match(), t, and display_context::teams().
Referenced by game_lua_kernel::get_sides_vector(), game_lua_kernel::intf_add_tile_overlay(), game_lua_kernel::intf_get_sides(), game_lua_kernel::intf_redraw(), and terrain_filter::match_internal().
bool side_filter::match | ( | const int | side | ) | const |
Definition at line 255 of file side_filter.cpp.
References fc_, filter_context::get_disp_context(), display_context::get_team(), and match().
bool side_filter::match | ( | const team & | t | ) | const |
Definition at line 261 of file side_filter.cpp.
References vconfig::all_ordered(), cfg_, fc_, flat_, match_internal(), side_filter(), and t.
Referenced by get_teams(), game_lua_kernel::intf_match_side(), match(), and game_events::filter_side::operator()().
|
private |
Definition at line 77 of file side_filter.cpp.
References allied_filter_, wfl::variant::as_bool(), config_attribute_value::blank(), cfg_, check_side_number(), vconfig::child(), resources::controller, e, enemy_filter_, ERR_NG, ERR_WML, wfl::formula::evaluate(), fc_, utils::find(), flat_, filter_context::get_disp_context(), filter_context::get_lua_kernel(), string_enums::enum_base< Definition >::get_string(), display_context::get_team(), has_ally_filter_, vconfig::has_attribute(), vconfig::has_child(), has_enemy_filter_, team::is_enemy(), synced_context::is_synced(), lg::log_to_chat(), vconfig::make_safe(), vconfig::null(), game_lua_kernel::run_filter(), side_filter(), side_string_, utils::split(), t, ufilter_, and display_context::units().
Referenced by match().
|
private |
|
mutableprivate |
Definition at line 58 of file side_filter.hpp.
Referenced by match_internal().
|
private |
Definition at line 49 of file side_filter.hpp.
Referenced by get_config(), match(), and match_internal().
|
mutableprivate |
Definition at line 59 of file side_filter.hpp.
Referenced by match_internal().
|
private |
The filter context for this filter.
It should be a pointer because otherwise the default ctor doesn't work
Definition at line 55 of file side_filter.hpp.
Referenced by get_teams(), match(), and match_internal().
|
private |
Definition at line 51 of file side_filter.hpp.
Referenced by match(), and match_internal().
|
mutableprivate |
Definition at line 60 of file side_filter.hpp.
Referenced by match_internal().
|
mutableprivate |
Definition at line 61 of file side_filter.hpp.
Referenced by match_internal().
|
private |
Definition at line 52 of file side_filter.hpp.
Referenced by match_internal().
|
mutableprivate |
Definition at line 57 of file side_filter.hpp.
Referenced by match_internal().