2015-10-05 01:43:48 +02:00
|
|
|
#ifndef PARSER_H
|
|
|
|
#define PARSER_H
|
|
|
|
|
2016-10-23 11:09:20 +02:00
|
|
|
#include <QString>
|
2016-02-11 20:58:52 +01:00
|
|
|
#include <QList>
|
2016-10-29 10:40:30 +02:00
|
|
|
#include <QFile>
|
2016-10-28 14:33:36 +02:00
|
|
|
#include "trackdata.h"
|
|
|
|
#include "routedata.h"
|
2016-02-11 20:58:52 +01:00
|
|
|
#include "waypoint.h"
|
2015-10-05 01:43:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Parser
|
|
|
|
{
|
|
|
|
public:
|
2016-10-28 14:33:36 +02:00
|
|
|
Parser(QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
|
|
QList<Waypoint> &waypoints) : _tracks(tracks), _routes(routes),
|
|
|
|
_waypoints(waypoints) {}
|
2016-10-23 11:09:20 +02:00
|
|
|
virtual ~Parser() {}
|
2016-08-09 01:16:19 +02:00
|
|
|
|
2016-10-29 10:40:30 +02:00
|
|
|
virtual bool loadFile(QFile *file) = 0;
|
2016-10-23 11:09:20 +02:00
|
|
|
virtual QString errorString() const = 0;
|
|
|
|
virtual int errorLine() const = 0;
|
2015-10-05 01:43:48 +02:00
|
|
|
|
2016-10-23 11:09:20 +02:00
|
|
|
protected:
|
2016-10-28 14:33:36 +02:00
|
|
|
QList<TrackData> &_tracks;
|
|
|
|
QList<RouteData> &_routes;
|
2016-02-19 21:42:54 +01:00
|
|
|
QList<Waypoint> &_waypoints;
|
2015-10-05 01:43:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PARSER_H
|