aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/common/subsystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/common/subsystem.h')
-rw-r--r--src/libjin/common/subsystem.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/libjin/common/subsystem.h b/src/libjin/common/subsystem.h
new file mode 100644
index 0000000..a6c5099
--- /dev/null
+++ b/src/libjin/common/subsystem.h
@@ -0,0 +1,33 @@
+#ifndef __JIN_COMMON_SUBSYSTEM_H
+#define __JIN_COMMON_SUBSYSTEM_H
+
+#include "../utils/macros.h"
+
+namespace jin
+{
+namespace common
+{
+
+ class Subsystem
+ {
+ public:
+
+ struct Setting {};
+
+ bool init(const Setting* setting)
+ {
+ static bool result = _init(setting);
+ return result;
+ }
+
+ typedef Subsystem::Setting SettingBase;
+
+ private:
+
+ virtual onlyonce bool _init(const Setting* setting) = 0;
+ };
+
+}
+}
+
+#endif \ No newline at end of file