Changes in src/errorlogger.cpp [c5f836:ed58ad]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/errorlogger.cpp
rc5f836 red58ad 9 9 #include "errorlogger.hpp" 10 10 #include "verbose.hpp" 11 #include "Patterns/Singleton_impl.hpp" 11 12 12 13 ofstream null("/dev/null"); 13 14 errorLogger* errorLogger::instance = NULL;15 14 int errorLogger::verbosity = 2; 16 15 ostream* errorLogger::nix = &null; … … 23 22 errorLogger::errorLogger() 24 23 { 25 instance = NULL;26 24 verbosity = 2; 27 25 }; … … 34 32 } 35 33 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 } 34 CONSTRUCT_SINGLETON(errorLogger) 60 35 61 36 /**
Note:
See TracChangeset
for help on using the changeset viewer.