2019-10-25 22:30:12 +02:00
|
|
|
#ifndef GPIPARSER_H
|
|
|
|
#define GPIPARSER_H
|
|
|
|
|
|
|
|
#include "parser.h"
|
|
|
|
|
|
|
|
class QDataStream;
|
|
|
|
class QTextCodec;
|
|
|
|
|
|
|
|
class GPIParser : public Parser
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
|
|
QList<Area> &polygons, QVector<Waypoint> &waypoints);
|
|
|
|
QString errorString() const {return _errorString;}
|
|
|
|
int errorLine() const {return 0;}
|
|
|
|
|
|
|
|
private:
|
2019-11-01 19:07:21 +01:00
|
|
|
bool readFileHeader(QDataStream &stream, quint32 &ebs);
|
2019-10-25 22:30:12 +02:00
|
|
|
bool readGPIHeader(QDataStream &stream, QTextCodec *codec);
|
2019-10-27 16:34:53 +01:00
|
|
|
bool readData(QDataStream &stream, QTextCodec *codec,
|
|
|
|
QVector<Waypoint> &waypoints);
|
2019-10-25 22:30:12 +02:00
|
|
|
bool readEntry(QDataStream &stream, QTextCodec *codec,
|
|
|
|
QVector<Waypoint> &waypoints);
|
|
|
|
void readPOIDatabase(QDataStream &stream, QTextCodec *codec,
|
|
|
|
QVector<Waypoint> &waypoints);
|
|
|
|
|
|
|
|
QString _errorString;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GPIPARSER_H
|