Go to the documentation of this file.00001 #ifndef DATALOAD_CSV_H
00002 #define DATALOAD_CSV_H
00003
00004 #include <QObject>
00005 #include <QtPlugin>
00006 #include "PlotJuggler/dataloader_base.h"
00007
00008
00009 class DataLoadCSV: public QObject, DataLoader
00010 {
00011 Q_OBJECT
00012 Q_PLUGIN_METADATA(IID "com.icarustechnology.PlotJuggler.DataLoader" "../dataloader.json")
00013 Q_INTERFACES(DataLoader)
00014
00015 public:
00016 DataLoadCSV();
00017 virtual const std::vector<const char*>& compatibleFileExtensions() const override;
00018
00019 virtual PlotDataMap readDataFromFile(const QString& file_name,
00020 QString &load_configuration ) override;
00021
00022 virtual ~DataLoadCSV();
00023
00024 virtual const char* name() const override { return "DataLoad CSV"; }
00025
00026 protected:
00027 int parseHeader(QFile *file, std::vector<std::pair<bool, QString> > &ordered_names);
00028
00029 private:
00030 std::vector<const char*> _extensions;
00031
00032
00033 };
00034
00035 #endif // DATALOAD_CSV_H