00001 #ifndef DATALOAD_TEMPLATE_H 00002 #define DATALOAD_TEMPLATE_H 00003 00004 00005 #include <QFile> 00006 00007 #include <functional> 00008 #include "PlotJuggler/plotdata.h" 00009 #include "PlotJuggler/pj_plugin.h" 00010 #include "PlotJuggler/messageparser_base.h" 00011 00012 00013 struct FileLoadInfo 00014 { 00015 QString filename; 00016 QString prefix; 00017 QStringList selected_datasources; 00018 QDomDocument plugin_config; 00019 }; 00020 00021 00022 class DataLoader: public PlotJugglerPlugin 00023 { 00024 00025 public: 00026 DataLoader(){} 00027 00028 virtual const std::vector<const char*>& compatibleFileExtensions() const = 0; 00029 00030 virtual bool readDataFromFile(FileLoadInfo* fileload_info, PlotDataMapRef& destination) = 0; 00031 00032 virtual ~DataLoader() {} 00033 00034 protected: 00035 00036 00037 }; 00038 00039 QT_BEGIN_NAMESPACE 00040 00041 #define DataRead_iid "com.icarustechnology.PlotJuggler.DataLoader" 00042 00043 Q_DECLARE_INTERFACE(DataLoader, DataRead_iid) 00044 00045 QT_END_NAMESPACE 00046 00047 00048 #endif 00049