-public:
- STORE_LOADER(const SETTINGS & settings);
- ~STORE_LOADER();
-
- bool Load();
- bool Unload();
-
- BASE_STORE * GetStore() { return plugin; };
-
- const std::string & GetStrError() const { return errorStr; };
-private:
- bool isLoaded;
- void * handle;
- BASE_STORE * plugin;
- std::string errorStr;
- MODULE_SETTINGS storeSettings;
- std::string pluginFileName;
+
+struct Store;
+class SettingsImpl;
+
+class StoreLoader {
+ public:
+ explicit StoreLoader(const SettingsImpl& settings) noexcept;
+ ~StoreLoader();
+
+ StoreLoader(const StoreLoader&) = delete;
+ StoreLoader& operator=(const StoreLoader&) = delete;
+
+ bool load() noexcept;
+ bool unload() noexcept;
+
+ Store& get() noexcept { return *plugin; }
+
+ const std::string& GetStrError() const noexcept { return errorStr; }
+
+ private:
+ bool isLoaded;
+ void* handle;
+ Store* plugin;
+ std::string errorStr;
+ ModuleSettings storeSettings;
+ std::string pluginFileName;