15 #ifndef TERRAIN_FILTER_H_INCLUDED
16 #define TERRAIN_FILTER_H_INCLUDED
30 #include <boost/scoped_ptr.hpp>
58 void get_locations(std::set<map_location>& locs,
bool with_border=
false)
const;
virtual bool operator()(const map_location &loc) const
std::vector< std::set< map_location > > * adjacent_matches
terrain_filter_cache cache_
bool match(const map_location &loc) const
const filter_context * fc_
t_translation::t_match * parsed_terrain
This class stores all the data for a single 'side' (in game nomenclature).
This structure can be used for matching terrain strings.
const size_t max_loop
The maximum number of hexes on a map and items in an array and also used as maximum in wml loops...
void flatten(const bool flat_tod=true)
~terrain_filter()
Default implementation, but defined out-of-line for efficiency reasons.
Encapsulates the map of the game.
void restrict_size(const size_t max_loop)
void get_locations(std::set< map_location > &locs, bool with_border=false) const
terrain_filter & operator=(const terrain_filter &other)
A variable-expanding proxy for the config class.
boost::scoped_ptr< unit_filter > ufilter_
std::vector< std::pair< terrain_filter, std::map< map_location, bool > > > adjacent_match_cache
Container associating units to locations.
terrain_filter(const vconfig &cfg, const filter_context *fc, const bool flat_tod=false, const size_t max_loop=game_config::max_loop)
bool match_internal(const map_location &loc, const bool ignore_xy) const
A config object defines a single node in a WML file, with access to child nodes.