Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2015, 11:08:26 PM (9 years ago)
Author:
landauf
Message:

moved Scope and ScopedSingletonManager from util to core.
TODO I had to disable two tests in ScopeTest.cc because now that it runs in the core library, there are too many singletons which get loaded in graphics scope (with too many dependencies). this should be fixed

Location:
code/branches/core7/src/libraries
Files:
2 added
10 edited
4 moved

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/CMakeLists.txt

    r10343 r10407  
    6969ADD_SUBDIRECTORY(module)
    7070ADD_SUBDIRECTORY(object)
     71ADD_SUBDIRECTORY(singleton)
    7172
    7273#Add the icon (for the renderwindow)
  • code/branches/core7/src/libraries/core/Core.cc

    r10392 r10407  
    5656#include "util/output/LogWriter.h"
    5757#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"
    6060#include "util/SignalHandler.h"
    6161#include "PathConfig.h"
  • code/branches/core7/src/libraries/core/CorePrereqs.h

    r10392 r10407  
    7777namespace orxonox
    7878{
     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
    7989    namespace XMLPort
    8090    {
     
    186196    class PathConfig;
    187197    struct ResourceInfo;
     198    template <ScopeID::Value>
     199    class Scope;
     200    template <class, ScopeID::Value>
     201    class ScopedSingleton;
    188202    class SettingsConfigFile;
    189203    template <class T>
  • code/branches/core7/src/libraries/core/input/KeyBinderManager.cc

    r10380 r10407  
    3131#include "util/Output.h"
    3232#include "util/Exception.h"
    33 #include "util/ScopedSingletonManager.h"
     33#include "core/singleton/ScopedSingletonManager.h"
    3434#include "core/config/ConfigValueIncludes.h"
    3535#include "core/CoreIncludes.h"
  • code/branches/core7/src/libraries/core/input/KeyDetector.cc

    r10380 r10407  
    2929#include "KeyDetector.h"
    3030
    31 #include "util/ScopedSingletonManager.h"
    3231#include "core/CoreIncludes.h"
     32#include "core/singleton/ScopedSingletonManager.h"
    3333#include "core/command/ConsoleCommandIncludes.h"
    3434#include "Button.h"
  • code/branches/core7/src/libraries/core/singleton/Scope.h

    r10406 r10407  
    4242
    4343To 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 util library.
     44registers in orxonox::ScopeManager, where they are linked statically in the core library.
    4545
    4646Scopes are usually used to control the creation and destruction of Singletons.
     
    5050*/
    5151
    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"
    5656
    5757#include <cassert>
     
    6060#include <loki/ScopeGuard.h>
    6161
    62 #include "Output.h"
     62#include "util/Output.h"
    6363
    6464namespace orxonox
     
    6767        @brief The ScopeManager stores the variables of the Scope templates in a statically linked context.
    6868
    69         If all Scope objects are managed by this class, they are statically linked in the util library.
     69        If all Scope objects are managed by this class, they are statically linked in the core library.
    7070        Without this, a new instance of Scope<T> for each T would be created in every library of Orxonox,
    7171        which is of course not the desired behavior.
     
    7373        @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager.
    7474    */
    75     class _UtilExport ScopeManager
     75    class _CoreExport ScopeManager
    7676    {
    7777        template <ScopeID::Value scope>
     
    9090        @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager.
    9191    */
    92     class _UtilExport ScopeListener
     92    class _CoreExport ScopeListener
    9393    {
    9494        template <ScopeID::Value scope>
     
    198198}
    199199
    200 #endif /* __Util_Scope_H__ */
     200#endif /* __Core_Scope_H__ */
  • code/branches/core7/src/libraries/core/singleton/ScopedSingletonManager.h

    r10406 r10407  
    4545#define __ScopedSingletonManager_H__
    4646
    47 #include "UtilPrereqs.h"
     47#include "core/CorePrereqs.h"
    4848
    4949#include <cassert>
    5050#include <map>
    5151#include "util/Exception.h"
    52 #include "util/Scope.h"
    5352#include "util/Singleton.h"
     53#include "Scope.h"
    5454
    5555/**
     
    7676        map, sorted by the scope they belong to.
    7777    */
    78     class _UtilExport ScopedSingletonManager
     78    class _CoreExport ScopedSingletonManager
    7979    {
    8080        public:
  • code/branches/core7/src/libraries/network/Client.cc

    r10343 r10407  
    4545#include "util/Clock.h"
    4646#include "util/Output.h"
    47 #include "util/ScopedSingletonManager.h"
    4847#include "synchronisable/Synchronisable.h"
    4948#include "packet/Chat.h"
     
    5352#include "core/Game.h"
    5453#include "core/commandline/CommandLineParser.h"
     54#include "core/singleton/ScopedSingletonManager.h"
    5555
    5656namespace orxonox
  • code/branches/core7/src/libraries/network/LANDiscovery.cc

    r8858 r10407  
    3232#include <cstring>
    3333
    34 #include "util/ScopedSingletonManager.h"
    3534#include "core/CoreIncludes.h"
     35#include "core/singleton/ScopedSingletonManager.h"
    3636
    3737
  • code/branches/core7/src/libraries/network/MasterServer.cc

    r10347 r10407  
    2828
    2929#include "MasterServer.h"
    30 #include "util/ScopedSingletonManager.h"
    3130#include "core/command/ConsoleCommandIncludes.h"
    3231#include "core/CoreIncludes.h"
    3332#include "core/CorePrereqs.h"
     33#include "core/singleton/ScopedSingletonManager.h"
    3434#include "util/Output.h"
    3535
  • code/branches/core7/src/libraries/util/CMakeLists.txt

    r9765 r10407  
    2626  CRC32.cc
    2727  ExprParser.cc
    28   Scope.cc
    29   ScopedSingletonManager.cc
    3028  SharedPtr.cc
    3129  Sleep.cc
  • code/branches/core7/src/libraries/util/UtilPrereqs.h

    r9550 r10407  
    6262
    6363//-----------------------------------------------------------------------
    64 // Enums
    65 //-----------------------------------------------------------------------
    66 
    67 namespace orxonox
    68 {
    69     namespace ScopeID
    70     {
    71         //!A list of available scopes for the Scope template.
    72         enum Value
    73         {
    74             Root,
    75             Graphics
    76         };
    77     }
    78 }
    79 
    80 //-----------------------------------------------------------------------
    8164// Forward declarations
    8265//-----------------------------------------------------------------------
     
    9679    class OutputManager;
    9780    class OutputStream;
    98     template <ScopeID::Value>
    99     class Scope;
    100     template <class, ScopeID::Value>
    101     class ScopedSingleton;
    10281    class ScopeListener;
    10382    template <class T>
Note: See TracChangeset for help on using the changeset viewer.