diff options
Diffstat (limited to 'src/common/console.cc')
-rw-r--r-- | src/common/console.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/common/console.cc b/src/common/console.cc index 7641865..e4fd215 100644 --- a/src/common/console.cc +++ b/src/common/console.cc @@ -1,14 +1,28 @@ /* common/console.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 */ -#include "console.h" +#include "common/console.h" + +// TODO enforce singleton namespace common { - - Console *Console::instance = 0; + +Console *Console::console_instance = 0; + +Console::Console() { + console_instance = this; +} + +Console::~Console() { + console_instance = 0; +} + +Console *Console::instance() { + return console_instance; +} } // namespace common |