git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use `time` for message creation time.
[stg.git]
/
projects
/
stargazer
/
store_loader.h
diff --git
a/projects/stargazer/store_loader.h
b/projects/stargazer/store_loader.h
index 5245eb572f8c42f8091edc55657ee0fe30238faa..c187b540670658e63aeda62deed9263bbe4e1744 100644
(file)
--- a/
projects/stargazer/store_loader.h
+++ b/
projects/stargazer/store_loader.h
@@
-18,49
+18,40
@@
* Author : Maxim Mamontov <faust@stargazer.dp.ua>
*/
* Author : Maxim Mamontov <faust@stargazer.dp.ua>
*/
-/*
- $Revision: 1.3 $
- $Date: 2010/03/04 12:24:19 $
- $Author: faust $
- */
+#pragma once
-/*
- * Header file for RAII store plugin loader
- */
-
-#ifndef __STORE_LOADER_H__
-#define __STORE_LOADER_H__
+#include "stg/module_settings.h"
#include <string>
#include <string>
-#include "stg/module_settings.h"
-#include "stg/noncopyable.h"
+namespace STG
+{
-
class STORE
;
-class S
ETTINGS_IMPL
;
+
struct Store
;
+class S
ettingsImpl
;
-class S
TORE_LOADER : private NONCOPYABLE
{
-public:
-
STORE_LOADER(const SETTINGS_IMPL & settings)
;
-
~STORE_LOADER
();
+class S
toreLoader
{
+
public:
+
explicit StoreLoader(const SettingsImpl& settings) noexcept
;
+
~StoreLoader
();
-
bool Load()
;
-
bool Unload()
;
+
StoreLoader(const StoreLoader&) = delete
;
+
StoreLoader& operator=(const StoreLoader&) = delete
;
- STORE & GetStore() { return *plugin; }
+ bool load() noexcept;
+ bool unload() noexcept;
-
const std::string & GetStrError() const { return errorStr
; }
+
Store& get() noexcept { return *plugin
; }
-private:
- STORE_LOADER(const STORE_LOADER & rvalue);
- STORE_LOADER & operator=(const STORE_LOADER & rvalue);
+ const std::string& GetStrError() const noexcept { return errorStr; }
- bool isLoaded;
- void * handle;
- STORE * plugin;
- std::string errorStr;
- MODULE_SETTINGS storeSettings;
- std::string pluginFileName;
+ private:
+ bool isLoaded;
+ void* handle;
+ Store* plugin;
+ std::string errorStr;
+ ModuleSettings storeSettings;
+ std::string pluginFileName;
};
};
-#endif
+}