comparison data/fileio/CSVFormat.h @ 1524:64ef24ebb19c

Some CSV format tests and minor fixes
author Chris Cannam
date Fri, 14 Sep 2018 09:25:17 +0100
parents 2d291eac9f21
children 9570ef94eaa3
comparison
equal deleted inserted replaced
1523:c1b2eab6ac51 1524:64ef24ebb19c
93 * Guess the format of the given CSV file, setting the fields in 93 * Guess the format of the given CSV file, setting the fields in
94 * this object accordingly. If the current separator is the empty 94 * this object accordingly. If the current separator is the empty
95 * string, the separator character will also be guessed; otherwise 95 * string, the separator character will also be guessed; otherwise
96 * the current separator will be used. The other properties of 96 * the current separator will be used. The other properties of
97 * this object will be set according to guesses from the file. 97 * this object will be set according to guesses from the file.
98 *
99 * The properties that are guessed from the file contents are:
100 * separator, column count, variable-column-count flag, audio
101 * sample range, timing type, time units, column qualities, column
102 * purposes, and model type. The sample rate and window size
103 * cannot be guessed and will not be changed by this function.
104 * Note also that this function will never guess WaveFileModel for
105 * the model type.
106 *
107 * Return false if there is some fundamental error, e.g. the file
108 * could not be opened at all. Return true otherwise. Note that
109 * this function returns true even if the file doesn't appear to
110 * make much sense as a data format.
98 */ 111 */
99 void guessFormatFor(QString path); 112 bool guessFormatFor(QString path);
100 113
101 ModelType getModelType() const { return m_modelType; } 114 ModelType getModelType() const { return m_modelType; }
102 TimingType getTimingType() const { return m_timingType; } 115 TimingType getTimingType() const { return m_timingType; }
103 TimeUnits getTimeUnits() const { return m_timeUnits; } 116 TimeUnits getTimeUnits() const { return m_timeUnits; }
104 sv_samplerate_t getSampleRate() const { return m_sampleRate; } 117 sv_samplerate_t getSampleRate() const { return m_sampleRate; }