Changes in src/errorlogger.cpp [ed58ad:c5f836]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/errorlogger.cpp
red58ad rc5f836 9 9 #include "errorlogger.hpp" 10 10 #include "verbose.hpp" 11 #include "Patterns/Singleton_impl.hpp"12 11 13 12 ofstream null("/dev/null"); 13 14 errorLogger* errorLogger::instance = NULL; 14 15 int errorLogger::verbosity = 2; 15 16 ostream* errorLogger::nix = &null; … … 22 23 errorLogger::errorLogger() 23 24 { 25 instance = NULL; 24 26 verbosity = 2; 25 27 }; … … 32 34 } 33 35 34 CONSTRUCT_SINGLETON(errorLogger) 36 /** 37 * Returns the singleton errorLogger instance. 38 * 39 * \return errorLogger instance 40 */ 41 errorLogger* errorLogger::getInstance() { 42 if (instance == NULL) { 43 instance = new errorLogger(); 44 } 45 46 return instance; 47 } 48 49 50 /** 51 * Purges the current errorLogger instance. 52 */ 53 void errorLogger::purgeInstance() { 54 if (instance != NULL) { 55 delete instance; 56 } 57 58 instance = NULL; 59 } 35 60 36 61 /**
Note:
See TracChangeset
for help on using the changeset viewer.