GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XmlScreenLoader.hpp
Go to the documentation of this file.
1 #ifndef RADIX_XML_SCREEN_LOADER_HPP
2 #define RADIX_XML_SCREEN_LOADER_HPP
3 
4 #include <memory>
5 #include <map>
6 #include <tinyxml2.h>
7 
10 #include <radix/data/text/Text.hpp>
11 
12 namespace radix {
13 
14 class XmlScreenLoader : public XmlLoader {
15 public:
16  static Screen& getScreen(const std::string& path);
17 private:
18  static std::map<std::string, std::shared_ptr<Screen>> screenCache;
19  static std::shared_ptr<Screen> loadScreen(const std::string& path);
20  static const std::string MODULE_NAME;
21  static bool loadText(tinyxml2::XMLHandle &rootHandle, std::vector<Text>* text);
22 };
23 
24 } /* namespace radix */
25 
26 #endif /* RADIX_XML_SCREEN_LOADER_HPP */
Definition: GameController.hpp:7
static std::map< std::string, std::shared_ptr< Screen > > screenCache
Definition: XmlScreenLoader.hpp:18
Definition: XmlScreenLoader.hpp:14
Definition: Screen.hpp:11
static const std::string MODULE_NAME
Definition: XmlScreenLoader.hpp:20
static std::shared_ptr< Screen > loadScreen(const std::string &path)
Definition: XmlScreenLoader.cpp:22
static Screen & getScreen(const std::string &path)
Definition: XmlScreenLoader.cpp:11
Definition: XmlLoader.hpp:8
static bool loadText(tinyxml2::XMLHandle &rootHandle, std::vector< Text > *text)
Definition: XmlScreenLoader.cpp:51