Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 19, 2008, 2:24:33 PM (16 years ago)
Author:
rgrieder
Message:

Moved all showsGraphics, hasServer, etc. functions from Settings class to Core class.
This was necessary to avoid circular dependencies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/Settings.h

    r1940 r1949  
    5050        friend class ClassIdentifier<Settings>;
    5151        friend class GSRoot;
    52         friend class GSGraphics;
    53         friend class GSServer;
    54         friend class GSClient;
    55         friend class GSDedicated;
    56         friend class GSStandalone;
    5752
    5853    public:
     
    6257        { assert(singletonRef_s); singletonRef_s->_tsetDataPath(path); }
    6358
    64         // an alternative to a global game mode variable
    65         static bool showsGraphics() { assert(singletonRef_s); return singletonRef_s->bShowsGraphics_; }
    66         static bool hasServer()     { assert(singletonRef_s); return singletonRef_s->bHasServer_; }
    67         static bool isClient()      { assert(singletonRef_s); return singletonRef_s->bIsClient_; }
    68         static bool isStandalone()  { assert(singletonRef_s); return singletonRef_s->bIsStandalone_; }
    69         static bool isMaster()      { assert(singletonRef_s); return singletonRef_s->bIsMaster_; }
    70 
    7159    private:
    72         // GSRoot has access to these
    73         static void setShowsGraphics(bool val) { assert(singletonRef_s); singletonRef_s->bShowsGraphics_ = val; singletonRef_s->updateIsMaster(); }
    74         static void setHasServer    (bool val) { assert(singletonRef_s); singletonRef_s->bHasServer_     = val; singletonRef_s->updateIsMaster(); }
    75         static void setIsClient     (bool val) { assert(singletonRef_s); singletonRef_s->bIsClient_      = val; singletonRef_s->updateIsMaster(); }
    76         static void setIsStandalone (bool val) { assert(singletonRef_s); singletonRef_s->bIsStandalone_  = val; singletonRef_s->updateIsMaster(); }
    77         static void updateIsMaster  ()         { assert(singletonRef_s); singletonRef_s->bIsMaster_ = (singletonRef_s->bHasServer_ || singletonRef_s->bIsStandalone_); }
    78 
    7960        Settings();
    8061        Settings(const Settings& instance);
     
    8768        void setConfigValues();
    8869
    89         bool bShowsGraphics_;                                  //!< global variable that tells whether to show graphics
    90         bool bHasServer_;                                      //!< global variable that tells whether this is a server
    91         bool bIsClient_;
    92         bool bIsStandalone_;
    93         bool bIsMaster_;
    94 
    9570        std::string dataPath_;                                 //!< Path to the game data
    9671
Note: See TracChangeset for help on using the changeset viewer.