Mercurial > hg > svcore
annotate data/fileio/CSVFileReader.h @ 438:32c399d06374
* minor tidy
author | Chris Cannam |
---|---|
date | Thu, 07 Aug 2008 16:06:59 +0000 |
parents | 183ee2a55fc7 |
children | 3a5ee4b6c9ad |
rev | line source |
---|---|
Chris@148 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@148 | 2 |
Chris@148 | 3 /* |
Chris@148 | 4 Sonic Visualiser |
Chris@148 | 5 An audio file viewer and annotation editor. |
Chris@148 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@148 | 7 This file copyright 2006 Chris Cannam. |
Chris@148 | 8 |
Chris@148 | 9 This program is free software; you can redistribute it and/or |
Chris@148 | 10 modify it under the terms of the GNU General Public License as |
Chris@148 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@148 | 12 License, or (at your option) any later version. See the file |
Chris@148 | 13 COPYING included with this distribution for more information. |
Chris@148 | 14 */ |
Chris@148 | 15 |
Chris@148 | 16 #ifndef _CSV_FILE_READER_H_ |
Chris@148 | 17 #define _CSV_FILE_READER_H_ |
Chris@148 | 18 |
Chris@148 | 19 #include "DataFileReader.h" |
Chris@148 | 20 |
Chris@392 | 21 #include "CSVFormat.h" |
Chris@392 | 22 |
Chris@148 | 23 #include <QList> |
Chris@148 | 24 #include <QStringList> |
Chris@148 | 25 |
Chris@148 | 26 class QFile; |
Chris@148 | 27 |
Chris@148 | 28 class CSVFileReader : public DataFileReader |
Chris@148 | 29 { |
Chris@148 | 30 public: |
Chris@392 | 31 CSVFileReader(QString path, CSVFormat format, size_t mainModelSampleRate); |
Chris@148 | 32 virtual ~CSVFileReader(); |
Chris@148 | 33 |
Chris@148 | 34 virtual bool isOK() const; |
Chris@148 | 35 virtual QString getError() const; |
Chris@148 | 36 virtual Model *load() const; |
Chris@148 | 37 |
Chris@148 | 38 protected: |
Chris@392 | 39 CSVFormat m_format; |
Chris@148 | 40 QFile *m_file; |
Chris@148 | 41 QString m_error; |
Chris@148 | 42 size_t m_mainModelSampleRate; |
Chris@148 | 43 }; |
Chris@148 | 44 |
Chris@148 | 45 |
Chris@148 | 46 #endif |
Chris@148 | 47 |