svcore
1.9
|
#include <DataFileReaderFactory.h>
Public Types | |
enum | Exception { ImportCancelled } |
Static Public Member Functions | |
static QString | getKnownExtensions () |
Return the file extensions that we have data file readers for, in a format suitable for use with QFileDialog. More... | |
static DataFileReader * | createReader (QString path, MIDIFileImportPreferenceAcquirer *, sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter=0) |
Return a data file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened. More... | |
static Model * | load (QString path, MIDIFileImportPreferenceAcquirer *acquirer, sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter=0) |
Read the given path, if a suitable reader is available. More... | |
static Model * | loadNonCSV (QString path, MIDIFileImportPreferenceAcquirer *acquirer, sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter=0) |
Read the given path, if a suitable reader is available. More... | |
static Model * | loadCSV (QString path, CSVFormat format, sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter=0) |
Read the given path using the CSV reader with the given format. More... | |
Static Protected Member Functions | |
static DataFileReader * | createReader (QString path, bool csv, MIDIFileImportPreferenceAcquirer *, CSVFormat format, sv_samplerate_t mainModelSampleRate, ProgressReporter *reporter=0) |
Detailed Description
Definition at line 28 of file DataFileReaderFactory.h.
Member Enumeration Documentation
Enumerator | |
---|---|
ImportCancelled |
Definition at line 31 of file DataFileReaderFactory.h.
Member Function Documentation
|
static |
Return the file extensions that we have data file readers for, in a format suitable for use with QFileDialog.
For example, "*.csv *.xml".
Definition at line 25 of file DataFileReaderFactory.cpp.
|
static |
Return a data file reader initialised to the file at the given path, or NULL if no suitable reader for this path is available or the file cannot be opened.
Caller owns the returned object and must delete it after use.
Note that this function is non-interactive – the user is not asked for file format preferences.
Definition at line 66 of file DataFileReaderFactory.cpp.
Referenced by load(), loadCSV(), and loadNonCSV().
|
static |
Read the given path, if a suitable reader is available.
Return NULL if no reader succeeded in reading this file.
Note that this function is non-interactive – the user is not asked for file format preferences. If the CSV file reader is used, it is with default format.
Definition at line 83 of file DataFileReaderFactory.cpp.
References createReader(), and DataFileReader::load().
|
static |
Read the given path, if a suitable reader is available.
Return NULL if no reader succeeded in reading this file. Do not attempt the general CSV reader.
Definition at line 105 of file DataFileReaderFactory.cpp.
References createReader(), and DataFileReader::load().
|
static |
Read the given path using the CSV reader with the given format.
Return NULL if it failed in reading this file.
Definition at line 128 of file DataFileReaderFactory.cpp.
References createReader(), and DataFileReader::load().
|
staticprotected |
Definition at line 31 of file DataFileReaderFactory.cpp.
References DataFileReader::getError(), and DataFileReader::isOK().
The documentation for this class was generated from the following files:
Generated by 1.8.11