Changeset 9533 for code/branches/testing/src/libraries/util/output
- Timestamp:
- Mar 2, 2013, 7:15:37 PM (12 years ago)
- Location:
- code/branches/testing/src/libraries/util/output
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/testing/src/libraries/util/output/OutputManager.cc
r9530 r9533 39 39 #include "util/Output.h" 40 40 #include "util/StringUtils.h" 41 #include "util/SharedPtr.h" 41 42 42 43 namespace orxonox … … 61 62 } 62 63 64 /*static*/ SharedPtr<OutputManager>& OutputManager::Testing::getInstancePointer() 65 { 66 static SharedPtr<OutputManager> instance(new OutputManager()); 67 return instance; 68 } 69 63 70 /** 64 71 @brief Returns the only existing instance of the OutputManager singleton. … … 66 73 /*static*/ OutputManager& OutputManager::getInstance() 67 74 { 68 static OutputManager instance; 69 return instance; 75 return *OutputManager::Testing::getInstancePointer(); 70 76 } 71 77 -
code/branches/testing/src/libraries/util/output/OutputManager.h
r9530 r9533 65 65 { 66 66 public: 67 OutputManager(); 68 OutputManager(const OutputManager&); 69 virtual ~OutputManager(); 70 67 71 static OutputManager& getInstance(); 68 72 static OutputManager& getInstanceAndCreateListeners(); … … 70 74 void pushMessage(OutputLevel level, const OutputContextContainer& context, const std::string& message); 71 75 72 v oid registerListener(OutputListener* listener);73 v oid unregisterListener(OutputListener* listener);76 virtual void registerListener(OutputListener* listener); 77 virtual void unregisterListener(OutputListener* listener); 74 78 75 79 virtual void updatedLevelMask(const OutputListener* listener) … … 103 107 104 108 private: 105 OutputManager();106 OutputManager(const OutputManager&);107 ~OutputManager();108 109 109 void updateMasks(); 110 110 void updateCombinedLevelMask(); … … 121 121 std::map<std::string, OutputContextContainer> contextContainers_; ///< Contains all contexts including sub-contexts and their containers 122 122 OutputContextSubID subcontextCounter_; ///< Counts the number of sub-contexts (and generates their IDs) 123 124 public: 125 struct _UtilExport Testing 126 { 127 static SharedPtr<OutputManager>& getInstancePointer(); 128 }; 123 129 }; 124 130 }
Note: See TracChangeset
for help on using the changeset viewer.