A toolkit for working with phylogenetic data.
v0.24.0
TableLayout Struct Reference

#include <genesis/utils/text/table.hpp>

Detailed Description

Definition at line 245 of file utils/text/table.hpp.

Public Member Functions

Binder operator() (Table const &table)
 Functional operator that allows to bind a TableLayout to a Table so that they can be used in one ostream command. More...
 

Public Attributes

Line bottom
 
Line header
 
Line row
 
Line separator
 
Line top
 

Classes

struct  Binder
 Helper struct to bind a layout to a table. More...
 
struct  Line
 One line of the TableLayout. More...
 

Member Function Documentation

◆ operator()()

TableLayout::Binder operator() ( Table const &  table)

Functional operator that allows to bind a TableLayout to a Table so that they can be used in one ostream command.

Using this function makes outputting a Table to some stream easier when using layouts:

Table t;
TableLayout f;
// Fill t and set f.
std::cout << f(t);

or even simpler, create a TableLayout from one of the predefined settings on the fly:

Table t;
// Fill t.
std::cout << simple_layout(true)(t);

This function is thus a handy shortcut to avoid using the Table write functions directly.

Definition at line 430 of file utils/text/table.cpp.

Member Data Documentation

◆ bottom

Line bottom

Definition at line 309 of file utils/text/table.hpp.

◆ header

Line header

Definition at line 306 of file utils/text/table.hpp.

◆ row

Line row

Definition at line 308 of file utils/text/table.hpp.

◆ separator

Line separator

Definition at line 307 of file utils/text/table.hpp.

◆ top

Line top

Definition at line 305 of file utils/text/table.hpp.


The documentation for this struct was generated from the following files: