Class Argos::ColumnWidthTracker
ClassList > Argos > ColumnWidthTracker
Helper that tracks the width needed by each column of a worksheet. More...
#include <column_width_tracker.h>
Public Functions
| Type | Name |
|---|---|
| void | applyToWorksheet (lxw_worksheet * ws) const Apply the recorded widths to a libxlsxwriter worksheet. |
| void | measureDouble (int col, double value, const char * fmt="%.3f") Account for the length of a formatted double in the given column. |
| void | measureInt (int col, int64_t value) Account for the length of an integer in the given column. |
| void | measureString (int col, const std::string & text) Account for the length of a string in the given column. |
Detailed Description
Cells are measured via the measure* methods; the final widths are then applied to a libxlsxwriter worksheet with applyToWorksheet.
Public Functions Documentation
function applyToWorksheet
Apply the recorded widths to a libxlsxwriter worksheet.
Each measured width is clamped to MIN_WIDTH and padded with PADDING before being set on the worksheet.
Parameters:
wsTarget worksheet.
function measureDouble
Account for the length of a formatted double in the given column.
Parameters:
colZero-based column index.valueValue that will be written in the column.fmtprintf-style format used to rendervalue.
function measureInt
Account for the length of an integer in the given column.
Parameters:
colZero-based column index.valueValue that will be written in the column.
function measureString
Account for the length of a string in the given column.
Parameters:
colZero-based column index.textText that will be written in the column.
The documentation for this class was generated from the following file benchmark/exporter/column_width_tracker.h