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

Revision 1004, 842 bytes checked in by mattausch, 18 years ago (diff)

environment as a singleton

Line 
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
11namespace 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*/
18class LogManager {
19
20public:
21
22        /** Returns the resource manager as a singleton.
23        */
24        static LogManager *GetSingleton();
25
26        static void DelSingleton();
27
28protected:
29
30        /** Default constructor. The constructor is protected
31                to have control over instantiation using the
32                singleton pattern.
33        */
34        LogManager();
35
36        ~LogManager();
37 
38        void LogMessage(const std::string &str);
39
40protected:
41
42        std::ofstream mOutStream;
43
44private:
45
46        static LogManager *sLogManager;
47       
48};
49
50
51}
52
53#endif
Note: See TracBrowser for help on using the repository browser.