|
Evo C++ Library v0.5.1
|
#include <evo/fmt.h>
Text table formatter.
add_*() methods to add columnscolumn_*() methods to custom current columnsOutput formats (see Type enum):
Classes | |
| struct | CachedWriter |
| Used to write formatted output with caching (used internally). More... | |
| struct | Column |
| Column information. More... | |
| struct | Writer |
| Used to write formatted output (used internally). More... | |
Public Types | |
| enum | Type { tTEXT, tMARKDOWN } |
| Formatting type to use. More... | |
Public Member Functions | |
| FmtTable () | |
| Constructor. More... | |
| FmtTable (const Column *cols, SizeT size) | |
| Constructor calling add_columns(). More... | |
| FmtTable (const StringBase *names, SizeT size, int minwidth=0, FmtAlign align=fLEFT) | |
| Constructor calling add_columns(). More... | |
| FmtTable (const FmtTable &src) | |
| Copy constructor. More... | |
| FmtTable & | add_column (const Column &column) |
| Add column to table. More... | |
| FmtTable & | add_column (const StringBase &name, FmtAlign align=fLEFT, int width=0) |
| Add column to table. More... | |
| FmtTable & | add_column (const StringBase &name, int width) |
| Add column to table. More... | |
| FmtTable & | add_columns (const Column *cols, SizeT size) |
| Add multiple columns to table. More... | |
| FmtTable & | add_columns (const StringBase *names, SizeT size, int minwidth=0, FmtAlign align=fLEFT) |
| Add multiple columns to table. More... | |
| FmtTable & | column_align (SizeT index, FmtAlign align) |
| Set align value for column at given index. More... | |
| FmtTable & | column_minsize (SizeT index, int width) |
| Update minimum width for column at given index. More... | |
| FmtTable & | column_reset () |
| Reset column information to defaults. More... | |
| FmtTable & | operator= (const FmtTable &src) |
| Assignment operator. More... | |
Public Attributes | |
| List< Column > | columns |
| Column information More... | |
| enum Type |
|
inline |
Constructor.
Constructor calling add_columns().
| cols | Pointer to Column array to add from |
| size | Number of columns to add, 0 to stop on empty name |
|
inline |
Constructor calling add_columns().
| names | Pointer to array of strings to use for column names |
| size | Number of columns to add, 0 to stop on empty name |
| minwidth | Minimum width to use for all added columns |
| align | Alignment to use for all added columns |
Add column to table.
| column | Column to add |
|
inline |
Add column to table.
| name | Column name |
| align | Column alignment |
| width | Column minimum width |
|
inline |
Add column to table.
| name | Column name |
| width | Column minimum width |
Add multiple columns to table.
| cols | Pointer to Column array to add from |
| size | Number of columns to add, 0 to stop on empty name |
|
inline |
Add multiple columns to table.
| names | Pointer to array of strings to use for column names |
| size | Number of columns to add, 0 to stop on empty name |
| minwidth | Minimum width to use for all added columns |
| align | Alignment to use for all added columns |
Set align value for column at given index.
| index | Column index |
| align | Alignment value |
Update minimum width for column at given index.
| index | Column index |
| width | Minimum width to use |
|
inline |
Reset column information to defaults.
Assignment operator.
| src | Source to copy |
1.8.13