Read csv-file and save it's data to AbstractData-based container class @input: - filePath - string with absolute path to csv-file - data - AbstractData object where all file content will be saved - separator - string or character that separate elements in a row - textDelimiter - string or character that enclose each element in a row - codec - pointer to codec object that would be used for file rea
| 511 | // @output: |
| 512 | // - bool - True if file was successfully read, otherwise False |
| 513 | bool Reader::readToData( |
| 514 | const QString& filePath, |
| 515 | AbstractData& data, |
| 516 | const QString& separator, |
| 517 | const QString& textDelimiter, |
| 518 | const QStringConverter::Encoding codec) |
| 519 | { |
| 520 | QFile file; |
| 521 | return openFile(filePath, file) ? |
| 522 | readToData(file, data, separator, textDelimiter, codec) : false; |
| 523 | } |
| 524 | |
| 525 | // Read csv-formatted data from IO Device and save it |
| 526 | // to AbstractData-based container class |