Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 5, 2009, 1:34:10 AM (15 years ago)
Author:
rgrieder
Message:

Added new an option for the ScopedSingletonManager that can allow the Singleton to fail (throw an exception).
Also improved exception-safety in Scope so that when for a Singleton fails, the Scope will deactivate all activated listeners and properly destroy itself.

Location:
code/branches/core5/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/CameraManager.cc

    r5867 r5877  
    4545namespace orxonox
    4646{
    47     ManageScopedSingleton(CameraManager, ScopeID::Graphics);
    4847    CameraManager* CameraManager::singletonPtr_s = 0;
     48    ManageScopedSingleton(CameraManager, ScopeID::Graphics, false);
    4949
    5050    CameraManager::CameraManager()
  • code/branches/core5/src/orxonox/LevelManager.cc

    r5867 r5877  
    4444    SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
    4545
    46     ManageScopedSingleton(LevelManager, ScopeID::Root);
    4746    LevelManager* LevelManager::singletonPtr_s = 0;
     47    ManageScopedSingleton(LevelManager, ScopeID::Root, false);
    4848
    4949    LevelManager::LevelManager()
  • code/branches/core5/src/orxonox/PlayerManager.cc

    r5867 r5877  
    3939{
    4040    PlayerManager* PlayerManager::singletonPtr_s = 0;
    41     ManageScopedSingleton(PlayerManager, ScopeID::Root);
     41    ManageScopedSingleton(PlayerManager, ScopeID::Root, false);
    4242
    4343    PlayerManager::PlayerManager()
  • code/branches/core5/src/orxonox/overlays/InGameConsole.cc

    r5867 r5877  
    6262
    6363    InGameConsole* InGameConsole::singletonPtr_s = 0;
    64     ManageScopedSingleton(InGameConsole, ScopeID::Graphics);
     64    ManageScopedSingleton(InGameConsole, ScopeID::Graphics, false);
    6565
    6666    /**
  • code/branches/core5/src/orxonox/sound/SoundManager.cc

    r5867 r5877  
    4040{
    4141    SoundManager* SoundManager::singletonPtr_s = NULL;
    42     ManageScopedSingleton(SoundManager, ScopeID::Graphics);
     42    ManageScopedSingleton(SoundManager, ScopeID::Graphics, true);
    4343
    4444    /**
Note: See TracChangeset for help on using the changeset viewer.