aboutsummaryrefslogtreecommitdiff
path: root/src/ContentManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ContentManager.hpp')
-rw-r--r--src/ContentManager.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ContentManager.hpp b/src/ContentManager.hpp
index 75b9173..033be59 100644
--- a/src/ContentManager.hpp
+++ b/src/ContentManager.hpp
@@ -3,17 +3,24 @@
#include "Content.hpp"
-#include <map>
+#include <memory>
+#include <unordered_map>
+
+typedef std::unordered_map<std::string, std::shared_ptr<Content>> ContentModules;
class ContentManager {
public:
ContentManager() {}
- ~ContentManager() {}
+ ~ContentManager() { ShutdownAll(); }
- bool Register(Content const & ctnt);
+ bool RegisterModule(std::shared_ptr<Content> ctnt);
+ bool InitAll(void);
+ void ShutdownAll(void);
+ bool Render(std::string & basePath);
+ ContentModules const & GetAllModules() const;
private:
- std::map<std::string, Content const &> m_ContentModules;
+ ContentModules m_ContentModules;
};
#endif