#ifndef DATA_H #define DATA_H #include #include #include #include #include "waypoint.h" #include "track.h" #include "route.h" #include "parser.h" class Data { public: Data(const QString &fileName, bool tryUnknown = true); bool isValid() const {return _valid;} const QString &errorString() const {return _errorString;} int errorLine() const {return _errorLine;} const QList &tracks() const {return _tracks;} const QList &routes() const {return _routes;} const QVector &waypoints() const {return _waypoints;} const QList &areas() const {return _polygons;} static QString formats(); static QStringList filter(); private: void processData(QList &trackData, QList &routeData); bool _valid; QString _errorString; int _errorLine; QList _tracks; QList _routes; QList _polygons; QVector _waypoints; static QMultiMap _parsers; }; #endif // DATA_H