The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
basic_unit_filter_impl Class Reference

The basic unit filter gives a generic implementation of the match fcn. More...

Inheritance diagram for basic_unit_filter_impl:
Inheritance graph

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_contextfc_
 
const vconfig vcfg
 
bool use_flat_tod_
 
std::vector< unit_filtercond_children_
 
std::vector< conditional::TYPE > cond_child_types_
 

Detailed Description

The basic unit filter gives a generic implementation of the match fcn.

Definition at line 127 of file filter.cpp.

Constructor & Destructor Documentation

basic_unit_filter_impl::basic_unit_filter_impl ( const vconfig vcfg,
const filter_context fc,
bool  flat_tod 
)
inline
virtual basic_unit_filter_impl::~basic_unit_filter_impl ( )
inlinevirtual

Definition at line 179 of file filter.cpp.

Member Function Documentation

std::vector< const unit * > basic_unit_filter_impl::all_matches_on_map ( unsigned  max_matches) const
virtual
unit_const_ptr basic_unit_filter_impl::first_match_on_map ( ) const
virtual
bool basic_unit_filter_impl::internal_matches_filter ( const unit u,
const map_location loc,
const unit u2 
) const
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().

bool basic_unit_filter_impl::matches ( const unit u,
const map_location loc,
const unit u2 
) const
virtual
config basic_unit_filter_impl::to_config ( ) const
inlinevirtual

Implements unit_filter_abstract_impl.

Definition at line 175 of file filter.cpp.

References vconfig::get_config(), and vcfg.

Member Data Documentation

std::vector<conditional::TYPE> basic_unit_filter_impl::cond_child_types_
private

Definition at line 186 of file filter.cpp.

Referenced by basic_unit_filter_impl(), and matches().

std::vector<unit_filter> basic_unit_filter_impl::cond_children_
private

Definition at line 185 of file filter.cpp.

Referenced by basic_unit_filter_impl(), and matches().

const filter_context& basic_unit_filter_impl::fc_
private
bool basic_unit_filter_impl::use_flat_tod_
private

Definition at line 183 of file filter.cpp.

Referenced by basic_unit_filter_impl(), and internal_matches_filter().

const vconfig basic_unit_filter_impl::vcfg
private

Definition at line 182 of file filter.cpp.

Referenced by internal_matches_filter(), and to_config().


The documentation for this class was generated from the following file: