SaltAPI  1.1
An API for the HTTPd / Zia by Salty Studio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AModuleLoader.hpp
Go to the documentation of this file.
1 //
2 // Created by wery_a on 07/01/17.
3 //
4 
5 #ifndef API_V2_AMODULELOADER_HPP
6 #define API_V2_AMODULELOADER_HPP
7 
8 #include <map>
9 #include "IModuleLoader.hpp"
10 
11 class AModuleLoader : public IModuleLoader {
12 public:
13  AModuleLoader();
14 
15  virtual ~AModuleLoader();
16 
17 protected:
18  std::map<std::string, Module::IModule *> m_modules;
19 
20 public:
21  Module::IModule *Load(std::string const &path) override;
22 
23  bool Unload(Module::IModule *module) override;
24 
25  bool IsLoaded(std::string const &name) const override;
26 
27  bool IsLoaded(Module::IModule::Type type) const override;
28 };
29 
30 #endif //API_V2_AMODULELOADER_HPP
std::map< std::string, Module::IModule * > m_modules
bool IsLoaded(std::string const &name) const override
check if module is loaded by name
virtual ~AModuleLoader()
Module::IModule * Load(std::string const &path) override
load module by path
bool Unload(Module::IModule *module) override
unload module by pointer