[Orxonox-commit 1560] r6278 - in code/branches/presentation2/src: libraries/core/input orxonox orxonox/sound

rgrieder at orxonox.net rgrieder at orxonox.net
Wed Dec 9 09:34:48 CET 2009


Author: rgrieder
Date: 2009-12-09 09:34:47 +0100 (Wed, 09 Dec 2009)
New Revision: 6278

Modified:
   code/branches/presentation2/src/libraries/core/input/InputManager.h
   code/branches/presentation2/src/libraries/core/input/KeyBinderManager.h
   code/branches/presentation2/src/orxonox/MoodManager.h
   code/branches/presentation2/src/orxonox/sound/SoundManager.h
Log:
Use base class method for getInstance (for tolua interface).

Modified: code/branches/presentation2/src/libraries/core/input/InputManager.h
===================================================================
--- code/branches/presentation2/src/libraries/core/input/InputManager.h	2009-12-09 08:23:28 UTC (rev 6277)
+++ code/branches/presentation2/src/libraries/core/input/InputManager.h	2009-12-09 08:34:47 UTC (rev 6278)
@@ -170,7 +170,7 @@
         OIS::InputManager* getOISInputManager() { return this->oisInputManager_; }
         std::pair<int, int> getMousePosition() const;
         
-        static InputManager& getInstance() { return *singletonPtr_s; } // tolua_export
+        static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export
 
     private: // functions
         // don't mess with a Singleton

Modified: code/branches/presentation2/src/libraries/core/input/KeyBinderManager.h
===================================================================
--- code/branches/presentation2/src/libraries/core/input/KeyBinderManager.h	2009-12-09 08:23:28 UTC (rev 6277)
+++ code/branches/presentation2/src/libraries/core/input/KeyBinderManager.h	2009-12-09 08:34:47 UTC (rev 6278)
@@ -61,9 +61,11 @@
         ~KeyBinderManager();
         void setConfigValues();
 
-        static KeyBinderManager& getInstance() { return Singleton<KeyBinderManager>::getInstance(); } //tolua_export
+        static KeyBinderManager& getInstance() //tolua_export
+            { return Singleton<KeyBinderManager>::getInstance(); }
         //! Returns the currently selected KeyBinder
-        KeyBinder* getCurrent() { return this->currentBinder_; } //tolua_export
+        KeyBinder* getCurrent() //tolua_export
+            { return this->currentBinder_; }
         //! Like getCurrent(), but returns it as InputHandler* (so you don't have to include KeyBinder.h)
         InputHandler* getCurrentAsHandler();
         //! Selects the current KeyBinder and creates it if not yet loaded.
@@ -94,7 +96,8 @@
         void unload(const std::string& filename);
 
         //! Bind 'command' to any key pressed after this call (use with care!)
-        inline void keybind(const std::string& command) { this->keybindInternal(command, false); } //tolua_export
+        inline void keybind(const std::string& command) //tolua_export
+            { this->keybindInternal(command, false); }
         //! Bind 'command' to any key pressed after this call (use with care!), but temporarily (no file save)
         inline void tkeybind(const std::string& command)
             { this->keybindInternal(command, true); }

Modified: code/branches/presentation2/src/orxonox/MoodManager.h
===================================================================
--- code/branches/presentation2/src/orxonox/MoodManager.h	2009-12-09 08:23:28 UTC (rev 6277)
+++ code/branches/presentation2/src/orxonox/MoodManager.h	2009-12-09 08:34:47 UTC (rev 6278)
@@ -55,7 +55,7 @@
             void setMood(const std::string& mood);
             const std::string& getMood();
 
-            static MoodManager& getInstance()    { return Singleton<MoodManager>::getInstance(); } // tolua_export
+            static MoodManager& getInstance() { return Singleton<MoodManager>::getInstance(); } // tolua_export
 
         private:
 

Modified: code/branches/presentation2/src/orxonox/sound/SoundManager.h
===================================================================
--- code/branches/presentation2/src/orxonox/sound/SoundManager.h	2009-12-09 08:23:28 UTC (rev 6277)
+++ code/branches/presentation2/src/orxonox/sound/SoundManager.h	2009-12-09 08:34:47 UTC (rev 6278)
@@ -79,8 +79,7 @@
         void setConfigValues();
         
         // tolua_begin
-        static SoundManager& getInstance()
-            { return Singleton<SoundManager>::getInstance(); }
+        static SoundManager& getInstance() { return Singleton<SoundManager>::getInstance(); }
 
         std::string getDeviceName(unsigned int index) const
             { return index < this->deviceNames_.size() ? this->deviceNames_[index] : std::string(); }




More information about the Orxonox-commit mailing list