Revision 1004,
527 bytes
checked in by mattausch, 19 years ago
(diff) |
environment as a singleton
|
Line | |
---|
1 | #include "LogManager.h"
|
---|
2 | #include "common.h"
|
---|
3 |
|
---|
4 | using namespace std;
|
---|
5 |
|
---|
6 | namespace GtpVisibilityPreprocessor {
|
---|
7 |
|
---|
8 | LogManager *LogManager::sLogManager = NULL;
|
---|
9 |
|
---|
10 |
|
---|
11 | LogManager *LogManager::GetSingleton()
|
---|
12 | {
|
---|
13 | if (!sLogManager)
|
---|
14 | {
|
---|
15 | sLogManager = new LogManager();
|
---|
16 | }
|
---|
17 |
|
---|
18 | return sLogManager;
|
---|
19 | }
|
---|
20 |
|
---|
21 |
|
---|
22 | void LogManager::DelSingleton()
|
---|
23 | {
|
---|
24 | DEL_PTR(sLogManager);
|
---|
25 | }
|
---|
26 |
|
---|
27 |
|
---|
28 | LogManager::LogManager()
|
---|
29 | {
|
---|
30 | mOutStream.open("preprocessor.log");
|
---|
31 | }
|
---|
32 |
|
---|
33 |
|
---|
34 | void LogManager::LogMessage(const string &str)
|
---|
35 | {
|
---|
36 | mOutStream << str.c_str();
|
---|
37 | }
|
---|
38 |
|
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.