48 const UList<wordList>& tbl,
49 List<std::string::size_type>& columnWidths,
60 columnWidths.resize(tbl.first().size(), std::string::size_type(0));
64 auto& colWidth = columnWidths[coli];
66 for (
const wordList& tblRow : tbl)
72 string::size_type(tblRow[coli].length())
78 for (
const wordList& tblRow : tbl)
85 string::size_type space = 0;
86 space < columnWidths[coli] - tblRow[coli].length() + 2;
95 if (headerSeparator)
os <<
nl;
96 headerSeparator =
false;
105 const UList<wordList>& tbl,
110 List<std::string::size_type> columnWidths;
Macros for easy insertion into run-time selection tables.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize(const label len)
Adjust allocated size of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
T & first()
Access first element of the list, position [0].
bool empty() const noexcept
True if List is empty (ie, size() is zero).
#define defineTemplateTypeNameAndDebugWithName(Type, Name, DebugSwitch)
Define the typeName and debug information, lookup as Name.
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
List of word.
IOList< word > wordIOList
IO for a List of word.
IOList< wordList > wordListIOList
IO for a List of wordList.
Ostream & printTable(const UList< wordList > &tbl, List< std::string::size_type > &columnWidths, Ostream &os, bool headerSeparator=true)
Print a List of wordList as a table.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
#define addCompoundToRunTimeSelectionTable(Type, Tag)
Add compound to selection tables, lookup using typeName.
#define defineCompoundTypeName(Type, UnusedTag)
Define compound using Type for its name.