MyGUI 3.4.1
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
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_
#define MYGUI_EXPORT