MyGUI: MyGUI_LogStream.h Source File

MyGUI 3.4.3

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 };
23
24 public:
25 std::string operator<<(const End& /*_endl*/)
26 {
27 return mStream.str();
28 }
29
30 template<typename T>
31 LogStream& operator<<(const T& _value)
32 {
33 mStream << _value;
34 return *this;
35 }
36
37 private:
38 std::ostringstream mStream;
39 };
40
41} // namespace MyGUI
42
43#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::LogStream::operator<<
std::string operator<<(const End &)
Definition MyGUI_LogStream.h:25
MyGUI::LogStream::operator<<
LogStream & operator<<(const T &_value)
Definition MyGUI_LogStream.h:31
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::LogStream::End
Definition MyGUI_LogStream.h:21