Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 23, 2009, 2:20:51 PM (16 years ago)
Author:
rgrieder
Message:

Improved exception-safety in the GUIManager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/gui/GUIManager.h

    r3337 r3338  
    4242#include <string>
    4343#include <CEGUIForwardRefs.h>
     44#include <boost/scoped_ptr.hpp>
    4445
    4546#include "util/OgreForwardRefs.h"
     
    6768// tolua_end
    6869    public:
    69         /**
    70         @enum State
    71             The current state of the GUIManager. There should maybe be more (or we can omit this totally).
    72         */
    73         enum State
    74         {
    75             Uninitialised,  //!< Initial state of the GUIManager
    76             Ready,          //!< State after initialisation if ready
    77             OnDisplay       //!< State if GUI is displayed
    78         };
    79 
    80         GUIManager();
     70        GUIManager(Ogre::RenderWindow* renderWindow);
    8171        ~GUIManager();
    82 
    83         bool initialise(Ogre::RenderWindow* renderWindow);
    8472
    8573        void update(const Clock& time);
     
    11098        void mouseScrolled (int abs, int rel);
    11199
    112         Ogre::RenderWindow*         renderWindow_;      //!< Ogre's render window to give CEGUI access to it
    113         CEGUI::OgreCEGUIRenderer*   guiRenderer_;       //!< CEGUI's interface to the Ogre Engine
    114         CEGUI::ResourceProvider*    resourceProvider_;  //!< CEGUI's resource provider
    115         CEGUI::LuaScriptModule*     scriptModule_;      //!< CEGUI's script module to use Lua
    116         CEGUI::Logger*              ceguiLogger_;       //!< CEGUI's logger to be able to log CEGUI errors in our log
    117         CEGUI::System*              guiSystem_;         //!< CEGUI's main system
    118         lua_State*                  luaState_;          //!< Lua state, access point to the Lua engine
     100        boost::scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;  //!< CEGUI's interface to the Ogre Engine
     101        boost::scoped_ptr<CEGUI::LuaScriptModule>   scriptModule_; //!< CEGUI's script module to use Lua
     102        boost::scoped_ptr<CEGUI::System>            guiSystem_;    //!< CEGUI's main system
     103        Ogre::RenderWindow*      renderWindow_;     //!< Ogre's render window to give CEGUI access to it
     104        CEGUI::ResourceProvider* resourceProvider_; //!< CEGUI's resource provider
     105        CEGUI::Logger*           ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
     106        lua_State*               luaState_;         //!< Lua state, access point to the Lua engine
    119107
    120         State                       state_;             //!< reflects state of the GUIManager
    121 
    122         static GUIManager*          singletonRef_s;     //!< Singleton reference to GUIManager
     108        static GUIManager*       singletonRef_s;    //!< Singleton reference to GUIManager
    123109
    124110    }; // tolua_export
Note: See TracChangeset for help on using the changeset viewer.