row(long R) Return a single row as a vector-of-string, no matter how tableData is implemented. The returned vector always contains columns() items @return vector */
| 227 | @return vector |
| 228 | */ |
| 229 | std::vector<std::string> CsvDataStorage::row(table_index_t R) { |
| 230 | std::vector<std::string> row; |
| 231 | table_index_t C = columns(); |
| 232 | if( R < rows() ) { |
| 233 | for( table_index_t c = 0; c < C; ++c) { |
| 234 | row.push_back( get(R,c) ); |
| 235 | } |
| 236 | } else { |
| 237 | row.resize(C); |
| 238 | } |
| 239 | return row; |
| 240 | } |
| 241 | |
| 242 | |
| 243 |