MyGUI  3.2.1
MyGUI_LogSource.h
Go to the documentation of this file.
1 /*
2  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3  * Distributed under the MIT License
4  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5  */
6 
7 #ifndef __MYGUI_LOG_SOURCE_H__
8 #define __MYGUI_LOG_SOURCE_H__
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_ILogFilter.h"
12 #include "MyGUI_ILogListener.h"
13 #include <vector>
14 
15 namespace MyGUI
16 {
17 
19  {
20  public:
21  LogSource();
22  ~LogSource();
23 
25  void setLogFilter(ILogFilter* _filter);
27  void addLogListener(ILogListener* _lestener);
28 
30  void open();
32  void close();
34  void flush();
36  void log(const std::string& _section, LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line);
37 
38  private:
39  typedef std::vector<ILogListener*> VectorLogListeners;
40  VectorLogListeners mListeners;
41  ILogFilter* mFilter;
42  };
43 
44 } // namespace MyGUI
45 
46 #endif // __MYGUI_LOG_SOURCE_H__