Elaztek Developer Hub
Blamite Game Engine - Strings  00344.11.30.21.1210.blamite
A library containing general purpose utilities and classes for use in multiple projects.
Functions | Variables
strings.cpp File Reference
#include "strings.h"
#include <fstream>
#include <regex>
#include "components/3rdparty/rapidxml/rapidxml.hpp"
#include "components/utils/converters/converters.h"
#include "components/utils/io/io.h"
#include "components/utils/res/res.h"
#include "components/utils/string/string.h"
#include "components/logger/logger.h"

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