aboutsummaryrefslogtreecommitdiff
path: root/src/ContentManager.hpp
blob: 033be597237a994777f3f12f6959da53a5a0013c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef CONTENTMANAGER_H
#define CONTENTMANAGER_H 1

#include "Content.hpp"

#include <memory>
#include <unordered_map>

typedef std::unordered_map<std::string, std::shared_ptr<Content>> ContentModules;

class ContentManager {
public:
  ContentManager() {}
  ~ContentManager() { ShutdownAll(); }

  bool RegisterModule(std::shared_ptr<Content> ctnt);
  bool InitAll(void);
  void ShutdownAll(void);
  bool Render(std::string & basePath);
  ContentModules const & GetAllModules() const;

private:
  ContentModules m_ContentModules;
};

#endif