OpenTTD Source 20260917-master-gec444f7315
BaseStringMissingGlyphSearcher Class Referenceabstract

Base for missing glyph searchers that look for missing glyphs in strings. More...

#include <strings_func.h>

Inheritance diagram for BaseStringMissingGlyphSearcher:
MissingGlyphSearcher LanguagePackGlyphSearcher TextfileWindow BaseSetTextfileWindow ContentTextfileWindow GameManualTextfileWindow NewGRFTextfileWindow ScriptTextfileWindow SurveyResultTextfileWindow

Public Member Functions

void DetermineRequiredGlyphs (FontSizes fontsizes) override
 Determine set of glyphs required for the current language.
virtual std::optional< std::string_view > NextString ()=0
 Get the next string to search through.
virtual FontSize DefaultSize ()=0
 Get the default (font) size of the string.
virtual void Reset ()=0
 Reset the search, i.e.
Public Member Functions inherited from MissingGlyphSearcher
virtual ~MissingGlyphSearcher ()=default
 Ensure the destructor of the sub classes are called as well.

Additional Inherited Members

Data Fields inherited from MissingGlyphSearcher
FontSizes missing_fontsizes {}
 Font sizes to actually search for.
std::set< char32_t > missing_glyphs {}
 Glyphs to search for.

Detailed Description

Base for missing glyph searchers that look for missing glyphs in strings.

Definition at line 173 of file strings_func.h.

Member Function Documentation

◆ DefaultSize()

virtual FontSize BaseStringMissingGlyphSearcher::DefaultSize ( )
pure virtual

Get the default (font) size of the string.

Returns
The font size.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

Referenced by DetermineRequiredGlyphs().

◆ DetermineRequiredGlyphs()

void BaseStringMissingGlyphSearcher::DetermineRequiredGlyphs ( FontSizes fontsizes)
overridevirtual

◆ NextString()

virtual std::optional< std::string_view > BaseStringMissingGlyphSearcher::NextString ( )
pure virtual

Get the next string to search through.

Returns
The next string or nullopt if there is none.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

Referenced by DetermineRequiredGlyphs().

◆ Reset()

virtual void BaseStringMissingGlyphSearcher::Reset ( )
pure virtual

Reset the search, i.e.

begin from the beginning again.

Implemented in LanguagePackGlyphSearcher, and TextfileWindow.

Referenced by DetermineRequiredGlyphs().


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