svcore
1.9
|
#include <CSVFormat.h>
Definition at line 22 of file CSVFormat.h.
typedef unsigned int CSVFormat::ColumnQualities |
Definition at line 60 of file CSVFormat.h.
enum CSVFormat::ModelType |
OneDimensionalModel | |
TwoDimensionalModel | |
TwoDimensionalModelWithDuration | |
TwoDimensionalModelWithDurationAndPitch | |
ThreeDimensionalModel |
Definition at line 25 of file CSVFormat.h.
Definition at line 33 of file CSVFormat.h.
enum CSVFormat::TimeUnits |
Definition at line 38 of file CSVFormat.h.
ColumnUnknown | |
ColumnStartTime | |
ColumnEndTime | |
ColumnDuration | |
ColumnValue | |
ColumnPitch | |
ColumnLabel |
Definition at line 44 of file CSVFormat.h.
Definition at line 54 of file CSVFormat.h.
CSVFormat::CSVFormat | ( | ) | [inline] |
Definition at line 62 of file CSVFormat.h.
CSVFormat::CSVFormat | ( | QString | path | ) |
Definition at line 28 of file CSVFormat.cpp.
References guessFormatFor().
void CSVFormat::guessFormatFor | ( | QString | path | ) |
Guess the format of the given CSV file, setting the fields in this object accordingly.
If the current separator is the empty string, the separator character will also be guessed; otherwise the current separator will be used. The other properties of this object will be set according to guesses from the file.
Definition at line 38 of file CSVFormat.cpp.
References ExplicitTiming, guessPurposes(), guessQualities(), m_columnCount, m_columnPurposes, m_columnQualities, m_example, m_maxExampleCols, m_modelType, m_prevValues, m_timeUnits, m_timingType, m_variableColumnCount, TimeSeconds, and TwoDimensionalModel.
Referenced by CSVFormat().
ModelType CSVFormat::getModelType | ( | ) | const [inline] |
Definition at line 86 of file CSVFormat.h.
References m_modelType.
Referenced by CSVFileReader::load().
TimingType CSVFormat::getTimingType | ( | ) | const [inline] |
Definition at line 87 of file CSVFormat.h.
References m_timingType.
Referenced by CSVFileReader::load().
TimeUnits CSVFormat::getTimeUnits | ( | ) | const [inline] |
Definition at line 88 of file CSVFormat.h.
References m_timeUnits.
Referenced by CSVFileReader::convertTimeValue(), and CSVFileReader::load().
int CSVFormat::getSampleRate | ( | ) | const [inline] |
Definition at line 89 of file CSVFormat.h.
References m_sampleRate.
Referenced by CSVFileReader::load().
int CSVFormat::getWindowSize | ( | ) | const [inline] |
Definition at line 90 of file CSVFormat.h.
References m_windowSize.
Referenced by CSVFileReader::load().
int CSVFormat::getColumnCount | ( | ) | const [inline] |
Definition at line 91 of file CSVFormat.h.
References m_columnCount.
Referenced by CSVFileReader::load().
bool CSVFormat::getAllowQuoting | ( | ) | const [inline] |
Definition at line 92 of file CSVFormat.h.
References m_allowQuoting.
Referenced by CSVFileReader::load().
QChar CSVFormat::getSeparator | ( | ) | const [inline] |
Definition at line 93 of file CSVFormat.h.
References m_separator.
Referenced by CSVFileReader::load().
void CSVFormat::setModelType | ( | ModelType | t | ) | [inline] |
Definition at line 98 of file CSVFormat.h.
References m_modelType.
void CSVFormat::setTimingType | ( | TimingType | t | ) | [inline] |
Definition at line 99 of file CSVFormat.h.
References m_timingType.
void CSVFormat::setTimeUnits | ( | TimeUnits | t | ) | [inline] |
Definition at line 100 of file CSVFormat.h.
References m_timeUnits.
void CSVFormat::setSeparator | ( | QChar | s | ) | [inline] |
Definition at line 101 of file CSVFormat.h.
References m_separator.
void CSVFormat::setSampleRate | ( | int | r | ) | [inline] |
Definition at line 102 of file CSVFormat.h.
References m_sampleRate.
void CSVFormat::setWindowSize | ( | int | s | ) | [inline] |
Definition at line 103 of file CSVFormat.h.
References m_windowSize.
void CSVFormat::setColumnCount | ( | int | c | ) | [inline] |
Definition at line 104 of file CSVFormat.h.
References m_columnCount.
void CSVFormat::setAllowQuoting | ( | bool | q | ) | [inline] |
Definition at line 105 of file CSVFormat.h.
References m_allowQuoting.
QList<ColumnPurpose> CSVFormat::getColumnPurposes | ( | ) | const [inline] |
Definition at line 107 of file CSVFormat.h.
References m_columnPurposes.
void CSVFormat::setColumnPurposes | ( | QList< ColumnPurpose > | cl | ) | [inline] |
Definition at line 108 of file CSVFormat.h.
References m_columnPurposes.
Definition at line 303 of file CSVFormat.cpp.
References ColumnUnknown, and m_columnPurposes.
Referenced by CSVFileReader::load().
CSVFormat::ColumnPurpose CSVFormat::getColumnPurpose | ( | int | i | ) | const |
Definition at line 312 of file CSVFormat.cpp.
References ColumnUnknown, and m_columnPurposes.
void CSVFormat::setColumnPurpose | ( | int | i, |
ColumnPurpose | p | ||
) |
Definition at line 321 of file CSVFormat.cpp.
References ColumnUnknown, and m_columnPurposes.
Referenced by guessPurposes().
QList<ColumnQualities> CSVFormat::getColumnQualities | ( | ) | const [inline] |
Definition at line 115 of file CSVFormat.h.
References m_columnQualities.
QList<QStringList> CSVFormat::getExample | ( | ) | const [inline] |
Definition at line 118 of file CSVFormat.h.
References m_example.
int CSVFormat::getMaxExampleCols | ( | ) | const [inline] |
Definition at line 119 of file CSVFormat.h.
References m_maxExampleCols.
void CSVFormat::guessSeparator | ( | QString | line | ) | [protected] |
Definition at line 86 of file CSVFormat.cpp.
References m_allowQuoting, m_separator, and StringBits::split().
Referenced by guessQualities().
void CSVFormat::guessQualities | ( | QString | line, |
int | lineno | ||
) | [protected] |
!! how to take into account headers?
Definition at line 99 of file CSVFormat.cpp.
References ColumnIncreasing, ColumnIntegral, ColumnLarge, ColumnNumeric, guessSeparator(), m_allowQuoting, m_columnCount, m_columnQualities, m_example, m_maxExampleCols, m_prevValues, m_separator, m_variableColumnCount, StringBits::split(), and StringBits::stringToDoubleLocaleFree().
Referenced by guessFormatFor().
void CSVFormat::guessPurposes | ( | ) | [protected] |
Definition at line 187 of file CSVFormat.cpp.
References ColumnDuration, ColumnEndTime, ColumnIncreasing, ColumnIntegral, ColumnLabel, ColumnLarge, ColumnNumeric, ColumnStartTime, ColumnUnknown, ColumnValue, ExplicitTiming, ImplicitTiming, m_columnCount, m_columnPurposes, m_columnQualities, m_modelType, m_timeUnits, m_timingType, OneDimensionalModel, setColumnPurpose(), ThreeDimensionalModel, TimeAudioFrames, TimeSeconds, TimeWindows, TwoDimensionalModel, and TwoDimensionalModelWithDuration.
Referenced by guessFormatFor().
void CSVFormat::guessFormatFor_Old | ( | QString | path | ) | [protected] |
ModelType CSVFormat::m_modelType [protected] |
Definition at line 122 of file CSVFormat.h.
Referenced by getModelType(), guessFormatFor(), guessPurposes(), and setModelType().
TimingType CSVFormat::m_timingType [protected] |
Definition at line 123 of file CSVFormat.h.
Referenced by getTimingType(), guessFormatFor(), guessPurposes(), and setTimingType().
TimeUnits CSVFormat::m_timeUnits [protected] |
Definition at line 124 of file CSVFormat.h.
Referenced by getTimeUnits(), guessFormatFor(), guessPurposes(), and setTimeUnits().
QString CSVFormat::m_separator [protected] |
Definition at line 125 of file CSVFormat.h.
Referenced by getSeparator(), guessQualities(), guessSeparator(), and setSeparator().
int CSVFormat::m_sampleRate [protected] |
Definition at line 126 of file CSVFormat.h.
Referenced by getSampleRate(), and setSampleRate().
int CSVFormat::m_windowSize [protected] |
Definition at line 127 of file CSVFormat.h.
Referenced by getWindowSize(), and setWindowSize().
int CSVFormat::m_columnCount [protected] |
Definition at line 129 of file CSVFormat.h.
Referenced by getColumnCount(), guessFormatFor(), guessPurposes(), guessQualities(), and setColumnCount().
bool CSVFormat::m_variableColumnCount [protected] |
Definition at line 130 of file CSVFormat.h.
Referenced by guessFormatFor(), and guessQualities().
QList<ColumnQualities> CSVFormat::m_columnQualities [protected] |
Definition at line 132 of file CSVFormat.h.
Referenced by getColumnQualities(), guessFormatFor(), guessPurposes(), and guessQualities().
QList<ColumnPurpose> CSVFormat::m_columnPurposes [protected] |
Definition at line 133 of file CSVFormat.h.
Referenced by getColumnPurpose(), getColumnPurposes(), guessFormatFor(), guessPurposes(), setColumnPurpose(), and setColumnPurposes().
QList<float> CSVFormat::m_prevValues [protected] |
Definition at line 135 of file CSVFormat.h.
Referenced by guessFormatFor(), and guessQualities().
bool CSVFormat::m_allowQuoting [protected] |
Definition at line 137 of file CSVFormat.h.
Referenced by getAllowQuoting(), guessQualities(), guessSeparator(), and setAllowQuoting().
QList<QStringList> CSVFormat::m_example [protected] |
Definition at line 139 of file CSVFormat.h.
Referenced by getExample(), guessFormatFor(), and guessQualities().
int CSVFormat::m_maxExampleCols [protected] |
Definition at line 140 of file CSVFormat.h.
Referenced by getMaxExampleCols(), guessFormatFor(), and guessQualities().