The Battle for Wesnoth  1.19.18+dev
Public Member Functions | Public Attributes | List of all members
t_translation::ter_match Struct Reference

This structure can be used for matching terrain strings. More...

#include <translation.hpp>

Public Member Functions

 ter_match ()=default
 
 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 = false
 
bool is_empty = true
 

Detailed Description

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 98 of file translation.hpp.

Constructor & Destructor Documentation

◆ ter_match() [1/3]

t_translation::ter_match::ter_match ( )
default

◆ ter_match() [2/3]

t_translation::ter_match::ter_match ( std::string_view  str,
const ter_layer  filler = NO_LAYER 
)

Definition at line 164 of file translation.cpp.

References t_translation::get_mask_(), i, mask, masked_terrain, and terrain.

◆ ter_match() [3/3]

t_translation::ter_match::ter_match ( const terrain_code tcode)

Definition at line 180 of file translation.cpp.

References t_translation::get_mask_(), i, mask, masked_terrain, and terrain.

Member Data Documentation

◆ has_wildcard

bool t_translation::ter_match::has_wildcard = false

Definition at line 106 of file translation.hpp.

Referenced by t_translation::terrain_matches().

◆ is_empty

bool t_translation::ter_match::is_empty = true

◆ mask

ter_list t_translation::ter_match::mask

Definition at line 104 of file translation.hpp.

Referenced by ter_match(), and t_translation::terrain_matches().

◆ masked_terrain

ter_list t_translation::ter_match::masked_terrain

Definition at line 105 of file translation.hpp.

Referenced by ter_match(), and t_translation::terrain_matches().

◆ terrain

ter_list t_translation::ter_match::terrain

Definition at line 103 of file translation.hpp.

Referenced by ter_match(), and t_translation::terrain_matches().


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