source: subversion/applications/editors/osm-editor/qt3/RouteMetaDataHandler.h @ 16590

Last change on this file since 16590 was 1158, checked in by nick, 13 years ago

moved current version to qt3 directory in preparation for qt4

File size: 1.1 KB
Line 
1#ifndef PERMISSIONS_H
2#define PERMISSIONS_H
3
4#include <map>
5#include <qstring.h>
6
7namespace OpenStreetMap
8{
9
10class RouteMetaData
11{
12        public:
13        QString foot, 
14                 horse, 
15                 bike,
16                 car;
17
18        QString routeClass; 
19        QString railway;
20
21        bool doneBicycle, doneMotorcar, doneHighway;
22
23        RouteMetaData() {foot=horse=bike=car="no"; routeClass="unknown"; 
24                                                railway="";doneBicycle=doneMotorcar=doneHighway=false; }
25        RouteMetaData(QString f, QString b, QString h, QString c, QString cl,
26                                        QString r="")
27                { foot=f; horse=h; bike=b; car=c; routeClass = cl; railway=r;
28              doneBicycle=doneMotorcar=doneHighway=false;       }
29        bool testmatch(const RouteMetaData& indata);
30        bool testmatch(const QString& requiredCriteria, const QString& indata);
31        RouteMetaData preferred();
32        QString preferred(const QString& property);
33        void parseKV(const QString&, const QString&);
34};
35
36// Class for obtaining the permissions on a particular
37class RouteMetaDataHandler
38{
39private:
40        std::map<QString,RouteMetaData> rData;
41
42public:
43        RouteMetaDataHandler();
44        RouteMetaData getMetaData(const QString& type);
45        QString getRouteType(const RouteMetaData &rData);
46};
47
48}
49#endif
Note: See TracBrowser for help on using the repository browser.