Changeset 10464
- Timestamp:
- May 25, 2015, 12:13:34 AM (10 years ago)
- Location:
- code/branches/core7
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/Core.cc
r10462 r10464 225 225 // Create singletons that always exist (in other libraries) 226 226 orxout(internal_info) << "creating root scope:" << endl; 227 this->rootScope_ = new Scope<ScopeID::R oot>();227 this->rootScope_ = new Scope<ScopeID::ROOT>(); 228 228 229 229 // Generate documentation instead of normal run? … … 398 398 // Create singletons associated with graphics (in other libraries) 399 399 orxout(internal_info) << "creating graphics scope:" << endl; 400 graphicsScope_ = new Scope<ScopeID::G raphics>();400 graphicsScope_ = new Scope<ScopeID::GRAPHICS>(); 401 401 402 402 unloader.Dismiss(); -
code/branches/core7/src/libraries/core/Core.h
r10392 r10464 129 129 TclBind* tclBind_; 130 130 TclThreadManager* tclThreadManager_; 131 Scope<ScopeID::R oot>* rootScope_;131 Scope<ScopeID::ROOT>* rootScope_; 132 132 // graphical 133 133 GraphicsManager* graphicsManager_; //!< Interface to OGRE 134 134 InputManager* inputManager_; //!< Interface to OIS 135 135 GUIManager* guiManager_; //!< Interface to GUI 136 Scope<ScopeID::G raphics>* graphicsScope_;136 Scope<ScopeID::GRAPHICS>* graphicsScope_; 137 137 138 138 bool bGraphicsLoaded_; -
code/branches/core7/src/libraries/core/CorePrereqs.h
r10458 r10464 79 79 namespace ScopeID 80 80 { 81 typedef int Value; 82 81 83 //!A list of available scopes for the Scope template. 82 enum Value 83 { 84 Root, 85 Graphics 86 }; 84 static const Value ROOT = 1; 85 static const Value GRAPHICS = 2; 87 86 } 88 87 -
code/branches/core7/src/libraries/core/input/KeyBinderManager.cc
r10459 r10464 41 41 namespace orxonox 42 42 { 43 ManageScopedSingleton(KeyBinderManager, ScopeID::G raphics, false);43 ManageScopedSingleton(KeyBinderManager, ScopeID::GRAPHICS, false); 44 44 45 45 static const std::string __CC_keybind_name = "keybind"; -
code/branches/core7/src/libraries/core/input/KeyDetector.cc
r10459 r10464 38 38 namespace orxonox 39 39 { 40 ManageScopedSingleton(KeyDetector, ScopeID::G raphics, false);40 ManageScopedSingleton(KeyDetector, ScopeID::GRAPHICS, false); 41 41 42 42 static const std::string __CC_KeyDetector_callback_name = "KeyDetectorKeyPressed"; -
code/branches/core7/src/libraries/core/object/DestroyLaterManager.cc
r10459 r10464 34 34 namespace orxonox 35 35 { 36 ManageScopedSingleton(DestroyLaterManager, ScopeID::R oot, false);36 ManageScopedSingleton(DestroyLaterManager, ScopeID::ROOT, false); 37 37 38 38 RegisterAbstractClass(DestroyLaterManager).inheritsFrom<UpdateListener>(); -
code/branches/core7/src/libraries/network/Client.cc
r10459 r10464 57 57 { 58 58 59 ManageScopedSingleton( Client, ScopeID::R oot, false );59 ManageScopedSingleton( Client, ScopeID::ROOT, false ); 60 60 61 61 /** -
code/branches/core7/src/libraries/network/LANDiscovery.cc
r10459 r10464 38 38 namespace orxonox 39 39 { 40 ManageScopedSingleton(LANDiscovery, ScopeID::G raphics, false);40 ManageScopedSingleton(LANDiscovery, ScopeID::GRAPHICS, false); 41 41 42 42 LANDiscovery::LANDiscovery() -
code/branches/core7/src/modules/designtools/ScreenshotManager.cc
r10459 r10464 61 61 SetConsoleCommand("printScreenHD", &ScreenshotManager::makeScreenshot_s); 62 62 63 ManageScopedSingleton(ScreenshotManager, ScopeID::G raphics, false);63 ManageScopedSingleton(ScreenshotManager, ScopeID::GRAPHICS, false); 64 64 65 65 RegisterAbstractClass(ScreenshotManager).inheritsFrom<Configurable>(); -
code/branches/core7/src/modules/designtools/SkyboxGenerator.cc
r10459 r10464 60 60 SetConsoleCommand("SkyboxGenerator", "createSkybox", &SkyboxGenerator::createSkybox).addShortcut(); 61 61 62 ManageScopedSingleton(SkyboxGenerator, ScopeID::G raphics, false);62 ManageScopedSingleton(SkyboxGenerator, ScopeID::GRAPHICS, false); 63 63 64 64 RegisterAbstractClass(SkyboxGenerator).inheritsFrom<Configurable>().inheritsFrom<Tickable>(); -
code/branches/core7/src/modules/notifications/NotificationManager.cc
r10459 r10464 47 47 { 48 48 49 ManageScopedSingleton(NotificationManager, ScopeID::R oot, false);49 ManageScopedSingleton(NotificationManager, ScopeID::ROOT, false); 50 50 51 51 RegisterAbstractClass(NotificationManager).inheritsFrom<NotificationListener>(); -
code/branches/core7/src/modules/pickup/PickupManager.cc
r10459 r10464 51 51 namespace orxonox 52 52 { 53 ManageScopedSingleton(PickupManager, ScopeID::R oot, false);53 ManageScopedSingleton(PickupManager, ScopeID::ROOT, false); 54 54 55 55 // Initialization of the name of the PickupInventory GUI. -
code/branches/core7/src/modules/questsystem/QuestManager.cc
r10459 r10464 49 49 namespace orxonox 50 50 { 51 ManageScopedSingleton(QuestManager, ScopeID::R oot, false);51 ManageScopedSingleton(QuestManager, ScopeID::ROOT, false); 52 52 53 53 /** -
code/branches/core7/src/orxonox/CameraManager.cc
r10459 r10464 44 44 namespace orxonox 45 45 { 46 ManageScopedSingleton(CameraManager, ScopeID::G raphics, false);46 ManageScopedSingleton(CameraManager, ScopeID::GRAPHICS, false); 47 47 48 48 CameraManager::CameraManager() -
code/branches/core7/src/orxonox/LevelManager.cc
r10459 r10464 51 51 SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)"); 52 52 53 ManageScopedSingleton(LevelManager, ScopeID::R oot, false);53 ManageScopedSingleton(LevelManager, ScopeID::ROOT, false); 54 54 55 55 RegisterAbstractClass(LevelManager).inheritsFrom<Configurable>(); -
code/branches/core7/src/orxonox/MoodManager.cc
r10459 r10464 36 36 namespace orxonox 37 37 { 38 ManageScopedSingleton(MoodManager, ScopeID::R oot, false);38 ManageScopedSingleton(MoodManager, ScopeID::ROOT, false); 39 39 40 40 // Note: I'm (Kevin Young) not entirely sure whether that's good code style: -
code/branches/core7/src/orxonox/PlayerManager.cc
r10459 r10464 39 39 namespace orxonox 40 40 { 41 ManageScopedSingleton(PlayerManager, ScopeID::R oot, false);41 ManageScopedSingleton(PlayerManager, ScopeID::ROOT, false); 42 42 43 43 RegisterAbstractClass(PlayerManager).inheritsFrom<ClientConnectionListener>(); -
code/branches/core7/src/orxonox/chat/ChatHistory.cc
r10459 r10464 34 34 { 35 35 /* singleton */ 36 ManageScopedSingleton( ChatHistory, ScopeID::R oot, false );36 ManageScopedSingleton( ChatHistory, ScopeID::ROOT, false ); 37 37 38 38 RegisterAbstractClass(ChatHistory).inheritsFrom<ChatListener>(); -
code/branches/core7/src/orxonox/chat/ChatInputHandler.cc
r10459 r10464 62 62 { 63 63 /* singleton */ 64 ManageScopedSingleton( ChatInputHandler, ScopeID::G raphics, false );64 ManageScopedSingleton( ChatInputHandler, ScopeID::GRAPHICS, false ); 65 65 66 66 /* add commands to console */ -
code/branches/core7/src/orxonox/chat/ChatManager.cc
r10459 r10464 40 40 namespace orxonox 41 41 { 42 ManageScopedSingleton(ChatManager, ScopeID::R oot, false);42 ManageScopedSingleton(ChatManager, ScopeID::ROOT, false); 43 43 44 44 SetConsoleCommand("chat", &ChatManager::chat).defaultValue(1, NETWORK_PEER_ID_BROADCAST); -
code/branches/core7/src/orxonox/overlays/InGameConsole.cc
r10459 r10464 65 65 SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole); 66 66 67 ManageScopedSingleton(InGameConsole, ScopeID::G raphics, false);67 ManageScopedSingleton(InGameConsole, ScopeID::GRAPHICS, false); 68 68 69 69 RegisterAbstractClass(InGameConsole).inheritsFrom<WindowEventListener>().inheritsFrom<UpdateListener>(); -
code/branches/core7/src/orxonox/sound/SoundManager.cc
r10459 r10464 50 50 namespace orxonox 51 51 { 52 ManageScopedSingleton(SoundManager, ScopeID::G raphics, true);52 ManageScopedSingleton(SoundManager, ScopeID::GRAPHICS, true); 53 53 54 54 std::string SoundManager::getALErrorString(ALenum code) -
code/branches/core7/test/core/singleton/ScopeTest.cc
r10460 r10464 18 18 }; 19 19 20 ManageScopedSingleton(TestSingletonRoot, ScopeID::R oot, false);21 ManageScopedSingleton(TestSingletonGraphics, ScopeID::G raphics, false);20 ManageScopedSingleton(TestSingletonRoot, ScopeID::ROOT, false); 21 ManageScopedSingleton(TestSingletonGraphics, ScopeID::GRAPHICS, false); 22 22 23 23 // Fixture … … 39 39 TEST_F(ScopeTest, ScopesDoNotExist) 40 40 { 41 EXPECT_FALSE(Scope<ScopeID::R oot>::isActive());42 EXPECT_FALSE(Scope<ScopeID::G raphics>::isActive());41 EXPECT_FALSE(Scope<ScopeID::ROOT>::isActive()); 42 EXPECT_FALSE(Scope<ScopeID::GRAPHICS>::isActive()); 43 43 } 44 44 … … 51 51 TEST_F(ScopeTest, RootScope) 52 52 { 53 EXPECT_FALSE(Scope<ScopeID::R oot>::isActive());53 EXPECT_FALSE(Scope<ScopeID::ROOT>::isActive()); 54 54 { // create root scope 55 Scope<ScopeID::R oot> scope;56 EXPECT_TRUE(Scope<ScopeID::R oot>::isActive());55 Scope<ScopeID::ROOT> scope; 56 EXPECT_TRUE(Scope<ScopeID::ROOT>::isActive()); 57 57 } // destroy root scope 58 EXPECT_FALSE(Scope<ScopeID::R oot>::isActive());58 EXPECT_FALSE(Scope<ScopeID::ROOT>::isActive()); 59 59 } 60 60 61 61 TEST_F(ScopeTest, DISABLED_RootAndGraphicsScope) 62 62 { 63 EXPECT_FALSE(Scope<ScopeID::G raphics>::isActive());63 EXPECT_FALSE(Scope<ScopeID::GRAPHICS>::isActive()); 64 64 { // create root scope 65 Scope<ScopeID::R oot> scope;66 EXPECT_FALSE(Scope<ScopeID::G raphics>::isActive());65 Scope<ScopeID::ROOT> scope; 66 EXPECT_FALSE(Scope<ScopeID::GRAPHICS>::isActive()); 67 67 { // create graphics scope 68 Scope<ScopeID::G raphics> scope;69 EXPECT_TRUE(Scope<ScopeID::G raphics>::isActive());68 Scope<ScopeID::GRAPHICS> scope; 69 EXPECT_TRUE(Scope<ScopeID::GRAPHICS>::isActive()); 70 70 } // destroy graphics scope 71 EXPECT_FALSE(Scope<ScopeID::G raphics>::isActive());71 EXPECT_FALSE(Scope<ScopeID::GRAPHICS>::isActive()); 72 72 } // destroy root scope 73 EXPECT_FALSE(Scope<ScopeID::G raphics>::isActive());73 EXPECT_FALSE(Scope<ScopeID::GRAPHICS>::isActive()); 74 74 } 75 75 … … 78 78 EXPECT_FALSE(TestSingletonRoot::exists()); 79 79 { // create root scope 80 Scope<ScopeID::R oot> scope;80 Scope<ScopeID::ROOT> scope; 81 81 EXPECT_TRUE(TestSingletonRoot::exists()); 82 82 } // destroy root scope … … 88 88 EXPECT_FALSE(TestSingletonGraphics::exists()); 89 89 { // create root scope 90 Scope<ScopeID::R oot> scope;90 Scope<ScopeID::ROOT> scope; 91 91 EXPECT_FALSE(TestSingletonGraphics::exists()); 92 92 { // create graphics scope 93 Scope<ScopeID::G raphics> scope;93 Scope<ScopeID::GRAPHICS> scope; 94 94 EXPECT_TRUE(TestSingletonGraphics::exists()); 95 95 } // destroy graphics scope
Note: See TracChangeset
for help on using the changeset viewer.