| 192 | } |
| 193 | |
| 194 | const std::string CsvWriter::Label(size_t index) const { |
| 195 | std::ostringstream temp; |
| 196 | temp << Name(index); |
| 197 | const auto unit = Unit(index); |
| 198 | if (!unit.empty()) { |
| 199 | temp << " [" << unit << "]"; |
| 200 | } |
| 201 | return temp.str(); |
| 202 | } |
| 203 | |
| 204 | const std::string &CsvWriter::Name(size_t index) const { |
| 205 | return index < header_list_.size() ? header_list_[index].name : kEmptyString; |