source: GTP/trunk/Lib/Vis/Preprocessing/src/LogManager.cpp @ 1004

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
4using namespace std;
5
6namespace GtpVisibilityPreprocessor {
7
8LogManager *LogManager::sLogManager = NULL;
9
10
11LogManager *LogManager::GetSingleton()
12{
13        if (!sLogManager)
14        {
15                sLogManager = new LogManager();
16        }
17
18        return sLogManager;
19}
20
21
22void LogManager::DelSingleton()
23{
24        DEL_PTR(sLogManager);
25}
26
27
28LogManager::LogManager()
29{
30        mOutStream.open("preprocessor.log");
31}
32
33
34void LogManager::LogMessage(const string &str)
35{
36        mOutStream << str.c_str();
37}
38
39}
Note: See TracBrowser for help on using the repository browser.