1#ifndef ROSE_FormattedTable_H
2#define ROSE_FormattedTable_H
5#include <boost/lexical_cast.hpp>
88 std::vector<std::vector<std::string>> cells_;
89 std::vector<std::vector<CellProperties>> props_;
90 std::vector<std::vector<std::string>> columnHeaders_;
91 std::vector<std::vector<CellProperties>> columnHeaderProps_;
92 std::string indentation_;
158 void insert(
size_t rowIdx,
size_t columnIdx,
const std::string &repr);
160 template<
typename T>
void insert(
size_t rowIdx,
size_t columnIdx,
const T &value) {
161 insert(rowIdx, columnIdx, boost::lexical_cast<std::string>(value));
163 template<
typename T>
void insert(
size_t rowIdx,
size_t columnIdx,
const T &value,
const CellProperties &prop) {
164 insert(rowIdx, columnIdx, boost::lexical_cast<std::string>(value), prop);
169 const std::string&
get(
size_t rowIdx,
size_t colIdx)
const;
201 const std::string&
columnHeader(
size_t rowIdx,
size_t columnIdx)
const;
202 void columnHeader(
size_t rowIdx,
size_t columnIdx,
const std::string &title);
225 void printHorizontalRule(std::ostream&,
const std::vector<size_t> &widths)
const;
226 void printRow(std::ostream&,
const std::vector<size_t> &widths,
const std::vector<CellProperties> &props,
227 const std::vector<std::string> &row)
const;
228 std::vector<size_t> computeColumnWidths()
const;
Holds a value or nothing.