Changeset 10407
- Timestamp:
- Apr 27, 2015, 11:08:26 PM (10 years ago)
- Location:
- code/branches/core7
- Files:
-
- 3 added
- 28 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/CMakeLists.txt
r10343 r10407 69 69 ADD_SUBDIRECTORY(module) 70 70 ADD_SUBDIRECTORY(object) 71 ADD_SUBDIRECTORY(singleton) 71 72 72 73 #Add the icon (for the renderwindow) -
code/branches/core7/src/libraries/core/Core.cc
r10392 r10407 56 56 #include "util/output/LogWriter.h" 57 57 #include "util/output/OutputManager.h" 58 #include " util/Scope.h"59 #include " util/ScopedSingletonManager.h"58 #include "core/singleton/Scope.h" 59 #include "core/singleton/ScopedSingletonManager.h" 60 60 #include "util/SignalHandler.h" 61 61 #include "PathConfig.h" -
code/branches/core7/src/libraries/core/CorePrereqs.h
r10392 r10407 77 77 namespace orxonox 78 78 { 79 namespace ScopeID 80 { 81 //!A list of available scopes for the Scope template. 82 enum Value 83 { 84 Root, 85 Graphics 86 }; 87 } 88 79 89 namespace XMLPort 80 90 { … … 186 196 class PathConfig; 187 197 struct ResourceInfo; 198 template <ScopeID::Value> 199 class Scope; 200 template <class, ScopeID::Value> 201 class ScopedSingleton; 188 202 class SettingsConfigFile; 189 203 template <class T> -
code/branches/core7/src/libraries/core/input/KeyBinderManager.cc
r10380 r10407 31 31 #include "util/Output.h" 32 32 #include "util/Exception.h" 33 #include " util/ScopedSingletonManager.h"33 #include "core/singleton/ScopedSingletonManager.h" 34 34 #include "core/config/ConfigValueIncludes.h" 35 35 #include "core/CoreIncludes.h" -
code/branches/core7/src/libraries/core/input/KeyDetector.cc
r10380 r10407 29 29 #include "KeyDetector.h" 30 30 31 #include "util/ScopedSingletonManager.h"32 31 #include "core/CoreIncludes.h" 32 #include "core/singleton/ScopedSingletonManager.h" 33 33 #include "core/command/ConsoleCommandIncludes.h" 34 34 #include "Button.h" -
code/branches/core7/src/libraries/core/singleton/Scope.h
r10406 r10407 42 42 43 43 To avoid multiple instances of orxonox::Scope<@a scope> in different libraries, each instance of orxonox::Scope 44 registers in orxonox::ScopeManager, where they are linked statically in the utillibrary.44 registers in orxonox::ScopeManager, where they are linked statically in the core library. 45 45 46 46 Scopes are usually used to control the creation and destruction of Singletons. … … 50 50 */ 51 51 52 #ifndef __ Util_Scope_H__53 #define __ Util_Scope_H__54 55 #include " UtilPrereqs.h"52 #ifndef __Core_Scope_H__ 53 #define __Core_Scope_H__ 54 55 #include "core/CorePrereqs.h" 56 56 57 57 #include <cassert> … … 60 60 #include <loki/ScopeGuard.h> 61 61 62 #include " Output.h"62 #include "util/Output.h" 63 63 64 64 namespace orxonox … … 67 67 @brief The ScopeManager stores the variables of the Scope templates in a statically linked context. 68 68 69 If all Scope objects are managed by this class, they are statically linked in the utillibrary.69 If all Scope objects are managed by this class, they are statically linked in the core library. 70 70 Without this, a new instance of Scope<T> for each T would be created in every library of Orxonox, 71 71 which is of course not the desired behavior. … … 73 73 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 74 74 */ 75 class _ UtilExport ScopeManager75 class _CoreExport ScopeManager 76 76 { 77 77 template <ScopeID::Value scope> … … 90 90 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 91 91 */ 92 class _ UtilExport ScopeListener92 class _CoreExport ScopeListener 93 93 { 94 94 template <ScopeID::Value scope> … … 198 198 } 199 199 200 #endif /* __ Util_Scope_H__ */200 #endif /* __Core_Scope_H__ */ -
code/branches/core7/src/libraries/core/singleton/ScopedSingletonManager.h
r10406 r10407 45 45 #define __ScopedSingletonManager_H__ 46 46 47 #include " UtilPrereqs.h"47 #include "core/CorePrereqs.h" 48 48 49 49 #include <cassert> 50 50 #include <map> 51 51 #include "util/Exception.h" 52 #include "util/Scope.h"53 52 #include "util/Singleton.h" 53 #include "Scope.h" 54 54 55 55 /** … … 76 76 map, sorted by the scope they belong to. 77 77 */ 78 class _ UtilExport ScopedSingletonManager78 class _CoreExport ScopedSingletonManager 79 79 { 80 80 public: -
code/branches/core7/src/libraries/network/Client.cc
r10343 r10407 45 45 #include "util/Clock.h" 46 46 #include "util/Output.h" 47 #include "util/ScopedSingletonManager.h"48 47 #include "synchronisable/Synchronisable.h" 49 48 #include "packet/Chat.h" … … 53 52 #include "core/Game.h" 54 53 #include "core/commandline/CommandLineParser.h" 54 #include "core/singleton/ScopedSingletonManager.h" 55 55 56 56 namespace orxonox -
code/branches/core7/src/libraries/network/LANDiscovery.cc
r8858 r10407 32 32 #include <cstring> 33 33 34 #include "util/ScopedSingletonManager.h"35 34 #include "core/CoreIncludes.h" 35 #include "core/singleton/ScopedSingletonManager.h" 36 36 37 37 -
code/branches/core7/src/libraries/network/MasterServer.cc
r10347 r10407 28 28 29 29 #include "MasterServer.h" 30 #include "util/ScopedSingletonManager.h"31 30 #include "core/command/ConsoleCommandIncludes.h" 32 31 #include "core/CoreIncludes.h" 33 32 #include "core/CorePrereqs.h" 33 #include "core/singleton/ScopedSingletonManager.h" 34 34 #include "util/Output.h" 35 35 -
code/branches/core7/src/libraries/util/CMakeLists.txt
r9765 r10407 26 26 CRC32.cc 27 27 ExprParser.cc 28 Scope.cc29 ScopedSingletonManager.cc30 28 SharedPtr.cc 31 29 Sleep.cc -
code/branches/core7/src/libraries/util/UtilPrereqs.h
r9550 r10407 62 62 63 63 //----------------------------------------------------------------------- 64 // Enums65 //-----------------------------------------------------------------------66 67 namespace orxonox68 {69 namespace ScopeID70 {71 //!A list of available scopes for the Scope template.72 enum Value73 {74 Root,75 Graphics76 };77 }78 }79 80 //-----------------------------------------------------------------------81 64 // Forward declarations 82 65 //----------------------------------------------------------------------- … … 96 79 class OutputManager; 97 80 class OutputStream; 98 template <ScopeID::Value>99 class Scope;100 template <class, ScopeID::Value>101 class ScopedSingleton;102 81 class ScopeListener; 103 82 template <class T> -
code/branches/core7/src/modules/designtools/ScreenshotManager.cc
r10380 r10407 48 48 #include "core/Resource.h" 49 49 #include "core/command/ConsoleCommandIncludes.h" 50 #include " util/ScopedSingletonManager.h"50 #include "core/singleton/ScopedSingletonManager.h" 51 51 #include "util/StringUtils.h" 52 52 -
code/branches/core7/src/modules/designtools/SkyboxGenerator.cc
r10380 r10407 38 38 #include <OgreCamera.h> 39 39 40 #include "util/ScopedSingletonManager.h"41 40 #include "core/CoreIncludes.h" 42 41 #include "core/config/ConfigValueIncludes.h" … … 46 45 #include "core/command/ConsoleCommandIncludes.h" 47 46 #include "core/command/CommandExecutor.h" 47 #include "core/singleton/ScopedSingletonManager.h" 48 48 49 49 #include "controllers/HumanController.h" -
code/branches/core7/src/modules/notifications/NotificationManager.cc
r10380 r10407 37 37 #include "core/CoreIncludes.h" 38 38 #include "core/LuaState.h" 39 #include " util/ScopedSingletonManager.h"39 #include "core/singleton/ScopedSingletonManager.h" 40 40 41 41 #include "interfaces/NotificationListener.h" -
code/branches/core7/src/modules/pickup/PickupManager.cc
r10380 r10407 38 38 #include "core/GUIManager.h" 39 39 #include "core/class/Identifier.h" 40 #include "core/singleton/ScopedSingletonManager.h" 40 41 #include "network/Host.h" 41 42 #include "network/NetworkFunction.h" 42 #include "util/ScopedSingletonManager.h"43 43 44 44 #include "infos/PlayerInfo.h" -
code/branches/core7/src/modules/questsystem/QuestManager.cc
r9667 r10407 36 36 #include "util/Exception.h" 37 37 #include "util/OrxAssert.h" 38 #include " util/ScopedSingletonManager.h"38 #include "core/singleton/ScopedSingletonManager.h" 39 39 #include "core/command/ConsoleCommand.h" 40 40 #include "core/GUIManager.h" -
code/branches/core7/src/orxonox/CameraManager.cc
r9667 r10407 35 35 #include <OgreCompositorManager.h> 36 36 37 #include "util/ScopedSingletonManager.h"38 37 #include "core/GameMode.h" 39 38 #include "core/GraphicsManager.h" 40 39 #include "core/object/ObjectList.h" 40 #include "core/singleton/ScopedSingletonManager.h" 41 41 #include "tools/Shader.h" 42 42 #include "graphics/Camera.h" -
code/branches/core7/src/orxonox/LevelManager.cc
r10392 r10407 36 36 #include <map> 37 37 38 #include " util/ScopedSingletonManager.h"38 #include "core/singleton/ScopedSingletonManager.h" 39 39 #include "core/commandline/CommandLineIncludes.h" 40 40 #include "core/config/ConfigValueIncludes.h" -
code/branches/core7/src/orxonox/MoodManager.cc
r10380 r10407 29 29 #include "MoodManager.h" 30 30 31 #include " util/ScopedSingletonManager.h"31 #include "core/singleton/ScopedSingletonManager.h" 32 32 #include "core/config/ConfigValueIncludes.h" 33 33 #include "core/CoreIncludes.h" -
code/branches/core7/src/orxonox/PawnManager.cc
r10380 r10407 29 29 #include "PawnManager.h" 30 30 31 #include "util/ScopedSingletonManager.h"32 31 #include "core/CoreIncludes.h" 32 #include "core/singleton/ScopedSingletonManager.h" 33 33 #include "worldentities/pawns/Pawn.h" 34 34 -
code/branches/core7/src/orxonox/PlayerManager.cc
r10380 r10407 31 31 #include "core/CoreIncludes.h" 32 32 #include "core/GameMode.h" 33 #include " util/ScopedSingletonManager.h"33 #include "core/singleton/ScopedSingletonManager.h" 34 34 35 35 #include "Level.h" -
code/branches/core7/src/orxonox/ShipPartManager.cc
r10380 r10407 29 29 #include "ShipPartManager.h" 30 30 31 #include "util/ScopedSingletonManager.h"32 31 #include "core/CoreIncludes.h" 32 #include "core/singleton/ScopedSingletonManager.h" 33 33 #include "items/ShipPart.h" 34 34 -
code/branches/core7/src/orxonox/chat/ChatHistory.cc
r10380 r10407 28 28 29 29 #include "ChatHistory.h" 30 #include " util/ScopedSingletonManager.h"30 #include "core/singleton/ScopedSingletonManager.h" 31 31 32 32 #ifndef CHATTEST -
code/branches/core7/src/orxonox/chat/ChatInputHandler.cc
r10380 r10407 47 47 #endif 48 48 49 #include " util/ScopedSingletonManager.h"49 #include "core/singleton/ScopedSingletonManager.h" 50 50 #include "core/CoreIncludes.h" 51 51 #include "core/GUIManager.h" -
code/branches/core7/src/orxonox/chat/ChatManager.cc
r10380 r10407 30 30 #include "ChatListener.h" 31 31 32 #include "util/ScopedSingletonManager.h"33 32 #include "core/CoreIncludes.h" 33 #include "core/singleton/ScopedSingletonManager.h" 34 34 #include "core/command/ConsoleCommandIncludes.h" 35 35 #include "network/Host.h" -
code/branches/core7/src/orxonox/overlays/InGameConsole.cc
r10380 r10407 45 45 #include "util/Math.h" 46 46 #include "util/DisplayStringConversions.h" 47 #include "util/ScopedSingletonManager.h"48 47 #include "util/output/MemoryWriter.h" 49 48 #include "util/output/OutputManager.h" … … 51 50 #include "core/config/ConfigValueIncludes.h" 52 51 #include "core/command/ConsoleCommandIncludes.h" 52 #include "core/singleton/ScopedSingletonManager.h" 53 53 #include "core/GUIManager.h" 54 54 #include "core/input/InputManager.h" -
code/branches/core7/src/orxonox/sound/SoundManager.cc
r10380 r10407 38 38 #include "util/Math.h" 39 39 #include "util/Clock.h" 40 #include " util/ScopedSingletonManager.h"40 #include "core/singleton/ScopedSingletonManager.h" 41 41 #include "core/config/ConfigValueIncludes.h" 42 42 #include "core/CoreIncludes.h" -
code/branches/core7/test/core/CMakeLists.txt
r10363 r10407 28 28 object/SmartPtrTest.cc 29 29 object/WeakPtrTest.cc 30 singleton/ScopeTest.cc 30 31 ) 31 32 ADD_DEPENDENCIES(all_tests core_test) -
code/branches/core7/test/core/singleton/ScopeTest.cc
r10406 r10407 1 1 #include <gtest/gtest.h> 2 #include " util/ScopedSingletonManager.h"2 #include "core/singleton/ScopedSingletonManager.h" 3 3 4 4 namespace orxonox … … 43 43 } 44 44 45 TEST( Scope, RootAndGraphicsScope)45 TEST(DISABLED_Scope, RootAndGraphicsScope) 46 46 { 47 47 EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive()); … … 68 68 } 69 69 70 TEST( Scope, RootAndGraphicsSingleton)70 TEST(DISABLED_Scope, RootAndGraphicsSingleton) 71 71 { 72 72 EXPECT_FALSE(TestSingletonGraphics::exists()); -
code/branches/core7/test/util/CMakeLists.txt
r10188 r10407 13 13 MultiTypeTest.cc 14 14 OutputTest.cc 15 ScopeTest.cc16 15 SharedPtrTest.cc 17 16 SingletonTest.cc
Note: See TracChangeset
for help on using the changeset viewer.