![]() |
Blamite Game Engine - Strings
00386.06.16.23.0646.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Namespace containing functions for Blamite string resources. More...
Functions | |
STRINGS_API bool | LoadCommonStrings (std::string base_dir) |
Loads the string tables editor_strings , error_strings , shared_strings , and config_strings . More... | |
STRINGS_API bool | LoadStrings (std::string file_path) |
Loads all strings in the given file into the universal string list. More... | |
STRINGS_API bool | LoadErrorStrings (std::string file_path) |
Loads all strings in the given file as error description strings. More... | |
STRINGS_API std::string | LookupString (std::string id) |
Finds a string with a given ID. More... | |
STRINGS_API std::string | LookupErrorString (int error_code) |
Finds a string message associated with a given error code. More... | |
STRINGS_API std::map< std::string, BlamEngineString > * | GetUniversalStrings () |
Retrieves the list of all loaded strings. More... | |
STRINGS_API std::map< int, BlamEngineString * > * | GetErrorStrings () |
Retrieves the list of all loaded error code strings. More... | |
STRINGS_API bool | StringExists (std::string id) |
Looks through the list of loaded engine strings to see if a given string has been loaded. More... | |
STRINGS_API bool | ErrorStringExists (int error_code) |
Looks through the list of loaded error strings to see if a given error string has been loaded. More... | |
Namespace containing functions for Blamite string resources.
bool BlamStrings::Resources::Strings::ErrorStringExists | ( | int | error_code | ) |
Looks through the list of loaded error strings to see if a given error string has been loaded.
id | - The error code to look for. |
true
if the string exists, otherwise returns false
. std::map< int, BlamEngineString * > * BlamStrings::Resources::Strings::GetErrorStrings | ( | ) |
Retrieves the list of all loaded error code strings.
std::map< std::string, BlamEngineString > * BlamStrings::Resources::Strings::GetUniversalStrings | ( | ) |
Retrieves the list of all loaded strings.
bool BlamStrings::Resources::Strings::LoadCommonStrings | ( | std::string | base_dir | ) |
Loads the string tables editor_strings
, error_strings
, shared_strings
, and config_strings
.
base_dir | - The base directory containing the 3 string tables. Should generally be ./data/ . |
true
if all string tables were loaded without error, otherwise returns false
. bool BlamStrings::Resources::Strings::LoadErrorStrings | ( | std::string | file_path | ) |
Loads all strings in the given file as error description strings.
file_path | - The file to parse strings from. |
true
if all strings were loaded successfully, otherwise returns false
. bool BlamStrings::Resources::Strings::LoadStrings | ( | std::string | file_path | ) |
Loads all strings in the given file into the universal string list.
file_path | - The file to parse strings from. |
true
if all strings were loaded successfully, otherwise returns false
. std::string BlamStrings::Resources::Strings::LookupErrorString | ( | int | error_code | ) |
Finds a string message associated with a given error code.
If no matching string is found, then a fallback string is used instead.
error_code | - The error code to look up. |
std::string BlamStrings::Resources::Strings::LookupString | ( | std::string | id | ) |
Finds a string with a given ID.
id | - The ID of the desired string. |
bool BlamStrings::Resources::Strings::StringExists | ( | std::string | id | ) |
Looks through the list of loaded engine strings to see if a given string has been loaded.
id | - The string ID to look for. |
true
if the string exists, otherwise returns false
.