From 69f7ffa70863bef2be4cae08c466b5d97a627277 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 30 Jan 2008 17:34:35 +0000 Subject: accomodate the new modules --- src/common/console.cc | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/common/console.cc') 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 -- cgit v1.2.3