Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
engine_text.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <map>
5 #include <Strings/components/resources/strings/strings.h>
6 
7 #define ENGINE_TEXT(string_id) Blam::EngineText::LookupString(string_id)
8 
9 #define GAME_ENGINE_TEXT_FILE "game_engine_text.xml"
10 
11 #ifndef BLAM
12 #define BLAM
13 #endif
14 
15 namespace Blam
16 {
27  namespace EngineText
28  {
35 
43  BLAM std::string LookupString(std::string id);
44 
53  BLAM std::string LookupErrorString(int error_code);
54 
60  BLAM std::map<std::string, BlamEngineString>* GetEngineStrings();
61 
67  BLAM std::map<int, BlamEngineString*>* GetErrorStrings();
68 
76  BLAM bool StringExists(std::string id);
77  }
78 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:18
BLAM
#define BLAM
Definition: engine_text.h:12
Blam::EngineText::LookupString
BLAM std::string LookupString(std::string id)
Finds a string with a given ID.
Definition: engine_text.cpp:51
Blam::EngineText::GetErrorStrings
BLAM std::map< int, BlamEngineString * > * GetErrorStrings()
Retrieves the list of all loaded error code strings.
Definition: engine_text.cpp:80
Blam::EngineText::StringExists
BLAM bool StringExists(std::string id)
Looks through the list of loaded engine strings to see if a given string has been loaded.
Definition: engine_text.cpp:85
Blam::EngineText::GetEngineStrings
BLAM std::map< std::string, BlamEngineString > * GetEngineStrings()
Retrieves the list of all loaded engine strings.
Definition: engine_text.cpp:75
Blam::EngineText::LoadGameEngineStrings
BLAM bool LoadGameEngineStrings()
Loads all strings from the default game engine text file.
Definition: engine_text.cpp:23
Blam::EngineText::LookupErrorString
BLAM std::string LookupErrorString(int error_code)
Finds a string message associated with a given error code.
Definition: engine_text.cpp:63