Changeset 8776 for code/branches/output/src/libraries
- Timestamp:
- Jul 25, 2011, 1:05:04 PM (13 years ago)
- Location:
- code/branches/output/src/libraries/util/output
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/util/output/LogWriter.cc
r8774 r8776 83 83 84 84 if (this->bDefaultPath_) 85 OutputManager::getInstance Internal().pushMessage(level::user_info, context::output, "Opening log file " + name);85 OutputManager::getInstance().pushMessage(level::user_info, context::output, "Opening log file " + name); 86 86 87 87 this->file_.open(name.c_str(), std::fstream::out); -
code/branches/output/src/libraries/util/output/OutputListener.cc
r8765 r8776 40 40 this->contextMask_ = context::all; 41 41 42 OutputManager::getInstance Internal().registerListener(this);42 OutputManager::getInstance().registerListener(this); 43 43 } 44 44 45 45 OutputListener::~OutputListener() 46 46 { 47 OutputManager::getInstance Internal().unregisterListener(this);47 OutputManager::getInstance().unregisterListener(this); 48 48 } 49 49 … … 67 67 this->levelMask_ = mask; 68 68 69 OutputManager::getInstance Internal().updateCombinedLevelMask();69 OutputManager::getInstance().updateCombinedLevelMask(); 70 70 } 71 71 … … 74 74 this->contextMask_ = mask; 75 75 76 OutputManager::getInstance Internal().updateCombinedContextMask();76 OutputManager::getInstance().updateCombinedContextMask(); 77 77 } 78 78 } -
code/branches/output/src/libraries/util/output/OutputManager.cc
r8774 r8776 69 69 /*static*/ OutputManager& OutputManager::getInstance() 70 70 { 71 static OutputManager& instance = OutputManager::getInstanceInternal(); 71 static OutputManager instance; 72 return instance; 73 } 74 75 /*static*/ OutputManager& OutputManager::getInstanceAndCreateListeners() 76 { 77 static OutputManager& instance = OutputManager::getInstance(); 72 78 73 79 static ConsoleOutput consoleOutputInstance; … … 75 81 static LogWriter& logWriterInstance = LogWriter::getInstance(); (void)logWriterInstance; 76 82 77 return instance;78 }79 80 /*static*/ OutputManager& OutputManager::getInstanceInternal()81 {82 static OutputManager instance;83 83 return instance; 84 84 } -
code/branches/output/src/libraries/util/output/OutputManager.h
r8774 r8776 48 48 public: 49 49 static OutputManager& getInstance(); 50 static OutputManager& getInstance Internal();50 static OutputManager& getInstanceAndCreateListeners(); 51 51 52 52 void pushMessage(OutputLevel level, OutputContext context, const std::string& message); -
code/branches/output/src/libraries/util/output/OutputStream.cc
r8765 r8776 44 44 void OutputStream::sendMessage() 45 45 { 46 OutputManager::getInstance ().pushMessage(this->level_, this->context_, this->str());46 OutputManager::getInstanceAndCreateListeners().pushMessage(this->level_, this->context_, this->str()); 47 47 this->str(""); 48 48 } … … 53 53 this->context_ = context; 54 54 55 this->bAcceptsOutput_ = OutputManager::getInstance ().acceptsOutput(level, context);55 this->bAcceptsOutput_ = OutputManager::getInstanceAndCreateListeners().acceptsOutput(level, context); 56 56 } 57 57 }
Note: See TracChangeset
for help on using the changeset viewer.