Elaztek Developer Hub
Blamite Game Engine - Strings  00381.04.17.23.2324.blamite
A library containing general purpose utilities and classes for use in multiple projects.
strings.cpp File Reference

Functions

BlamEngineString ParseString (rapidxml::xml_node<> *string_node)
 Parses an XML node into a BlamEngineString. More...
 
std::vector< BlamEngineStringLoadStringListFromFile (std::string file_path)
 Parses a list of strings from a file. More...
 

Variables

std::map< std::string, BlamEngineStringuniversal_string_list
 
std::map< int, BlamEngineString * > error_strings
 Map containing a list of all error strings. More...
 

Function Documentation

◆ LoadStringListFromFile()

std::vector<BlamEngineString> LoadStringListFromFile ( std::string  file_path)

Parses a list of strings from a file.

Note
No validation is performed on these strings. The items returned should be checked for at least an id attribute before adding to the universal string list.
Parameters
file_path- The path to the string table file.
Returns
A list of strings. Any strings that failed to parse are omitted.

◆ ParseString()

BlamEngineString ParseString ( rapidxml::xml_node<> *  string_node)

Parses an XML node into a BlamEngineString.

Parameters
string_node- The XML node to try and parse.
Returns
The parsed string.

Variable Documentation

◆ error_strings

std::map<int, BlamEngineString*> error_strings

Map containing a list of all error strings.

◆ universal_string_list

std::map<std::string, BlamEngineString> universal_string_list