wavelength 1.0.0
Loading...
Searching...
No Matches
LocalizeErrors Class Reference

Record of text tokens that went without a localisation, kept for the report at the end of a load. More...

#include <localizeerrors.h>

Classes

struct  SingleError
 One token of a record. More...

Public Types

enum  Type { kTypeMissing = 0 , kTypeUnused = 1 }
 What a record lists, the values of mType. More...

Public Member Functions

 LocalizeErrors (const char *pszFile)
 Construct an empty record of a file's missing tokens.
 LocalizeErrors (int nType)
 Construct an empty record with no file.
 LocalizeErrors (const LocalizeErrors &other)=default
 Copy another record.
void Store ()
 Keep a copy of the record for the report.
const String & GetFile () const
int GetType () const
std::list< SingleError > & GetErrors ()
const std::list< SingleError > & GetErrors () const

Static Public Member Functions

static void CountToken (const char *pszToken, int nCount)
 Add to the number of times a token was used.
static void CountLocaleTokens ()
 Enter every token of the locale in the counts, with no uses added.
static std::list< LocalizeErrors > * GetRecords ()
static std::map< String, int > * GetTokenCounts ()
static void ClearRecords ()
 Delete the records Store() retained.
static void ClearTokenCounts ()
 Delete the counts of the uses of each token.

Detailed Description

Record of text tokens that went without a localisation, kept for the report at the end of a load.

The RTTI includes the class name through the lists that store it. The object is 0x20 bytes. UIPanel::LocalizeTexts() records the tokens of a panel's file that the locale lacks, and UIManager::ReportLocalizeErrors() records the locale's tokens no loaded object used. Store() keeps a copy until the report. The edit mode of the ui configuration turns the token counts on.

Member Enumeration Documentation

◆ Type

What a record lists, the values of mType.

Enumerator
kTypeMissing 

Tokens of a file that the locale lacks.

kTypeUnused 

Tokens of the locale that no loaded object used.

Constructor & Destructor Documentation

◆ LocalizeErrors() [1/3]

LocalizeErrors::LocalizeErrors ( const char * pszFile)
inlineexplicit

Construct an empty record of a file's missing tokens.

Inline. UIPanel::LocalizeTexts() expands it.

Parameters
pszFileThe file.

◆ LocalizeErrors() [2/3]

LocalizeErrors::LocalizeErrors ( int nType)
inlineexplicit

Construct an empty record with no file.

Inline. UIManager::ReportLocalizeErrors() expands it.

Parameters
nTypeOne of Type.

◆ LocalizeErrors() [3/3]

LocalizeErrors::LocalizeErrors ( const LocalizeErrors & other)
default

Copy another record.

Parameters
otherThe record.
Ghidra address:
NTSC-U/C: 0x003786b8
Ghidra address:
PAL: 0x003e6de8

Member Function Documentation

◆ Store()

void LocalizeErrors::Store ( )

Keep a copy of the record for the report.

Ghidra address:
NTSC-U/C: 0x00209978
Ghidra address:
PAL: 0x00212778

◆ CountToken()

void LocalizeErrors::CountToken ( const char * pszToken,
int nCount )
static

Add to the number of times a token was used.

Parameters
pszTokenThe token.
nCountThe number to add.
Ghidra address:
NTSC-U/C: 0x00209a80
Ghidra address:
PAL: 0x00212880

◆ CountLocaleTokens()

void LocalizeErrors::CountLocaleTokens ( )
static

Enter every token of the locale in the counts, with no uses added.

Ghidra address:
NTSC-U/C: 0x00209c30
Ghidra address:
PAL: 0x00212a30

◆ GetFile()

const String & LocalizeErrors::GetFile ( ) const
inline
Returns
The file the tokens came from, or empty.

◆ GetType()

int LocalizeErrors::GetType ( ) const
inline
Returns
One of Type.

◆ GetErrors() [1/2]

std::list< SingleError > & LocalizeErrors::GetErrors ( )
inline
Returns
The tokens.

◆ GetErrors() [2/2]

const std::list< SingleError > & LocalizeErrors::GetErrors ( ) const
inline
Returns
The tokens.

◆ GetRecords()

std::list< LocalizeErrors > * LocalizeErrors::GetRecords ( )
inlinestatic
Returns
The records Store() retained, or null before the first Store().

◆ GetTokenCounts()

std::map< String, int > * LocalizeErrors::GetTokenCounts ( )
inlinestatic
Returns
The number of uses of each token, or null before the first CountToken().

◆ ClearRecords()

void LocalizeErrors::ClearRecords ( )
inlinestatic

Delete the records Store() retained.

◆ ClearTokenCounts()

void LocalizeErrors::ClearTokenCounts ( )
inlinestatic

Delete the counts of the uses of each token.


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