terrain_filter Class Reference

#include <terrain_filter.hpp>

Inheritance diagram for terrain_filter:

Inheritance graph
[legend]
Collaboration diagram for terrain_filter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 terrain_filter (const vconfig &cfg, const gamemap &map, const gamestatus &game_status, const unit_map &units, const bool flat_tod=false, const size_t max_loop=MAX_MAP_AREA)
 terrain_filter (const vconfig &cfg, const terrain_filter &original)
 ~terrain_filter ()
 terrain_filter (const terrain_filter &other)
terrain_filteroperator= (const terrain_filter &other)
bool match (const gamemap::location &loc)
virtual bool operator() (const gamemap::location &loc)
void get_locations (std::set< gamemap::location > &locs)
void restrict (const size_t max_loop)
void flatten (const bool flat_tod=true)

Private Member Functions

bool match_internal (const gamemap::location &loc, const bool ignore_xy)

Private Attributes

const vconfigcfg_
const gamemapmap_
const gamestatusstatus_
const unit_mapunits_
terrain_filter_cache cache_
size_t max_loop_
bool flat_

Classes

struct  terrain_filter_cache


Detailed Description

Definition at line 28 of file terrain_filter.hpp.


Constructor & Destructor Documentation

terrain_filter::terrain_filter ( const vconfig cfg,
const gamemap map,
const gamestatus game_status,
const unit_map units,
const bool  flat_tod = false,
const size_t  max_loop = MAX_MAP_AREA 
)

Definition at line 36 of file terrain_filter.cpp.

References flatten(), and restrict().

Referenced by get_locations(), match(), match_internal(), and operator=().

terrain_filter::terrain_filter ( const vconfig cfg,
const terrain_filter original 
)

Definition at line 44 of file terrain_filter.cpp.

References flat_, flatten(), max_loop_, and restrict().

terrain_filter::~terrain_filter (  )  [inline]

Definition at line 33 of file terrain_filter.hpp.

Referenced by operator=().

terrain_filter::terrain_filter ( const terrain_filter other  ) 

Definition at line 51 of file terrain_filter.cpp.

References flat_, flatten(), max_loop_, and restrict().


Member Function Documentation

terrain_filter & terrain_filter::operator= ( const terrain_filter other  ) 

Definition at line 63 of file terrain_filter.cpp.

References terrain_filter(), and ~terrain_filter().

bool terrain_filter::match ( const gamemap::location loc  ) 

virtual bool terrain_filter::operator() ( const gamemap::location loc  )  [inline, virtual]

Implements xy_pred.

Definition at line 40 of file terrain_filter.hpp.

References match().

void terrain_filter::get_locations ( std::set< gamemap::location > &  locs  ) 

void terrain_filter::restrict ( const size_t  max_loop  )  [inline]

Definition at line 49 of file terrain_filter.hpp.

References max_loop_.

Referenced by terrain_filter().

void terrain_filter::flatten ( const bool  flat_tod = true  )  [inline]

Definition at line 52 of file terrain_filter.hpp.

References flat_.

Referenced by unit::ability_active(), and terrain_filter().

bool terrain_filter::match_internal ( const gamemap::location loc,
const bool  ignore_xy 
) [private]


Member Data Documentation

const vconfig& terrain_filter::cfg_ [private]

Definition at line 57 of file terrain_filter.hpp.

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

const gamemap& terrain_filter::map_ [private]

Definition at line 58 of file terrain_filter.hpp.

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

Definition at line 59 of file terrain_filter.hpp.

Referenced by match_internal().

const unit_map& terrain_filter::units_ [private]

Definition at line 60 of file terrain_filter.hpp.

Referenced by match_internal().

Definition at line 79 of file terrain_filter.hpp.

Referenced by get_locations(), and match_internal().

size_t terrain_filter::max_loop_ [private]

Definition at line 80 of file terrain_filter.hpp.

Referenced by get_locations(), match(), restrict(), and terrain_filter().

bool terrain_filter::flat_ [private]

Definition at line 81 of file terrain_filter.hpp.

Referenced by flatten(), match_internal(), and terrain_filter().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs