Lines Matching refs:os

60                                 size_t count, ostream* os) {
68 *os << ' ';
70 *os << '-';
73 *os << text;
79 ostream* os) {
81 *os << count << "-byte object <";
90 PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
92 PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
93 *os << " ... ";
96 PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
98 *os << ">";
111 ostream* os) {
112 PrintBytesInObjectToImpl(obj_bytes, count, os);
142 static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
145 *os << "\\0";
148 *os << "\\'";
151 *os << "\\\\";
154 *os << "\\a";
157 *os << "\\b";
160 *os << "\\f";
163 *os << "\\n";
166 *os << "\\r";
169 *os << "\\t";
172 *os << "\\v";
176 *os << static_cast<char>(c);
179 *os << "\\x" + String::FormatHexInt(static_cast<UnsignedChar>(c));
188 static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) {
191 *os << "'";
194 *os << "\\\"";
197 return PrintAsCharLiteralTo<wchar_t>(c, os);
203 static CharFormat PrintAsStringLiteralTo(char c, ostream* os) {
205 static_cast<wchar_t>(static_cast<unsigned char>(c)), os);
213 void PrintCharAndCodeTo(Char c, ostream* os) {
215 *os << ((sizeof(c) > 1) ? "L'" : "'");
216 const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
217 *os << "'";
224 *os << " (" << static_cast<int>(c);
232 *os << ", 0x" << String::FormatHexInt(static_cast<UnsignedChar>(c));
234 *os << ")";
237 void PrintTo(unsigned char c, ::std::ostream* os) {
238 PrintCharAndCodeTo<unsigned char>(c, os);
240 void PrintTo(signed char c, ::std::ostream* os) {
241 PrintCharAndCodeTo<unsigned char>(c, os);
246 void PrintTo(wchar_t wc, ostream* os) {
247 PrintCharAndCodeTo<wchar_t>(wc, os);
256 const CharType* begin, size_t len, ostream* os) {
258 *os << kQuoteBegin;
266 *os << "\" " << kQuoteBegin;
268 is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;
270 *os << "\"";
277 const CharType* begin, size_t len, ostream* os) {
286 PrintCharsAsStringTo(begin, len - 1, os);
294 PrintCharsAsStringTo(begin, len, os);
295 *os << " (no terminating NUL)";
299 void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
300 UniversalPrintCharArray(begin, len, os);
305 void UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) {
306 UniversalPrintCharArray(begin, len, os);
310 void PrintTo(const char* s, ostream* os) {
312 *os << "NULL";
314 *os << ImplicitCast_<const void*>(s) << " pointing to ";
315 PrintCharsAsStringTo(s, strlen(s), os);
327 void PrintTo(const wchar_t* s, ostream* os) {
329 *os << "NULL";
331 *os << ImplicitCast_<const void*>(s) << " pointing to ";
332 PrintCharsAsStringTo(s, wcslen(s), os);
339 void PrintStringTo(const ::string& s, ostream* os) {
340 PrintCharsAsStringTo(s.data(), s.size(), os);
344 void PrintStringTo(const ::std::string& s, ostream* os) {
345 PrintCharsAsStringTo(s.data(), s.size(), os);
350 void PrintWideStringTo(const ::wstring& s, ostream* os) {
351 PrintCharsAsStringTo(s.data(), s.size(), os);
356 void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
357 PrintCharsAsStringTo(s.data(), s.size(), os);