MyGUI 3.2.2

MyGUI_LogStream.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_STREAM_H_
8 #define MYGUI_LOG_STREAM_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include <string.h>
12 #include <sstream>
13
14 namespace MyGUI
15 {
16
17 class MYGUI_EXPORT LogStream
18 {
19 public:
20 struct End { };
21
22 public:
23 std::string operator << (const End& _endl)
24 {
25 return mStream.str();
26 }
27
28 template <typename T>
29 LogStream& operator << (T _value)
30 {
31 mStream << _value;
32 return *this;
33 }
34
35 private:
36 std::ostringstream mStream;
37 };
38
39 } // namespace MyGUI
40
41 #endif // MYGUI_LOG_STREAM_H_
MyGUI_Prerequest.h
MyGUI::LogStream
Definition: MyGUI_LogStream.h:17
MyGUI::LogStream::End
Definition: MyGUI_LogStream.h:20
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103