[Orxonox-commit 1129] r5850 - in code/branches/core5/src: libraries/core libraries/util modules/questsystem modules/questsystem/notifications orxonox orxonox/gamestates orxonox/overlays orxonox/sound
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Oct 1 11:44:54 CEST 2009
Author: rgrieder
Date: 2009-10-01 11:44:53 +0200 (Thu, 01 Oct 2009)
New Revision: 5850
Modified:
code/branches/core5/src/libraries/core/Core.cc
code/branches/core5/src/libraries/core/Core.h
code/branches/core5/src/libraries/util/Scope.h
code/branches/core5/src/libraries/util/ScopedSingleton.h
code/branches/core5/src/modules/questsystem/QuestManager.h
code/branches/core5/src/modules/questsystem/notifications/NotificationManager.h
code/branches/core5/src/orxonox/CameraManager.cc
code/branches/core5/src/orxonox/CameraManager.h
code/branches/core5/src/orxonox/LevelManager.h
code/branches/core5/src/orxonox/PlayerManager.h
code/branches/core5/src/orxonox/gamestates/GSGraphics.cc
code/branches/core5/src/orxonox/gamestates/GSGraphics.h
code/branches/core5/src/orxonox/gamestates/GSLevel.cc
code/branches/core5/src/orxonox/gamestates/GSLevel.h
code/branches/core5/src/orxonox/gamestates/GSRoot.cc
code/branches/core5/src/orxonox/gamestates/GSRoot.h
code/branches/core5/src/orxonox/overlays/InGameConsole.cc
code/branches/core5/src/orxonox/overlays/InGameConsole.h
code/branches/core5/src/orxonox/sound/SoundManager.h
Log:
Moved the singleton creation/destruction mess to the Core class by using just two possible Scopes:
- ScopeID::Root for singletons that may always persists
- ScopeID::Graphics for singletons that only work when graphics was loaded
Modified: code/branches/core5/src/libraries/core/Core.cc
===================================================================
--- code/branches/core5/src/libraries/core/Core.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/libraries/core/Core.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -263,6 +263,9 @@
// create a shell
this->shell_.reset(new Shell());
+
+ // Create singletons that always exist (in other libraries)
+ this->rootScope_.reset(new Scope<ScopeID::Root>());
}
/**
@@ -288,6 +291,9 @@
guiManager_.reset(new GUIManager(graphicsManager_->getRenderWindow(),
inputManager_->getMousePosition(), graphicsManager_->isFullScreen()));
+ // Create singletons associated with graphics (in other libraries)
+ graphicsScope_.reset(new Scope<ScopeID::Graphics>());
+
unloader.Dismiss();
bGraphicsLoaded_ = true;
@@ -295,8 +301,9 @@
void Core::unloadGraphics()
{
- this->guiManager_.reset();;
- this->inputManager_.reset();;
+ this->graphicsScope_.reset();
+ this->guiManager_.reset();
+ this->inputManager_.reset();
this->graphicsManager_.reset();
// Load Ogre::Root again, but without the render system
@@ -419,12 +426,16 @@
void Core::preUpdate(const Clock& time)
{
+ // singletons from other libraries
+ Scope<ScopeID::Root>::update(time);
if (this->bGraphicsLoaded_)
{
// process input events
this->inputManager_->update(time);
// process gui events
this->guiManager_->update(time);
+ // graphics singletons from other libraries
+ Scope<ScopeID::Graphics>::update(time);
}
// process thread commands
this->tclThreadManager_->update(time);
Modified: code/branches/core5/src/libraries/core/Core.h
===================================================================
--- code/branches/core5/src/libraries/core/Core.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/libraries/core/Core.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -35,6 +35,7 @@
#include <cassert>
#include <boost/scoped_ptr.hpp>
#include "util/OutputHandler.h"
+#include "util/Scope.h"
#include "util/ScopeGuard.h"
#include "util/Singleton.h"
@@ -99,6 +100,8 @@
scoped_ptr<GraphicsManager> graphicsManager_; //!< Interface to OGRE
scoped_ptr<InputManager> inputManager_; //!< Interface to OIS
scoped_ptr<GUIManager> guiManager_; //!< Interface to GUI
+ scoped_ptr<Scope<ScopeID::Root> > rootScope_;
+ scoped_ptr<Scope<ScopeID::Graphics> > graphicsScope_;
bool bGraphicsLoaded_;
static Core* singletonPtr_s;
Modified: code/branches/core5/src/libraries/util/Scope.h
===================================================================
--- code/branches/core5/src/libraries/util/Scope.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/libraries/util/Scope.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -30,9 +30,10 @@
#define __Util_Scope_H__
#include "UtilPrereqs.h"
+
#include <cassert>
+#include <map>
#include <set>
-#include <map>
#include "Debug.h"
namespace orxonox
@@ -44,13 +45,14 @@
*/
enum Value
{
- GSRoot,
- GSGraphics,
- GSLevel
+ Root,
+ Graphics
};
}
- class ScopeListener; // Forward declaration
+ // Forward declarations
+ class ScopeListener;
+ class Clock;
/**
@brief The ScopeManager stores the variables of the scope templates in a statically linked context.
@@ -86,6 +88,8 @@
virtual void activated() = 0;
//! Gets called if the scope is deactivated
virtual void deactivated() = 0;
+ //! Gets called if the scope is updated
+ virtual void updated(const Clock& time) = 0;
private:
ScopeID::Value scope_; //!< Store the scope to unregister on destruction
@@ -135,6 +139,16 @@
{
return (ScopeManager::instanceCounts_s[scope] > 0);
}
+
+ //! Update method for the ScopeListeners (to implement singleton updates)
+ static void update(const Clock& time)
+ {
+ if (isActive())
+ {
+ for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )
+ (*(it++))->updated(time);
+ }
+ }
};
}
Modified: code/branches/core5/src/libraries/util/ScopedSingleton.h
===================================================================
--- code/branches/core5/src/libraries/util/ScopedSingleton.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/libraries/util/ScopedSingleton.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -36,6 +36,7 @@
namespace orxonox
{
+ class Clock;
/**
@brief
Base for scoped singleton classes.
@@ -58,12 +59,17 @@
{
assert(Scope<scope>::isActive());
- if (!T::singletonPtr_s && Scope<scope>::isActive())
+ if (!T::singletonPtr_s)
T::singletonPtr_s = new T();
return *T::singletonPtr_s;
}
+ //! Update method for singletons like the ingame console
+ virtual void updated(const Clock& time) { static_cast<T*>(this)->update(time); }
+ //! Empty update method for the static polymorphism
+ void update(const Clock& time) { }
+
protected:
//! Constructor sets the singleton instance pointer
ScopedSingleton() : ScopeListener(scope)
@@ -84,7 +90,7 @@
void activated()
{
// The ScopedSingleton shouldn't be active bevor the scope is activated -> always assertion failed
- assert(T::singletonPtr_s == 0 && false);
+ assert(false);
}
//! Called if the Scope of this Singleton gets deactivated (destroys the instance)
Modified: code/branches/core5/src/modules/questsystem/QuestManager.h
===================================================================
--- code/branches/core5/src/modules/questsystem/QuestManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/modules/questsystem/QuestManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -49,9 +49,6 @@
// tolua_begin
namespace orxonox
{
-
- typedef ScopedSingleton<QuestManager, ScopeID::GSLevel> ScopedSingletonQuestManagerGSLevel; // workaround for tolua
-
/**
@brief
Is a Singleton and manages Quests, by registering every Quest/QuestHint (through registerX()) and making them globally accessable (through findX()).
@@ -59,11 +56,12 @@
@author
Damian 'Mozork' Frick
*/
- class _QuestsystemExport QuestManager : public ScopedSingletonQuestManagerGSLevel, public orxonox::OrxonoxClass
- {
+ class _QuestsystemExport QuestManager
// tolua_end
+ : public ScopedSingleton<QuestManager, ScopeID::Root>, public orxonox::OrxonoxClass
+ { // tolua_export
- friend class ScopedSingleton<QuestManager, ScopeID::GSLevel>;
+ friend class ScopedSingleton<QuestManager, ScopeID::Root>;
friend class QuestGUI;
public:
@@ -71,7 +69,7 @@
virtual ~QuestManager();
//! Returns a reference to the single instance of the Quest Manager.
- static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::GSLevel>::getInstance(); } // tolua_export
+ static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::Root>::getInstance(); } // tolua_export
//! Retreive the main window for the GUI.
CEGUI::Window* getQuestGUI(const std::string & guiName); // tolua_export
Modified: code/branches/core5/src/modules/questsystem/notifications/NotificationManager.h
===================================================================
--- code/branches/core5/src/modules/questsystem/notifications/NotificationManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/modules/questsystem/notifications/NotificationManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -45,7 +45,6 @@
namespace orxonox
{
-
/**
@brief
The Singleton NotificationManager functions as a gateway between Notifications and NotificationListeners.
@@ -53,9 +52,9 @@
@author
Damian 'Mozork' Frick
*/
- class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::GSLevel>, public OrxonoxClass
+ class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::Root>, public OrxonoxClass
{
- friend class ScopedSingleton<NotificationManager, ScopeID::GSLevel>;
+ friend class ScopedSingleton<NotificationManager, ScopeID::Root>;
public:
NotificationManager();
virtual ~NotificationManager();
Modified: code/branches/core5/src/orxonox/CameraManager.cc
===================================================================
--- code/branches/core5/src/orxonox/CameraManager.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/CameraManager.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -33,6 +33,7 @@
#include "util/StringUtils.h"
#include "core/GameMode.h"
+#include "core/GraphicsManager.h"
#include "core/GUIManager.h"
#include "core/ObjectList.h"
#include "tools/Shader.h"
@@ -43,8 +44,8 @@
{
CameraManager* CameraManager::singletonPtr_s = 0;
- CameraManager::CameraManager(Ogre::Viewport* viewport)
- : viewport_(viewport)
+ CameraManager::CameraManager()
+ : viewport_(GraphicsManager::getInstance().getViewport())
{
this->fallbackCamera_ = 0;
}
Modified: code/branches/core5/src/orxonox/CameraManager.h
===================================================================
--- code/branches/core5/src/orxonox/CameraManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/CameraManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -40,16 +40,17 @@
#include <cassert>
#include <list>
#include "util/OgreForwardRefs.h"
-#include "util/Singleton.h"
+#include "util/ScopedSingleton.h"
+#include "core/OrxonoxClass.h"
#include "core/SmartPtr.h"
namespace orxonox
{
- class _OrxonoxExport CameraManager : public Singleton<CameraManager>
+ class _OrxonoxExport CameraManager : public ScopedSingleton<CameraManager, ScopeID::Graphics>, public OrxonoxClass
{
- friend class Singleton<CameraManager>;
+ friend class ScopedSingleton<CameraManager, ScopeID::Graphics>;
public:
- CameraManager(Ogre::Viewport* viewport);
+ CameraManager();
~CameraManager();
Camera* getActiveCamera() const;
Modified: code/branches/core5/src/orxonox/LevelManager.h
===================================================================
--- code/branches/core5/src/orxonox/LevelManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/LevelManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -35,7 +35,7 @@
#include <list>
#include <string>
-#include "util/Singleton.h"
+#include "util/ScopedSingleton.h"
#include "core/OrxonoxClass.h"
// tolua_begin
@@ -43,9 +43,9 @@
{
class _OrxonoxExport LevelManager
// tolua_end
- : public Singleton<LevelManager>, public OrxonoxClass
+ : public ScopedSingleton<LevelManager, ScopeID::Root>, public OrxonoxClass
{ // tolua_export
- friend class Singleton<LevelManager>;
+ friend class ScopedSingleton<LevelManager, ScopeID::Root>;
public:
LevelManager();
virtual ~LevelManager();
@@ -62,7 +62,7 @@
std::string getAvailableLevelListItem(unsigned int index) const; //tolua_export
static LevelManager* getInstancePtr() { return singletonPtr_s; }
- static LevelManager& getInstance() { return Singleton<LevelManager>::getInstance(); } // tolua_export
+ static LevelManager& getInstance() { return ScopedSingleton<LevelManager, ScopeID::Root>::getInstance(); } // tolua_export
private:
LevelManager(const LevelManager&);
Modified: code/branches/core5/src/orxonox/PlayerManager.h
===================================================================
--- code/branches/core5/src/orxonox/PlayerManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/PlayerManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -33,14 +33,14 @@
#include <cassert>
#include <map>
-#include "util/Singleton.h"
+#include "util/ScopedSingleton.h"
#include "network/ClientConnectionListener.h"
namespace orxonox
{
- class _OrxonoxExport PlayerManager : public Singleton<PlayerManager>, public ClientConnectionListener
+ class _OrxonoxExport PlayerManager : public ScopedSingleton<PlayerManager, ScopeID::Root>, public ClientConnectionListener
{
- friend class Singleton<PlayerManager>;
+ friend class ScopedSingleton<PlayerManager, ScopeID::Root>;
public:
PlayerManager();
virtual ~PlayerManager();
Modified: code/branches/core5/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSGraphics.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSGraphics.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -45,8 +45,6 @@
#include "core/input/InputState.h"
#include "core/Loader.h"
#include "core/XMLFile.h"
-#include "overlays/InGameConsole.h"
-#include "sound/SoundManager.h"
// HACK:
#include "overlays/Map.h"
@@ -57,8 +55,6 @@
GSGraphics::GSGraphics(const GameStateInfo& info)
: GameState(info)
- , console_(0)
- , soundManager_(0)
, masterKeyBinder_(0)
, masterInputState_(0)
, debugOverlay_(0)
@@ -99,13 +95,6 @@
masterKeyBinder_->loadBindings("masterKeybindings.ini");
- // Load the SoundManager
- soundManager_ = new SoundManager();
-
- // Load the InGameConsole
- console_ = new InGameConsole();
- console_->initialise();
-
// add console command to toggle GUI
this->ccToggleGUI_ = createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI");
CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_);
@@ -130,13 +119,9 @@
}
*/
- this->console_->destroy();
-
Loader::unload(this->debugOverlay_);
delete this->debugOverlay_;
- this->soundManager_->destroy();
-
// HACK: (destroys a resource smart pointer)
Map::hackDestroyMap();
}
@@ -169,7 +154,5 @@
// Load a user interface therefore
Game::getInstance().requestState("mainMenu");
}
-
- this->console_->update(time);
}
}
Modified: code/branches/core5/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSGraphics.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSGraphics.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -59,10 +59,6 @@
void toggleGUI();
private:
- // managed singletons
- InGameConsole* console_;
- SoundManager* soundManager_; //!< Keeps track of SoundBase objects
-
KeyBinder* masterKeyBinder_; //!< Key binder for master key bindings
InputState* masterInputState_; //!< Special input state for master input
XMLFile* debugOverlay_;
Modified: code/branches/core5/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSLevel.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSLevel.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -40,16 +40,12 @@
#include "core/CoreIncludes.h"
#include "core/Game.h"
#include "core/GameMode.h"
-#include "core/GraphicsManager.h"
#include "core/GUIManager.h"
#include "core/Loader.h"
#include "core/XMLFile.h"
-#include "tools/interfaces/Tickable.h"
-#include "CameraManager.h"
#include "LevelManager.h"
#include "PlayerManager.h"
-#include "infos/HumanPlayer.h"
namespace orxonox
{
@@ -64,7 +60,6 @@
, gameInputState_(0)
, guiMouseOnlyInputState_(0)
, guiKeysOnlyInputState_(0)
- , cameraManager_(0)
{
RegisterObject(GSLevel);
@@ -97,15 +92,8 @@
guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
-
- // create the global CameraManager
- this->cameraManager_ = new CameraManager(GraphicsManager::getInstance().getViewport());
}
- this->playerManager_ = new PlayerManager();
-
- this->scope_GSLevel_ = new Scope<ScopeID::GSLevel>();
-
if (GameMode::isMaster())
{
this->loadLevel();
@@ -125,7 +113,7 @@
InputManager::getInstance().enterState("game");
// connect the HumanPlayer to the game
- this->playerManager_->clientConnected(0);
+ PlayerManager::getInstance().clientConnected(0);
}
}
@@ -164,7 +152,7 @@
if (GameMode::showsGraphics())
{
// disconnect the HumanPlayer
- this->playerManager_->clientDisconnected(0);
+ PlayerManager::getInstance().clientDisconnected(0);
// unload all compositors (this is only necessary because we don't yet destroy all resources!)
Ogre::CompositorManager::getSingleton().removeAll();
@@ -184,24 +172,6 @@
if (GameMode::isMaster())
this->unloadLevel();
- if (this->cameraManager_)
- {
- delete this->cameraManager_;
- this->cameraManager_ = 0;
- }
-
- if (this->playerManager_)
- {
- this->playerManager_->destroy();
- this->playerManager_ = 0;
- }
-
- if (this->scope_GSLevel_)
- {
- delete this->scope_GSLevel_;
- this->scope_GSLevel_ = NULL;
- }
-
if (GameMode::showsGraphics())
{
gameInputState_->setHandler(0);
Modified: code/branches/core5/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSLevel.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSLevel.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -32,7 +32,6 @@
#include "OrxonoxPrereqs.h"
#include <string>
-#include "util/Scope.h"
#include "core/OrxonoxClass.h"
#include "core/GameState.h"
@@ -66,9 +65,6 @@
InputState* gameInputState_; //!< input state for normal ingame playing
InputState* guiMouseOnlyInputState_; //!< input state if we only need the mouse to use the GUI
InputState* guiKeysOnlyInputState_; //!< input state if we only need the keys to use the GUI
- CameraManager* cameraManager_; //!< camera manager for this level
- PlayerManager* playerManager_; //!< player manager for this level
- Scope<ScopeID::GSLevel>* scope_GSLevel_;
//##### ConfigValues #####
std::string keyDetectorCallbackCode_;
Modified: code/branches/core5/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSRoot.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSRoot.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -36,7 +36,6 @@
#include "tools/Timer.h"
#include "tools/interfaces/TimeFactorListener.h"
#include "tools/interfaces/Tickable.h"
-#include "LevelManager.h"
namespace orxonox
{
@@ -69,9 +68,6 @@
// time factor console command
this->ccPause_ = createConsoleCommand(createFunctor(&GSRoot::pause, this), "pause");
CommandExecutor::addConsoleCommandShortcut(this->ccPause_).accessLevel(AccessLevel::Offline);
-
- // create the LevelManager
- this->levelManager_ = new LevelManager();
}
void GSRoot::deactivate()
@@ -89,8 +85,6 @@
this->ccPause_ = 0;
}
*/
-
- this->levelManager_->destroy();
}
void GSRoot::update(const Clock& time)
Modified: code/branches/core5/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/branches/core5/src/orxonox/gamestates/GSRoot.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/gamestates/GSRoot.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -55,8 +55,6 @@
bool bPaused_;
float timeFactorPauseBackup_;
- LevelManager* levelManager_; //!< global level manager
-
// console commands
ConsoleCommand* ccSetTimeFactor_;
ConsoleCommand* ccPause_;
Modified: code/branches/core5/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/core5/src/orxonox/overlays/InGameConsole.cc 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/overlays/InGameConsole.cc 2009-10-01 09:44:53 UTC (rev 5850)
@@ -84,6 +84,7 @@
this->scroll_ = 0;
this->setConfigValues();
+ this->initialise();
}
/**
Modified: code/branches/core5/src/orxonox/overlays/InGameConsole.h
===================================================================
--- code/branches/core5/src/orxonox/overlays/InGameConsole.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/overlays/InGameConsole.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -35,15 +35,15 @@
#include <string>
#include "util/OgreForwardRefs.h"
-#include "util/Singleton.h"
+#include "util/ScopedSingleton.h"
#include "core/Shell.h"
#include "core/WindowEventListener.h"
namespace orxonox
{
- class _OrxonoxExport InGameConsole : public Singleton<InGameConsole>, public ShellListener, public WindowEventListener
+ class _OrxonoxExport InGameConsole : public ScopedSingleton<InGameConsole, ScopeID::Graphics>, public ShellListener, public WindowEventListener
{
- friend class Singleton<InGameConsole>;
+ friend class ScopedSingleton<InGameConsole, ScopeID::Graphics>;
public: // functions
InGameConsole();
~InGameConsole();
Modified: code/branches/core5/src/orxonox/sound/SoundManager.h
===================================================================
--- code/branches/core5/src/orxonox/sound/SoundManager.h 2009-10-01 09:42:44 UTC (rev 5849)
+++ code/branches/core5/src/orxonox/sound/SoundManager.h 2009-10-01 09:44:53 UTC (rev 5850)
@@ -31,7 +31,7 @@
#include <cassert>
#include <list>
-#include "util/Singleton.h"
+#include "util/ScopedSingleton.h"
#include "tools/interfaces/Tickable.h"
namespace orxonox
@@ -42,9 +42,9 @@
* function every tick. It is a singleton.
*
*/
- class _OrxonoxExport SoundManager : public Singleton<SoundManager>, public Tickable
+ class _OrxonoxExport SoundManager : public ScopedSingleton<SoundManager, ScopeID::Graphics>, public Tickable
{
- friend class Singleton<SoundManager>;
+ friend class ScopedSingleton<SoundManager, ScopeID::Graphics>;
public:
SoundManager();
~SoundManager();
More information about the Orxonox-commit
mailing list