Compare commits
2 Commits
03c63cdf90
...
de84f9573b
Author | SHA1 | Date |
---|---|---|
Brett | de84f9573b | |
Brett | 743cb4ae91 |
|
@ -240,7 +240,7 @@ namespace blt::string
|
||||||
std::string columnName;
|
std::string columnName;
|
||||||
size_t maxColumnLength = 0;
|
size_t maxColumnLength = 0;
|
||||||
|
|
||||||
TableColumn(std::string columnName): columnName(std::move(columnName))
|
explicit TableColumn(std::string columnName): columnName(std::move(columnName))
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -281,6 +281,11 @@ namespace blt::string
|
||||||
columns.push_back(column);
|
columns.push_back(column);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void addColumn(std::string column)
|
||||||
|
{
|
||||||
|
columns.emplace_back(std::move(column));
|
||||||
|
}
|
||||||
|
|
||||||
inline void addRow(TableRow row)
|
inline void addRow(TableRow row)
|
||||||
{
|
{
|
||||||
if (row.rowValues.size() > columns.size())
|
if (row.rowValues.size() > columns.size())
|
||||||
|
|
|
@ -84,4 +84,10 @@ void blt::test::utility::run()
|
||||||
(new string::BinaryTreeFormatter::Node("total -= total * 0.05")))
|
(new string::BinaryTreeFormatter::Node("total -= total * 0.05")))
|
||||||
);
|
);
|
||||||
printLines(assign1.construct());
|
printLines(assign1.construct());
|
||||||
|
|
||||||
|
blt::string::TableFormatter tableQ2i1("Iteration 1");
|
||||||
|
tableQ2i1.addColumn("Statement");
|
||||||
|
tableQ2i1.addColumn("Statement");
|
||||||
|
|
||||||
|
printLines(tableQ2i1.createTable(true, true));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue