UtilsLite
Utilities for C++ programming
Loading...
Searching...
No Matches
Utils::Table::Row Class Reference

Represents a row in a table consisting of multiple cells. More...

#include <Table.hxx>

Public Member Functions

 Row ()=default
 Default constructor for an empty row.
 
 Row (Table *table, vecstr const &cells=vecstr())
 Constructs a row with a set of initial cell values.
 
Table const * table () const
 
void cells (vecstr const &cells)
 
integer num_cells () const
 
integer cell_width (integer idx) const
 
void cell_col_span (integer idx, integer span)
 
void cell (string_view value)
 
Cell const & operator[] (integer idx) const
 
Celloperator[] (integer idx)
 
integer height () const
 
string render () const
 

Protected Types

using vecCell = vector<Cell>
 
using vecstr = vector<string>
 

Protected Attributes

Tablem_Table = nullptr
 
vecCell m_Cells
 

Detailed Description

Represents a row in a table consisting of multiple cells.

The Row class manages a collection of cells that form a single row in the table. Each cell in the row can be accessed, modified, and rendered individually.

Member Typedef Documentation

◆ vecCell

using Utils::Table::Row::vecCell = vector<Cell>
protected

◆ vecstr

using Utils::Table::Row::vecstr = vector<string>
protected

Constructor & Destructor Documentation

◆ Row() [1/2]

Utils::Table::Row::Row ( )
default

Default constructor for an empty row.

◆ Row() [2/2]

Utils::Table::Row::Row ( Table * table,
vecstr const & cells = vecstr() )
explicit

Constructs a row with a set of initial cell values.

Parameters
tablePointer to the table containing the row.
cellsA vector of strings representing initial cell values.

Member Function Documentation

◆ cell()

void Utils::Table::Row::cell ( string_view value)

◆ cell_col_span()

void Utils::Table::Row::cell_col_span ( integer idx,
integer span )

◆ cell_width()

integer Utils::Table::Row::cell_width ( integer idx) const

◆ cells()

void Utils::Table::Row::cells ( vecstr const & cells)

◆ height()

integer Utils::Table::Row::height ( ) const

◆ num_cells()

integer Utils::Table::Row::num_cells ( ) const
inline

◆ operator[]() [1/2]

Cell & Utils::Table::Row::operator[] ( integer idx)
inline

◆ operator[]() [2/2]

Cell const & Utils::Table::Row::operator[] ( integer idx) const
inline

◆ render()

string Utils::Table::Row::render ( ) const

◆ table()

Table const * Utils::Table::Row::table ( ) const
inline

Member Data Documentation

◆ m_Cells

vecCell Utils::Table::Row::m_Cells
protected

◆ m_Table

Table* Utils::Table::Row::m_Table = nullptr
protected

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