Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Functions
display.cpp File Reference
#include "display.hpp"
#include <ios>
#include "terminal.hpp"
#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <mutex>
#include <optional>
#include <stdexcept>
#include <string_view>
#include <utility>
Include dependency graph for display.cpp:

Namespaces

namespace  uni20
 
namespace  uni20::display
 
namespace  uni20::display::format
 
namespace  uni20::display::width
 

Functions

sink uni20::display::current_sink ()
 Return a copy of the active display sink.
 
void uni20::display::emit (presentation::report_builder report, stream destination=stream::err, bool newline=true, std::source_location where=std::source_location::current())
 Emit a presentation report through the active display sink.
 
void uni20::display::emit (presentation::styled_text text, stream destination=stream::err, bool newline=true, std::source_location where=std::source_location::current())
 Emit styled text through the active display sink.
 
column_width uni20::display::width::fit (std::size_t minimum=1)
 Request a non-greedy column that starts at a minimum width and grows when row values need it.
 
column_format uni20::display::format::fixed (int precision, terminal::TerminalStyle style={})
 Format numeric values with fixed-point notation and the requested precision.
 
column_width uni20::display::width::fixed (std::size_t cells)
 Request an exact display-cell width for a streaming table column.
 
column_format uni20::display::format::general (int precision, terminal::TerminalStyle style={})
 Format numeric values with general notation and the requested precision.
 
column_format uni20::display::format::number (std::string pattern="{}", terminal::TerminalStyle style={})
 Treat column values as numeric and format them with a runtime fmt pattern.
 
void uni20::display::reset_sink ()
 Restore the default C++ terminal display sink.
 
column_format uni20::display::format::scientific (int precision, terminal::TerminalStyle style={})
 Format numeric values with scientific notation and the requested precision.
 
void uni20::display::set_sink (sink replacement)
 Replace the process-wide display sink.
 
column_width uni20::display::width::share (std::size_t weight=1, std::size_t minimum=1)
 Request a flexible streaming table column with the given share weight.
 
streaming_table uni20::display::table (std::string title={}, stream destination=stream::out)
 Create a schema-first streaming display table.
 
column_format uni20::display::format::text (terminal::TerminalStyle style={})
 Treat column values as text, optionally applying a style.
 

Variable Documentation

◆ continuation

bool continuation = false

◆ decimal_candidate

bool decimal_candidate = false

◆ decimal_exception

bool decimal_exception = false

◆ text

◆ width

std::size_t width = 0