The basic unit filter gives a generic implementation of the match fcn. More...
Public Member Functions | |
basic_unit_filter_impl (const vconfig &vcfg, const filter_context &fc, bool flat_tod) | |
virtual bool | matches (const unit &u, const map_location &loc, const unit *u2) const |
Begin implementations of filter impl's. More... | |
virtual std::vector< const unit * > | all_matches_on_map (unsigned max_matches) const |
virtual unit_const_ptr | first_match_on_map () const |
config | to_config () const |
virtual | ~basic_unit_filter_impl () |
Public Member Functions inherited from unit_filter_abstract_impl | |
virtual bool | empty () const |
virtual | ~unit_filter_abstract_impl () |
Private Member Functions | |
bool | internal_matches_filter (const unit &u, const map_location &loc, const unit *u2) const |
Private Attributes | |
const filter_context & | fc_ |
const vconfig | vcfg |
bool | use_flat_tod_ |
std::vector< unit_filter > | cond_children_ |
std::vector< conditional::TYPE > | cond_child_types_ |
The basic unit filter gives a generic implementation of the match fcn.
Definition at line 127 of file filter.cpp.
|
inline |
Definition at line 129 of file filter.cpp.
References cond(), cond_child_types_, cond_children_, DBG_CF, fc_, gui2::event::find(), vconfig::all_children_iterator::get_child(), vconfig::all_children_iterator::get_key(), vconfig::make_safe(), vconfig::ordered_begin(), vconfig::ordered_end(), and use_flat_tod_.
|
inlinevirtual |
Definition at line 179 of file filter.cpp.
|
virtual |
Implements unit_filter_abstract_impl.
Definition at line 598 of file filter.cpp.
References fc_, filter_context::get_disp_context(), matches(), and display_context::units().
|
virtual |
Implements unit_filter_abstract_impl.
Definition at line 612 of file filter.cpp.
References unit_map::begin(), unit_map::end(), fc_, filter_context::get_disp_context(), matches(), resources::units, and display_context::units().
|
private |
Definition at line 259 of file filter.cpp.
References game_logic::map_formula_callable::add(), config::all_children_range(), variable_info< vit >::as_array(), variant::as_bool(), unit::attacks(), config::attribute_range(), unit_type::base_id(), config::attribute_value::blank(), unit::can_recruit(), vconfig::child(), vconfig::count_children(), map_location::default_dirs(), unit::defense_modifier(), e, unit_filter_abstract_impl::empty(), vconfig::empty(), config::empty(), unit_map::end(), game_logic::formula::evaluate(), FAIL, fc_, game_logic::formula_error::filename, gui2::event::find(), unit_map::find(), unit_type_data::find(), unit::gender(), get_adjacent_tiles(), vconfig::get_children(), filter_context::get_disp_context(), filter_context::get_game_data(), filter_context::get_lua_kernel(), vconfig::get_parsed_config(), unit::get_role(), unit::get_state(), unit::get_states(), side_filter::get_teams(), gamemap::get_terrain(), unit::has_ability_by_id(), vconfig::has_child(), unit_type::has_variation(), i, unit_race::id(), unit::id(), in_ranges(), unit::invisible(), unit::level(), game_logic::formula_error::line, main(), display_context::map(), match(), config::matches(), map_location::matches_range(), unit::movement_cost(), unit::name(), gamemap::on_board(), map_location::parse_directions(), utils::parse_ranges(), unit::race(), unit::recall_cost(), unit::side(), utils::split(), unit::STATE_GUARDIAN, string_gender(), display_context::teams(), game_logic::formula_error::type, unit::type(), unit::type_id(), unit_types, resources::units, display_context::units(), use_flat_tod_, unit::variables(), unit::variation(), vcfg, font::weapon, lg::wml_error(), and unit::write().
Referenced by matches().
|
virtual |
Begin implementations of filter impl's.
Implements unit_filter_abstract_impl.
Definition at line 225 of file filter.cpp.
References cond_child_types_, cond_children_, fc_, filter_context::get_disp_context(), unit::get_location(), i, internal_matches_filter(), t_translation::NOT, display_context::units(), map_location::valid(), map_location::x, and map_location::y.
Referenced by all_matches_on_map(), and first_match_on_map().
|
inlinevirtual |
Implements unit_filter_abstract_impl.
Definition at line 175 of file filter.cpp.
References vconfig::get_config(), and vcfg.
|
private |
Definition at line 186 of file filter.cpp.
Referenced by basic_unit_filter_impl(), and matches().
|
private |
Definition at line 185 of file filter.cpp.
Referenced by basic_unit_filter_impl(), and matches().
|
private |
Definition at line 181 of file filter.cpp.
Referenced by all_matches_on_map(), basic_unit_filter_impl(), first_match_on_map(), internal_matches_filter(), and matches().
|
private |
Definition at line 183 of file filter.cpp.
Referenced by basic_unit_filter_impl(), and internal_matches_filter().
|
private |
Definition at line 182 of file filter.cpp.
Referenced by internal_matches_filter(), and to_config().