Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
uni20::display::streaming_table Class Reference

Schema-first table for progress output where rows are emitted immediately. More...

#include <display.hpp>

Public Member Functions

streaming_table & column (std::string heading, column_format format)
 Add a column whose width and alignment are inferred from its format.
 
streaming_table & column (std::string heading, column_width width_spec, column_format format)
 Add a column whose alignment is inferred from its format.
 
streaming_table & column (std::string heading, column_width width_spec=width::share(), presentation::table_alignment alignment=presentation::table_alignment::right, column_format format={})
 
streaming_table & column (std::string heading, presentation::table_alignment alignment)
 Add a flexible-width column with an explicit alignment.
 
streaming_table & column (std::string heading, presentation::table_alignment alignment, column_format format)
 Add a flexible-width column with explicit alignment and format.
 
streaming_table & header_separator (bool enabled=true)
 
streaming_table & output (sink destination, presentation::output_policy policy)
 Route this table through an instance-owned sink and policy, without changing global display routing.
 
void row (std::initializer_list< std::string > cells, std::source_location where=std::source_location::current())
 
void row (std::vector< formatted_cell > cells, std::source_location where=std::source_location::current())
 Emit preformatted cells without discarding their numeric alignment semantics.
 
void row (std::vector< presentation::styled_text > cells, std::source_location where=std::source_location::current())
 
void row (std::vector< std::string > cells, std::source_location where=std::source_location::current())
 
template<typename... Values>
void row (Values &&... values)
 
 streaming_table (std::string title={}, stream destination=stream::out)
 
streaming_table & wrap_width (std::size_t width)
 

Detailed Description

Schema-first table for progress output where rows are emitted immediately.

Switches to vertical key/value output when a cell marked keep_together cannot fit its column. Such cells are never split, even when one value exceeds the available terminal width.

Constructor & Destructor Documentation

◆ streaming_table()

uni20::display::streaming_table::streaming_table ( std::string  title = {},
stream  destination = stream::out 
)
explicit

Member Function Documentation

◆ column() [1/5]

streaming_table & uni20::display::streaming_table::column ( std::string  heading,
column_format  format 
)

Add a column whose width and alignment are inferred from its format.

Numeric formats use decimal alignment and non-greedy fit width. Text and automatic formats use shared width.

◆ column() [2/5]

streaming_table & uni20::display::streaming_table::column ( std::string  heading,
column_width  width_spec,
column_format  format 
)

Add a column whose alignment is inferred from its format.

◆ column() [3/5]

streaming_table & uni20::display::streaming_table::column ( std::string  heading,
column_width  width_spec = width::share(),
presentation::table_alignment  alignment = presentation::table_alignment::right,
column_format  format = {} 
)

◆ column() [4/5]

streaming_table & uni20::display::streaming_table::column ( std::string  heading,
presentation::table_alignment  alignment 
)

Add a flexible-width column with an explicit alignment.

◆ column() [5/5]

streaming_table & uni20::display::streaming_table::column ( std::string  heading,
presentation::table_alignment  alignment,
column_format  format 
)

Add a flexible-width column with explicit alignment and format.

◆ header_separator()

streaming_table & uni20::display::streaming_table::header_separator ( bool  enabled = true)

◆ output()

streaming_table & uni20::display::streaming_table::output ( sink  destination,
presentation::output_policy  policy 
)

Route this table through an instance-owned sink and policy, without changing global display routing.

◆ row() [1/5]

void uni20::display::streaming_table::row ( std::initializer_list< std::string >  cells,
std::source_location  where = std::source_location::current() 
)

◆ row() [2/5]

void uni20::display::streaming_table::row ( std::vector< formatted_cell >  cells,
std::source_location  where = std::source_location::current() 
)

Emit preformatted cells without discarding their numeric alignment semantics.

◆ row() [3/5]

void uni20::display::streaming_table::row ( std::vector< presentation::styled_text >  cells,
std::source_location  where = std::source_location::current() 
)

◆ row() [4/5]

void uni20::display::streaming_table::row ( std::vector< std::string >  cells,
std::source_location  where = std::source_location::current() 
)

◆ row() [5/5]

template<typename... Values>
void uni20::display::streaming_table::row ( Values &&...  values)

◆ wrap_width()

streaming_table & uni20::display::streaming_table::wrap_width ( std::size_t  width)

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