46 #ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
47 #define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
51 #include "gtest/internal/gtest-port.h"
55 void operator<<(
const testing::internal::Secret&,
int);
89 typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
97 *ss_ << msg.GetString();
101 explicit Message(
const char* str) : ss_(new ::std::stringstream) {
107 template <
typename T>
108 inline Message& operator <<(
const T& value) {
114 template <
typename T>
115 inline Message& operator <<(
const T& val) {
148 template <
typename T>
149 inline Message& operator <<(T*
const& pointer) {
150 if (pointer == NULL) {
157 #endif // GTEST_OS_SYMBIAN
165 Message& operator <<(BasicNarrowIoManip val) {
172 return *
this << (b ?
"true" :
"false");
177 Message& operator <<(
const wchar_t* wide_c_str);
178 Message& operator <<(
wchar_t* wide_c_str);
180 #if GTEST_HAS_STD_WSTRING
183 Message& operator <<(const ::std::wstring& wstr);
184 #endif // GTEST_HAS_STD_WSTRING
186 #if GTEST_HAS_GLOBAL_WSTRING
189 Message& operator <<(const ::wstring& wstr);
190 #endif // GTEST_HAS_GLOBAL_WSTRING
196 std::string GetString()
const;
205 template <
typename T>
207 if (pointer == NULL) {
213 template <
typename T>
221 #endif // GTEST_OS_SYMBIAN
228 void operator=(
const Message&);
232 inline std::ostream& operator <<(std::ostream& os,
const Message& sb) {
233 return os << sb.GetString();
242 template <
typename T>
243 std::string StreamableToString(
const T& streamable) {
244 return (Message() << streamable).GetString();
250 #endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_