Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-18 17:52:15 +0000
committerStijn Buys <ingar@osirion.org>2008-02-18 17:52:15 +0000
commit0b8582a9aa825024edbd0a21c6287bfcccec28de (patch)
tree2d9a46c60b028300b1b9133b84764b6c39964c33 /src/core/module.cc
parent982562fa19bb87a3dab352e562f386f61c171b7b (diff)
core redesign, part II
Diffstat (limited to 'src/core/module.cc')
-rw-r--r--src/core/module.cc41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/core/module.cc b/src/core/module.cc
new file mode 100644
index 0000000..45559f2
--- /dev/null
+++ b/src/core/module.cc
@@ -0,0 +1,41 @@
+/*
+ core/module.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "core/module.h"
+
+namespace core
+{
+
+Module *Module::module_preload;
+
+Module::Module(const char *name)
+{
+ module_running = false;
+ module_name.assign(name);
+ module_preload = 0;
+}
+
+Module::~Module()
+{
+ module_running = false;
+ module_name.clear();
+}
+
+
+void Module::load(Module *module)
+{
+ module_preload = module;
+}
+
+void Module::unload()
+{
+ if (module_preload) {
+ delete module_preload;
+ module_preload = 0;
+ }
+}
+
+}