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 | */
|
---|
[2542] | 18 | class LogManager
|
---|
| 19 | {
|
---|
[1001] | 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 |
|
---|
[2542] | 36 | ~LogManager() {}
|
---|
| 37 |
|
---|
[1001] | 38 | void LogMessage(const std::string &str);
|
---|
| 39 |
|
---|
| 40 | protected:
|
---|
| 41 | std::ofstream mOutStream;
|
---|
| 42 |
|
---|
| 43 | private:
|
---|
| 44 | static LogManager *sLogManager;
|
---|
| 45 | };
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.