Revision 1112,
845 bytes
checked in by bittner, 18 years ago
(diff) |
Merge with Olivers code
|
Rev | Line | |
---|
[1001] | 1 | #ifndef _LogManager_H__
|
---|
| 2 | #define _LogManager_H__
|
---|
| 3 |
|
---|
| 4 | #include <vector>
|
---|
| 5 | #include <fstream>
|
---|
| 6 | #include <iostream>
|
---|
| 7 |
|
---|
| 8 | #include "Containers.h"
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | namespace GtpVisibilityPreprocessor {
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | /** Log manager controlling the debug output.
|
---|
| 15 | This class defines the pattern of singleton to assure that
|
---|
| 16 | there is always only one log manager.
|
---|
| 17 | */
|
---|
| 18 | class LogManager {
|
---|
| 19 |
|
---|
| 20 | public:
|
---|
| 21 |
|
---|
| 22 | /** Returns the resource manager as a singleton.
|
---|
| 23 | */
|
---|
| 24 | static LogManager *GetSingleton();
|
---|
| 25 |
|
---|
[1004] | 26 | static void DelSingleton();
|
---|
[1001] | 27 |
|
---|
| 28 | protected:
|
---|
| 29 |
|
---|
| 30 | /** Default constructor. The constructor is protected
|
---|
| 31 | to have control over instantiation using the
|
---|
| 32 | singleton pattern.
|
---|
| 33 | */
|
---|
| 34 | LogManager();
|
---|
| 35 |
|
---|
[1112] | 36 | ~LogManager() {}
|
---|
[1001] | 37 |
|
---|
| 38 | void LogMessage(const std::string &str);
|
---|
| 39 |
|
---|
| 40 | protected:
|
---|
| 41 |
|
---|
| 42 | std::ofstream mOutStream;
|
---|
| 43 |
|
---|
| 44 | private:
|
---|
| 45 |
|
---|
| 46 | static LogManager *sLogManager;
|
---|
| 47 |
|
---|
| 48 | };
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.