diff options
Diffstat (limited to 'src/ContentManager.hpp')
-rw-r--r-- | src/ContentManager.hpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/ContentManager.hpp b/src/ContentManager.hpp index 033be59..83f4bc9 100644 --- a/src/ContentManager.hpp +++ b/src/ContentManager.hpp @@ -2,25 +2,37 @@ #define CONTENTMANAGER_H 1 #include "Content.hpp" +#include "Filesystem.hpp" +#include "TemplateManager.hpp" #include <memory> #include <unordered_map> -typedef std::unordered_map<std::string, std::shared_ptr<Content>> ContentModules; +using ContentModules = std::unordered_map<std::string, std::shared_ptr<Content> >; -class ContentManager { +class ContentManager +{ public: - ContentManager() {} - ~ContentManager() { ShutdownAll(); } + 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; + void SetStaticFilesystem(std::shared_ptr<Filesystem> & static_fs); + void SetTemplateSystem(std::shared_ptr<TemplateManager> & tmgr); + bool RegisterModule(std::shared_ptr<Content> ctnt); + bool InitAll(void); + void ShutdownAll(void); + bool Render(char const * basePath, RequestResponse & rr, std::string & out); + ContentModules const & GetAllModules() const; private: - ContentModules m_ContentModules; + std::shared_ptr<Filesystem> m_StaticFilesystem; + std::shared_ptr<TemplateManager> m_TemplateManager; + ContentModules m_ContentModules; }; #endif |