XBotInterface
2.4.1
XBotInterface provides a generic API to model and control a robot.
|
Go to the documentation of this file. 1 #ifndef BPRINTER_TABLE_PRINTER_H_
2 #define BPRINTER_TABLE_PRINTER_H_
34 TablePrinter(std::ostream * output,
const std::string & separator =
"|");
43 void AddColumn(
const std::string & header_name,
int column_width);
63 *out_stream_ << std::left;
65 *out_stream_ << std::right;
68 *out_stream_ << std::setw(column_widths_.at(j_))
72 *out_stream_ <<
"|\n";
76 *out_stream_ << separator_;
84 void PrintHorizontalLine();
86 template<
typename T>
void OutputDecimalNumber(T input);
88 std::ostream * out_stream_;
89 std::vector<std::string> column_headers_;
90 std::vector<int> column_widths_;
91 std::string separator_;
TablePrinter & operator<<(endl input)
Definition: table_printer.h:47
void set_separator(const std::string &separator)
Definition: table_printer.cpp:28
Definition: table_printer.h:12
~TablePrinter()
Definition: table_printer.cpp:16
TablePrinter & operator<<(T input)
Definition: table_printer.h:58
void PrintFooter()
Definition: table_printer.cpp:86
void AddColumn(const std::string &header_name, int column_width)
Add a column to our table.
Definition: table_printer.cpp:45
int get_table_width() const
Definition: table_printer.cpp:24
int get_num_columns() const
Definition: table_printer.cpp:20
void PrintHeader()
Definition: table_printer.cpp:65
Definition: table_printer.h:32
TablePrinter(std::ostream *output, const std::string &separator="|")
Definition: table_printer.cpp:7
void set_flush_left()
Definition: table_printer.cpp:32
void set_flush_right()
Definition: table_printer.cpp:36
Definition: table_printer.tpp.h:6