SaltAPI  1.1
An API for the HTTPd / Zia by Salty Studio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ICore.hpp
Go to the documentation of this file.
1 //
2 // Created by wery_a on 07/01/17.
3 //
4 
5 #ifndef API_V2_ICORE_HPP
6 #define API_V2_ICORE_HPP
7 
8 #include <vector>
9 #include "IModule.hpp"
10 
11 class IModuleLoader;
12 class IConfig;
13 
14 namespace Module {
15 
19  class ICore {
20  public:
27  virtual bool Run(std::vector<std::string> const &opts, IModuleLoader *moduleLoader) = 0;
28 
33  virtual IConfig const &GetConfig() const = 0;
34 
35  public:
41  virtual IModule *Get(std::string const &name) const = 0;
42 
48  virtual IModule *Get(IModule::Type type) const = 0;
49  };
50 }
51 #endif //API_V2_ICORE_HPP
virtual bool Run(std::vector< std::string > const &opts, IModuleLoader *moduleLoader)=0
virtual IConfig const & GetConfig() const =0
virtual IModule * Get(std::string const &name) const =0
Get the module by name from the list in ModuleLoader.
This class is for the config It's use to store a pointer of the config in the Core You have to dynami...