MyGUI_LogStream.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_LOG_STREAM_H_
#define MYGUI_LOG_STREAM_H_
#include "MyGUI_Prerequest.h"
#include <cstring>
#include <sstream>
namespace MyGUI
{
class MYGUI_EXPORT LogStream
{
public:
struct End
{
};
public:
std::string operator<<(const End& /*_endl*/)
{
return mStream.str();
}
template<typename T>
LogStream& operator<<(const T& _value)
{
mStream << _value;
return *this;
}
private:
std::ostringstream mStream;
};
} // namespace MyGUI
#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