Lines Matching refs:os
58 inline void PrintLine(std::ostream &os, const std::vector<size_t> &widths)
60 os << "+";
62 os << std::setw(static_cast<int32_t>(width) + ELEMENT_SPACE_COUNT) << std::left << std::setfill('-')
65 os << std::setfill(' ') << std::endl;
68 inline void PrintCentered(std::ostream &os, const std::string &value, size_t width)
72 os << std::string(padding_left, ' ') << value << std::string(padding_right, ' ');
75 inline void PrintHeader(std::ostream &os, const std::vector<size_t> &widths, const std::vector<std::string> &titles)
77 os << "|";
79 os << " ";
80 PrintCentered(os, titles[i], widths[i]);
81 os << " |";
83 os << std::endl;
86 inline void PrintRow(std::ostream &os, const std::vector<size_t> &widths, const std::vector<std::string> &row)
88 os << "|";
90 os << " ";
91 PrintCentered(os, row[i], widths[i]);
92 os << " |";
94 os << std::endl;
97 inline void DumpFullTable(std::ostream &os, const std::string &tableName,
104 PrintCentered(os, tableName, lineWidth);
105 os << std::endl;
107 PrintLine(os, widths);
108 PrintHeader(os, widths, titles);
109 PrintLine(os, widths);
112 PrintRow(os, widths, row);
113 PrintLine(os, widths);