Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 12:13:34 AM (10 years ago)
Author:
landauf
Message:

define ScopeID as integer constants instead of an enum. this allows to extend it and add new scopes outside of core.

Location:
code/branches/core7/src/libraries/core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/Core.cc

    r10462 r10464  
    225225        // Create singletons that always exist (in other libraries)
    226226        orxout(internal_info) << "creating root scope:" << endl;
    227         this->rootScope_ = new Scope<ScopeID::Root>();
     227        this->rootScope_ = new Scope<ScopeID::ROOT>();
    228228
    229229        // Generate documentation instead of normal run?
     
    398398        // Create singletons associated with graphics (in other libraries)
    399399        orxout(internal_info) << "creating graphics scope:" << endl;
    400         graphicsScope_ = new Scope<ScopeID::Graphics>();
     400        graphicsScope_ = new Scope<ScopeID::GRAPHICS>();
    401401
    402402        unloader.Dismiss();
  • code/branches/core7/src/libraries/core/Core.h

    r10392 r10464  
    129129            TclBind*                  tclBind_;
    130130            TclThreadManager*         tclThreadManager_;
    131             Scope<ScopeID::Root>*     rootScope_;
     131            Scope<ScopeID::ROOT>*     rootScope_;
    132132            // graphical
    133133            GraphicsManager*          graphicsManager_;            //!< Interface to OGRE
    134134            InputManager*             inputManager_;               //!< Interface to OIS
    135135            GUIManager*               guiManager_;                 //!< Interface to GUI
    136             Scope<ScopeID::Graphics>* graphicsScope_;
     136            Scope<ScopeID::GRAPHICS>* graphicsScope_;
    137137
    138138            bool                      bGraphicsLoaded_;
  • code/branches/core7/src/libraries/core/CorePrereqs.h

    r10458 r10464  
    7979    namespace ScopeID
    8080    {
     81        typedef int Value;
     82
    8183        //!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;
    8786    }
    8887
  • code/branches/core7/src/libraries/core/input/KeyBinderManager.cc

    r10459 r10464  
    4141namespace orxonox
    4242{
    43     ManageScopedSingleton(KeyBinderManager, ScopeID::Graphics, false);
     43    ManageScopedSingleton(KeyBinderManager, ScopeID::GRAPHICS, false);
    4444
    4545    static const std::string __CC_keybind_name = "keybind";
  • code/branches/core7/src/libraries/core/input/KeyDetector.cc

    r10459 r10464  
    3838namespace orxonox
    3939{
    40     ManageScopedSingleton(KeyDetector, ScopeID::Graphics, false);
     40    ManageScopedSingleton(KeyDetector, ScopeID::GRAPHICS, false);
    4141
    4242    static const std::string __CC_KeyDetector_callback_name = "KeyDetectorKeyPressed";
  • code/branches/core7/src/libraries/core/object/DestroyLaterManager.cc

    r10459 r10464  
    3434namespace orxonox
    3535{
    36     ManageScopedSingleton(DestroyLaterManager, ScopeID::Root, false);
     36    ManageScopedSingleton(DestroyLaterManager, ScopeID::ROOT, false);
    3737
    3838    RegisterAbstractClass(DestroyLaterManager).inheritsFrom<UpdateListener>();
Note: See TracChangeset for help on using the changeset viewer.