Lines Matching refs:os

68                                 size_t count, ostream* os) {
76 *os << ' ';
78 *os << '-';
81 *os << text;
87 ostream* os) {
89 *os << count << "-byte object <";
98 PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
100 PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
101 *os << " ... ";
104 PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
106 *os << ">";
119 ostream* os) {
120 PrintBytesInObjectToImpl(obj_bytes, count, os);
150 static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
153 *os << "\\0";
156 *os << "\\'";
159 *os << "\\\\";
162 *os << "\\a";
165 *os << "\\b";
168 *os << "\\f";
171 *os << "\\n";
174 *os << "\\r";
177 *os << "\\t";
180 *os << "\\v";
184 *os << static_cast<char>(c);
187 *os << String::Format("\\x%X", static_cast<UnsignedChar>(c));
196 static CharFormat PrintAsWideStringLiteralTo(wchar_t c, ostream* os) {
199 *os << "'";
202 *os << "\\\"";
205 return PrintAsCharLiteralTo<wchar_t>(c, os);
211 static CharFormat PrintAsNarrowStringLiteralTo(char c, ostream* os) {
212 return PrintAsWideStringLiteralTo(static_cast<unsigned char>(c), os);
220 void PrintCharAndCodeTo(Char c, ostream* os) {
222 *os << ((sizeof(c) > 1) ? "L'" : "'");
223 const CharFormat format = PrintAsCharLiteralTo<UnsignedChar>(c, os);
224 *os << "'";
231 *os << " (" << String::Format("%d", c).c_str();
239 *os << String::Format(", 0x%X",
242 *os << ")";
245 void PrintTo(unsigned char c, ::std::ostream* os) {
246 PrintCharAndCodeTo<unsigned char>(c, os);
248 void PrintTo(signed char c, ::std::ostream* os) {
249 PrintCharAndCodeTo<unsigned char>(c, os);
254 void PrintTo(wchar_t wc, ostream* os) {
255 PrintCharAndCodeTo<wchar_t>(wc, os);
261 static void PrintCharsAsStringTo(const char* begin, size_t len, ostream* os) {
262 *os << "\"";
270 *os << "\" \"";
272 is_previous_hex = PrintAsNarrowStringLiteralTo(cur, os) == kHexEscape;
274 *os << "\"";
278 void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
279 PrintCharsAsStringTo(begin, len, os);
286 ostream* os) {
287 *os << "L\"";
295 *os << "\" L\"";
297 is_previous_hex = PrintAsWideStringLiteralTo(cur, os) == kHexEscape;
299 *os << "\"";
303 void PrintTo(const char* s, ostream* os) {
305 *os << "NULL";
307 *os << ImplicitCast_<const void*>(s) << " pointing to ";
308 PrintCharsAsStringTo(s, strlen(s), os);
320 void PrintTo(const wchar_t* s, ostream* os) {
322 *os << "NULL";
324 *os << ImplicitCast_<const void*>(s) << " pointing to ";
325 PrintWideCharsAsStringTo(s, wcslen(s), os);
332 void PrintStringTo(const ::string& s, ostream* os) {
333 PrintCharsAsStringTo(s.data(), s.size(), os);
337 void PrintStringTo(const ::std::string& s, ostream* os) {
338 PrintCharsAsStringTo(s.data(), s.size(), os);
343 void PrintWideStringTo(const ::wstring& s, ostream* os) {
344 PrintWideCharsAsStringTo(s.data(), s.size(), os);
349 void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
350 PrintWideCharsAsStringTo(s.data(), s.size(), os);