Moved the frame file saving/loading routines to their own class in preparation for new cool stuff.

This commit is contained in:
Collin Kidder
2015-06-16 20:15:37 -04:00
parent b2819e3b55
commit f1cedbd880
6 changed files with 454 additions and 443 deletions
+35
View File
@@ -0,0 +1,35 @@
#ifndef FRAMEFILEIO_H
#define FRAMEFILEIO_H
//Class full of static methods that load and save canbus frames to/from various file formats
#include "config.h"
#include <Qt>
#include <QObject>
#include <QVector>
#include <QFile>
#include <QString>
#include <QStringList>
#include "can_structs.h"
#include "utility.h"
class FrameFileIO: public QObject
{
Q_OBJECT
public:
FrameFileIO();
static bool loadCRTDFile(QString, QVector<CANFrame>*);
static bool loadNativeCSVFile(QString, QVector<CANFrame>*);
static bool loadGenericCSVFile(QString, QVector<CANFrame>*);
static bool loadLogFile(QString, QVector<CANFrame>*);
static bool loadMicrochipFile(QString, QVector<CANFrame>*);
static bool saveCRTDFile(QString, QVector<CANFrame>*);
static bool saveNativeCSVFile(QString, QVector<CANFrame>*);
static bool saveGenericCSVFile(QString, QVector<CANFrame>*);
static bool saveLogFile(QString, QVector<CANFrame>*);
static bool saveMicrochipFile(QString, QVector<CANFrame>*);
};
#endif // FRAMEFILEIO_H