This structure can be used for matching terrain strings. More...
#include <translation.hpp>
Public Member Functions | |
ter_match () | |
ter_match (std::string_view str, const ter_layer filler=NO_LAYER) | |
ter_match (const terrain_code &tcode) | |
Public Attributes | |
ter_list | terrain |
ter_list | mask |
ter_list | masked_terrain |
bool | has_wildcard |
bool | is_empty |
This structure can be used for matching terrain strings.
It optimized for strings that need to be matched often, and caches the wildcard info required for matching.
Definition at line 104 of file translation.hpp.
t_translation::ter_match::ter_match | ( | ) |
Definition at line 168 of file translation.cpp.
Definition at line 176 of file translation.cpp.
References t_translation::get_mask_(), i, mask, and masked_terrain.
t_translation::ter_match::ter_match | ( | const terrain_code & | tcode | ) |
Definition at line 193 of file translation.cpp.
References t_translation::get_mask_(), i, mask, and masked_terrain.
bool t_translation::ter_match::has_wildcard |
Definition at line 112 of file translation.hpp.
Referenced by t_translation::has_wildcard(), and t_translation::terrain_matches().
bool t_translation::ter_match::is_empty |
Definition at line 113 of file translation.hpp.
Referenced by t_translation::terrain_matches(), and terrain_builder::terrain_matches().
ter_list t_translation::ter_match::mask |
Definition at line 110 of file translation.hpp.
Referenced by ter_match(), and t_translation::terrain_matches().
ter_list t_translation::ter_match::masked_terrain |
Definition at line 111 of file translation.hpp.
Referenced by ter_match(), and t_translation::terrain_matches().
ter_list t_translation::ter_match::terrain |
Definition at line 109 of file translation.hpp.
Referenced by terrain_builder::add_constraints(), and t_translation::terrain_matches().