MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / getHeaderCell

Method getHeaderCell

src/csvtable.cpp:91–101  ·  view source on GitHub ↗

* Returns the content of a cell of headerRow. * If returnEmpty is false: Instead of an empty cell, the generic column name is returned (used for draw_cell and sort) */

Source from the content-addressed store, hash-verified

89 * If returnEmpty is false: Instead of an empty cell, the generic column name is returned (used for draw_cell and sort)
90 */
91std::string CsvTable::getHeaderCell(table_index_t c, bool returnEmpty) {
92 if( c >= 0 && c < (table_index_t) headerRow->size() ) {
93 if( hasCustomHeaderRow && (headerRow->at(c) != "" || returnEmpty) ) {
94 return headerRow->at(c);
95 } else {
96 return Helper::createGenericColumnNames(c);
97 }
98 } else {
99 return "COL";
100 }
101}
102
103
104std::string CsvTable::getCell(table_index_t row, table_index_t col) {

Callers 6

draw_cellMethod · 0.80
showDefaultStatusMethod · 0.80
sortMethod · 0.80
splitColMethod · 0.80
mergeColsMethod · 0.80

Calls 2

atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected