11#ifndef CPP_TOOLS_TABLE_HPP
12#define CPP_TOOLS_TABLE_HPP
57 Table(
const unsigned short nColumns,
const int width = -1);
61 void Begin(
const std::string& name);
65 template<
typename... Ts>
68 constexpr unsigned short size =
sizeof...(args);
71 PrintError(
"Table: Number of arguments is not equal to the number of columns:" +
75 std::string dummy[size] = {(std::string) args...};
90 if (i != 0 && i %
static_cast<int>(
cellWidth) == 0 &&
109 else if (check && currentCell < size)
111 std::cout <<
" " << dummy[currentCell];
116 else std::cout <<
" ";
125 if (i != 0 && i %
static_cast<int>(
cellWidth) == 0 &&
134 template<
typename... Ts>
137 constexpr unsigned short size =
sizeof...(args);
141 PrintError(
"Number of arguments is not equal to the number of columns:" +
145 std::string dummy[size] = {(std::string) args...};
162 else if (check && currentCell < size)
164 std::cout <<
" " << dummy[currentCell];
169 else std::cout <<
" ";
Contains useful set of functions to print errors, warning, check existence of files,...
void PrintError(const std::string &message, const bool exitProgram=true)
Prints error prompt.
Definition ErrorHandler.cpp:16
Contains aliases for colors to use in output in terminal.