The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
side_filter Class Reference

#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 configget_config () const
 

Private Member Functions

 side_filter (const side_filter &other)
 
side_filteroperator= (const side_filter &other)
 
bool match_internal (const team &t) const
 

Private Attributes

const vconfig cfg_
 
bool flat_
 
std::string side_string_
 
const filter_contextfc_
 The filter context for this filter. More...
 
std::unique_ptr< unit_filterufilter_
 
std::unique_ptr< side_filterallied_filter_
 
std::unique_ptr< side_filterenemy_filter_
 
std::unique_ptr< side_filterhas_ally_filter_
 
std::unique_ptr< side_filterhas_enemy_filter_
 

Detailed Description

Definition at line 29 of file side_filter.hpp.

Constructor & Destructor Documentation

◆ ~side_filter()

side_filter::~side_filter ( )

Definition at line 44 of file side_filter.cpp.

◆ side_filter() [1/3]

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() [2/3]

side_filter::side_filter ( const vconfig cfg,
const filter_context fc,
bool  flat_tod = false 
)

Definition at line 46 of file side_filter.cpp.

◆ side_filter() [3/3]

side_filter::side_filter ( const side_filter other)
private

Member Function Documentation

◆ get_config()

const config& side_filter::get_config ( ) const
inline

Definition at line 41 of file side_filter.hpp.

References cfg_, and vconfig::get_config().

Referenced by game_events::filter_side::serialize().

◆ get_teams()

std::vector< int > side_filter::get_teams ( ) const

◆ match() [1/2]

bool side_filter::match ( const int  side) const

◆ match() [2/2]

bool side_filter::match ( const team t) const

◆ match_internal()

bool side_filter::match_internal ( const team t) const
private

◆ operator=()

side_filter& side_filter::operator= ( const side_filter other)
private

Member Data Documentation

◆ allied_filter_

std::unique_ptr<side_filter> side_filter::allied_filter_
mutableprivate

Definition at line 58 of file side_filter.hpp.

Referenced by match_internal().

◆ cfg_

const vconfig side_filter::cfg_
private

Definition at line 49 of file side_filter.hpp.

Referenced by get_config(), match(), and match_internal().

◆ enemy_filter_

std::unique_ptr<side_filter> side_filter::enemy_filter_
mutableprivate

Definition at line 59 of file side_filter.hpp.

Referenced by match_internal().

◆ fc_

const filter_context* side_filter::fc_
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().

◆ flat_

bool side_filter::flat_
private

Definition at line 51 of file side_filter.hpp.

Referenced by match(), and match_internal().

◆ has_ally_filter_

std::unique_ptr<side_filter> side_filter::has_ally_filter_
mutableprivate

Definition at line 60 of file side_filter.hpp.

Referenced by match_internal().

◆ has_enemy_filter_

std::unique_ptr<side_filter> side_filter::has_enemy_filter_
mutableprivate

Definition at line 61 of file side_filter.hpp.

Referenced by match_internal().

◆ side_string_

std::string side_filter::side_string_
private

Definition at line 52 of file side_filter.hpp.

Referenced by match_internal().

◆ ufilter_

std::unique_ptr<unit_filter> side_filter::ufilter_
mutableprivate

Definition at line 57 of file side_filter.hpp.

Referenced by match_internal().


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