Changeset 10829 for code/branches/cpp11_v2
- Timestamp:
- Nov 22, 2015, 5:30:57 PM (9 years ago)
- Location:
- code/branches/cpp11_v2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
r10768 r10829 205 205 void KeyBinderManager::registerKeybindCallback(LuaFunctor* function) 206 206 { 207 this->callbackFunction_ = function;207 this->callbackFunction_.reset(function); 208 208 } 209 209 } -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h
r10825 r10829 34 34 #include <map> 35 35 #include <string> 36 #include <memory> 36 37 37 38 #include "util/Singleton.h" 38 #include "util/SharedPtr.h"39 39 #include "core/config/Configurable.h" 40 40 … … 108 108 109 109 // KeyBinder management 110 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!)111 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders112 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded113 std::string defaultFilename_; //! Name of the file with the default key bindings110 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!) 111 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders 112 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded 113 std::string defaultFilename_; //! Name of the file with the default key bindings 114 114 115 115 // keybind command related 116 SharedPtr<LuaFunctor> callbackFunction_;//! Function to be called when key was pressed after "keybind" command117 bool bBinding_; //! Tells whether a key binding process is active118 bool bTemporary_; //! Stores tkeybind/keybind value119 std::string command_; //! Stores the command received by (t)keybind116 std::shared_ptr<LuaFunctor> callbackFunction_; //! Function to be called when key was pressed after "keybind" command 117 bool bBinding_; //! Tells whether a key binding process is active 118 bool bTemporary_; //! Stores tkeybind/keybind value 119 std::string command_; //! Stores the command received by (t)keybind 120 120 121 121 static KeyBinderManager* singletonPtr_s; -
code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc
r10821 r10829 41 41 #include "util/Output.h" 42 42 #include "util/StringUtils.h" 43 #include "util/SharedPtr.h"44 43 45 44 namespace orxonox … … 81 80 } 82 81 83 /*static*/ SharedPtr<OutputManager>& OutputManager::Testing::getInstancePointer()84 { 85 static SharedPtr<OutputManager> instance(new OutputManager());82 /*static*/ std::shared_ptr<OutputManager>& OutputManager::Testing::getInstancePointer() 83 { 84 static std::shared_ptr<OutputManager> instance(new OutputManager()); 86 85 return instance; 87 86 } -
code/branches/cpp11_v2/src/libraries/util/output/OutputManager.h
r10817 r10829 41 41 #include <vector> 42 42 #include <map> 43 #include <memory> 43 44 44 45 #include "OutputDefinitions.h" … … 137 138 struct _UtilExport Testing 138 139 { 139 static SharedPtr<OutputManager>& getInstancePointer();140 static std::shared_ptr<OutputManager>& getInstancePointer(); 140 141 }; 141 142 }; -
code/branches/cpp11_v2/test/util/output/ConsoleWriterTest.cc
r10765 r10829 3 3 #include "util/output/ConsoleWriter.h" 4 4 #include "util/output/OutputManager.h" 5 #include "util/SharedPtr.h"6 5 7 6 namespace orxonox … … 16 15 { 17 16 // reset output manager 18 OutputManager::Testing::getInstancePointer() = new OutputManager();17 OutputManager::Testing::getInstancePointer().reset(new OutputManager()); 19 18 } 20 19 -
code/branches/cpp11_v2/test/util/output/LogWriterTest.cc
r10624 r10829 4 4 #include "util/Convert.h" 5 5 #include "util/output/OutputManager.h" 6 #include "util/SharedPtr.h"7 6 8 7 namespace orxonox … … 24 23 { 25 24 // reset output manager 26 OutputManager::Testing::getInstancePointer() = new OutputManager();25 OutputManager::Testing::getInstancePointer().reset(new OutputManager()); 27 26 } 28 27 -
code/branches/cpp11_v2/test/util/output/MemoryWriterTest.cc
r10624 r10829 4 4 #include "util/output/MemoryWriter.h" 5 5 #include "util/output/OutputManager.h" 6 #include "util/SharedPtr.h"7 6 8 7 namespace orxonox … … 23 22 { 24 23 // reset output manager 25 OutputManager::Testing::getInstancePointer() = new OutputManager();24 OutputManager::Testing::getInstancePointer().reset(new OutputManager()); 26 25 } 27 26 -
code/branches/cpp11_v2/test/util/output/OutputListenerTest.cc
r9545 r10829 3 3 #include "util/output/OutputListener.h" 4 4 #include "util/output/OutputManager.h" 5 #include "util/SharedPtr.h"6 5 7 6 namespace orxonox … … 342 341 { 343 342 this->manager_ = new MockOutputManager(); 344 OutputManager::Testing::getInstancePointer() = this->manager_;343 OutputManager::Testing::getInstancePointer().reset(this->manager_); 345 344 } 346 345 347 346 virtual void TearDown() 348 347 { 349 OutputManager::Testing::getInstancePointer() = new OutputManager();348 OutputManager::Testing::getInstancePointer().reset(new OutputManager()); 350 349 } 351 350 -
code/branches/cpp11_v2/test/util/output/OutputStreamTest.cc
r9547 r10829 8 8 #include "util/output/OutputManager.h" 9 9 #include "util/output/MemoryWriter.h" 10 #include "util/SharedPtr.h"11 10 12 11 namespace orxonox … … 88 87 { 89 88 this->manager_ = new MockOutputManager(); 90 OutputManager::Testing::getInstancePointer() = this->manager_;89 OutputManager::Testing::getInstancePointer().reset(this->manager_); 91 90 } 92 91 93 92 virtual void TearDown() 94 93 { 95 OutputManager::Testing::getInstancePointer() = new OutputManager();94 OutputManager::Testing::getInstancePointer().reset(new OutputManager()); 96 95 } 97 96
Note: See TracChangeset
for help on using the changeset viewer.