The Battle for Wesnoth  1.13.11+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 ()
 
 ter_match (const std::string &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
 

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

Constructor & Destructor Documentation

t_translation::ter_match::ter_match ( )

Definition at line 161 of file translation.cpp.

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

Definition at line 169 of file translation.cpp.

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

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

Definition at line 186 of file translation.cpp.

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

Member Data Documentation

bool t_translation::ter_match::has_wildcard

Definition at line 115 of file translation.hpp.

Referenced by t_translation::terrain_matches().

bool t_translation::ter_match::is_empty
ter_list t_translation::ter_match::mask

Definition at line 113 of file translation.hpp.

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

ter_list t_translation::ter_match::masked_terrain

Definition at line 114 of file translation.hpp.

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

ter_list t_translation::ter_match::terrain

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