GEOS
Public Member Functions | Public Attributes | List of all members
geos::TableLayout::Column Class Reference

Class representing a column in a table layout. More...

#include <TableLayout.hpp>

Public Member Functions

 Column ()
 Default constructor. Initializes a column with default values.
 
 Column (TableLayout::CellLayout cellLayout)
 Constructor to initialize a column with a specific CellLayout. More...
 
ColumngetParent ()
 Get the parent column. More...
 
void setParent (Column *parent)
 Set the parent column. More...
 
ColumngetNextCell ()
 GGet the next column in the layout. More...
 
void setNextCell (Column *nextCell)
 Set the next column in the layout. More...
 
ColumnsetName (string_view name)
 Sets the name of the column. More...
 
ColumnsetVisibility (CellType celltype)
 Set the column visibility. More...
 
TableLayout::ColumnaddSubColumns (std::initializer_list< TableLayout::Column > subCol)
 Adds multiple sub-columns to the column. More...
 
TableLayout::ColumnaddSubColumns (std::initializer_list< string > subColName)
 Adds multiple sub-columns to the column. More...
 
TableLayout::ColumnaddSubColumns (string const &subColName)
 Adds a single sub-column to the column. More...
 
TableLayout::ColumnsetHeaderAlignment (Alignment headerAlignment)
 Sets the header alignment for the column. More...
 
TableLayout::ColumnsetValuesAlignment (Alignment valueAlignment)
 Sets the values alignment for the column. More...
 
size_t getNumberCellMerge ()
 
void incrementMergeHeaderCount (size_t value)
 Increment number of times we will divide the current cell. More...
 
void decrementMergeHeaderCount ()
 Decremente number of times we will divide the current cell.
 
bool hasChild () const
 Checks if the column has any child columns. More...
 
bool hasParent () const
 Checks if the column has a parent column. More...
 

Public Attributes

CellLayout m_header
 The header cell layout.
 
std::vector< Columnm_subColumn
 A vector containing all sub-columns in the column.
 
ColumnAlignement m_alignment
 struct containing m_alignment for the column (header and values)
 

Detailed Description

Class representing a column in a table layout.

Definition at line 101 of file TableLayout.hpp.

Constructor & Destructor Documentation

◆ Column()

geos::TableLayout::Column::Column ( TableLayout::CellLayout  cellLayout)

Constructor to initialize a column with a specific CellLayout.

Parameters
cellLayoutThe CellLayout object to initialize the column.

Member Function Documentation

◆ addSubColumns() [1/3]

TableLayout::Column& geos::TableLayout::Column::addSubColumns ( std::initializer_list< string subColName)

Adds multiple sub-columns to the column.

Parameters
subColNameA list of sub-column names to add.
Returns
The current column object

◆ addSubColumns() [2/3]

TableLayout::Column& geos::TableLayout::Column::addSubColumns ( std::initializer_list< TableLayout::Column subCol)

Adds multiple sub-columns to the column.

Parameters
subColA list of sub-column names to add.
Returns
The current column object

◆ addSubColumns() [3/3]

TableLayout::Column& geos::TableLayout::Column::addSubColumns ( string const &  subColName)

Adds a single sub-column to the column.

Parameters
subColNameThe name of the sub-column to add.
Returns
The current column object.

◆ getNextCell()

Column* geos::TableLayout::Column::getNextCell ( )
inline

GGet the next column in the layout.

Returns
Pointer to the next column or nullptr if no next column exists.

Definition at line 142 of file TableLayout.hpp.

◆ getNumberCellMerge()

size_t geos::TableLayout::Column::getNumberCellMerge ( )
inline
Returns
number of times we will divide the current cell

Definition at line 204 of file TableLayout.hpp.

◆ getParent()

Column* geos::TableLayout::Column::getParent ( )
inline

Get the parent column.

Returns
Pointer to the parent column, or nullptr if no parent is set.

Definition at line 128 of file TableLayout.hpp.

◆ hasChild()

bool geos::TableLayout::Column::hasChild ( ) const
inline

Checks if the column has any child columns.

Returns
bool True if the column has child columns, otherwise false.

Definition at line 224 of file TableLayout.hpp.

◆ hasParent()

bool geos::TableLayout::Column::hasParent ( ) const
inline

Checks if the column has a parent column.

Returns
bool True if the column has a parent, otherwise false.

Definition at line 231 of file TableLayout.hpp.

◆ incrementMergeHeaderCount()

void geos::TableLayout::Column::incrementMergeHeaderCount ( size_t  value)
inline

Increment number of times we will divide the current cell.

Parameters
valuenumber of division to add

Definition at line 211 of file TableLayout.hpp.

◆ setHeaderAlignment()

TableLayout::Column& geos::TableLayout::Column::setHeaderAlignment ( Alignment  headerAlignment)

Sets the header alignment for the column.

Parameters
headerAlignmentThe alignment to set for the column header (left, right, or center).
Returns
The current column object

◆ setName()

Column& geos::TableLayout::Column::setName ( string_view  name)

Sets the name of the column.

Parameters
nameThe name to set for the column.
Returns
The current column object.

◆ setNextCell()

void geos::TableLayout::Column::setNextCell ( Column nextCell)
inline

Set the next column in the layout.

Parameters
nextCellThe next column in the table layout.

Definition at line 149 of file TableLayout.hpp.

◆ setParent()

void geos::TableLayout::Column::setParent ( Column parent)
inline

Set the parent column.

Parameters
parentPointer to the parent column to set.

Definition at line 135 of file TableLayout.hpp.

◆ setValuesAlignment()

TableLayout::Column& geos::TableLayout::Column::setValuesAlignment ( Alignment  valueAlignment)

Sets the values alignment for the column.

Parameters
valueAlignmentThe alignment to set for the column values (left, right, or center).
Returns
The current column object

◆ setVisibility()

Column& geos::TableLayout::Column::setVisibility ( CellType  celltype)

Set the column visibility.

Parameters
celltypeCell type to apply to hide the colmun
Returns
The current column .

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