This class is used to store and provide international texts.
More...
#include <GUILocalisationTable.h>
This class is used to store and provide international texts.
◆ CGUILocalisationTable()
CGUILocalisationTable::CGUILocalisationTable |
( |
| ) |
|
◆ ~CGUILocalisationTable()
CGUILocalisationTable::~CGUILocalisationTable |
( |
| ) |
|
◆ AddDynamicText()
TextResource_t CGUILocalisationTable::AddDynamicText |
( |
const eC_String & |
kNewText | ) |
|
Adds new Text and returns a new ID.
- Parameters
-
kNewText | The text string we want to register to localisation table. |
- Returns
- New TextResource ID.
- Exceptions
-
CGUIException | When localisation string storage was unable to hold new text string. |
◆ FreeDynamicText()
void CGUILocalisationTable::FreeDynamicText |
( |
const TextResource_t |
eID | ) |
|
Frees a TextID which is no longer needed.
- Parameters
-
eID | ID of the text to free. |
- Exceptions
-
◆ GetDummyText()
const eC_String * CGUILocalisationTable::GetDummyText |
( |
| ) |
const |
Gets the dummy text
- Returns
- The string of the dummy text
◆ GetNOFLocalisationTexts()
eC_UInt CGUILocalisationTable::GetNOFLocalisationTexts |
( |
| ) |
const |
Returns the total number of localisation texts.
- Returns
- Number of localisation texts.
◆ GetNOFReadTextResources()
eC_UInt CGUILocalisationTable::GetNOFReadTextResources |
( |
| ) |
const |
Get number of read text resources by last file operation.
- Returns
- Number of text lines read.
◆ GetText()
const eC_String * CGUILocalisationTable::GetText |
( |
const TextResource_t & |
eTextResourcesIdx | ) |
const |
Retrieves a text from the internal text table.
- Parameters
-
eTextResourcesIdx | Index of text to retrieve. |
- Returns
- Constant pointer to the corresponding text string. If eTextResourcesIdx is DUMMY_TEXT, a pointer to an empty string is returned. In case of eTextResourcesIdx points to an uninitialized text, NULL is returned.
◆ IsValidID()
eC_Bool CGUILocalisationTable::IsValidID |
( |
const TextResource_t & |
eID | ) |
const |
Checks if TextResource ID is valid.
- Parameters
-
eID | TextResourceID to check. |
- Returns
- True if valid else False.
◆ LoadLocalisationFile()
void CGUILocalisationTable::LoadLocalisationFile |
( |
const eC_String & |
kLangFileName | ) |
|
Loads international text strings from a file to a table.
- Parameters
-
kLangFileName | File to load texts from. |
- Exceptions
-
◆ RegisterTextFragments()
void CGUILocalisationTable::RegisterTextFragments |
( |
const TextResource_t & |
eID, |
|
|
const eC_UInt & |
uiCount |
|
) |
| |
Register text-fragments for a TextResource
- Parameters
-
eID | ID of the TextResource |
uiCount | number of fragments which should be registered |
◆ SetNOFLocalisationTexts()
eC_Bool CGUILocalisationTable::SetNOFLocalisationTexts |
( |
eC_UInt |
uiNOFLocalisationTexts | ) |
|
Sets the total number of texts.
- Parameters
-
uiNOFLocalisationTexts | Number of localisation texts we want to store. |
- Returns
- True if internal storage has been successfully adapted to support the requested number of texts. False otherwise.
◆ SetText()
void CGUILocalisationTable::SetText |
( |
TextResource_t |
eID, |
|
|
const eC_String & |
rkText |
|
) |
| |
Sets (changes) the text for a specific ID.
- Parameters
-
eID | The ID of the text to be changed. |
rkText | The text to be used for the ID. |
- Exceptions
-
◆ SetTextFragment()
void CGUILocalisationTable::SetTextFragment |
( |
const TextResource_t & |
eID, |
|
|
const eC_UInt & |
uiFragmentIndex, |
|
|
const eC_String & |
kText |
|
) |
| |
Set the text for a text-fragment
- Parameters
-
eID | ID of the TextResource |
uiFragmentIndex | index of the fragment |
kText | text to use in placeholder |
◆ UnregisterTextFragments()
void CGUILocalisationTable::UnregisterTextFragments |
( |
const TextResource_t & |
eID | ) |
|
Unregister text-fragments for a TextResource
- Parameters
-
eID | ID of the TextResource |
◆ WriteLocalisationFile()
eC_Bool CGUILocalisationTable::WriteLocalisationFile |
( |
const eC_String & |
kPath | ) |
const |
Writes all registered TextResources of the GUI to File.
- Parameters
-
kPath | Path and name of the destination file. |
- Returns
- Always true.
- Exceptions
-
CGUIException | If destination file could not be opened. Or another unknown error occurred. |
The documentation for this class was generated from the following file: