62 void get_locations(std::set<map_location>& locs,
bool with_border=
false)
const {
72 void get_locations(std::set<map_location>& locs,
const unit& ref_unit,
bool with_border=
false)
const {
83 void get_locs_impl(std::set<map_location>& locs,
const unit* ref_unit,
bool with_border)
const;
This class represents a single unit of a specific type.
virtual bool operator()(const map_location &loc) const
std::unique_ptr< t_translation::ter_match > parsed_terrain
terrain_filter_cache cache_
void get_locations(std::set< map_location > &locs, bool with_border=false) const
gets all locations on the map that match this filter
bool match_internal(const map_location &loc, const unit *ref_unit, const bool ignore_xy) const
void get_locs_impl(std::set< map_location > &locs, const unit *ref_unit, bool with_border) const
const filter_context * fc_
bool match(const map_location &loc, const unit &ref_unit) const
void flatten(const bool flat_tod=true)
std::unique_ptr< unit_filter > ufilter_
Encapsulates the map of the game.
terrain_filter & operator=(const terrain_filter &other)
void get_locations(std::set< map_location > &locs, const unit &ref_unit, bool with_border=false) const
gets all locations on the map that match this filter
A variable-expanding proxy for the config class.
static const char * match(MatchState *ms, const char *s, const char *p)
std::vector< std::pair< terrain_filter, std::map< map_location, bool > > > adjacent_match_cache
std::unique_ptr< std::vector< std::set< map_location > > > adjacent_matches
terrain_filter(const vconfig &cfg, const filter_context *fc, const bool flat_tod)
bool match_impl(const map_location &loc, const unit *ref_unit) const
A config object defines a single node in a WML file, with access to child nodes.
const std::size_t max_loop_
bool match(const map_location &loc) const