MyGUI: MyGUI_LogStream.h Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

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 <cstring>
12#include <sstream>
13
14namespace 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 << (const 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_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI::LogStream
Definition MyGUI_LogStream.h:18
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::LogStream::End
Definition MyGUI_LogStream.h:20