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
| 577 | // @output: |
| 578 | // - bool - True if file was successfully read, otherwise False |
| 579 | bool Reader::readToData( |
| 580 | const QString& filePath, |
| 581 | AbstractData& data, |
| 582 | const QString& separator, |
| 583 | const QString& textDelimiter, |
| 584 | QTextCodec* codec) |
| 585 | { |
| 586 | QFile file; |
| 587 | if (false == openFile(filePath, file)) { return false; } |
| 588 | |
| 589 | return readToData(file, data, separator, textDelimiter, codec); |
| 590 | } |
| 591 | |
| 592 | // Read csv-formatted data from IO Device and save it |
| 593 | // to AbstractData-based container class |