Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/src/profiles.h
Parent Directory
|
Revision Log
Revision 1174 -
(show annotations)
(download)
(as text)
Sat Dec 1 16:17:34 2012 UTC (12 years, 3 months ago) by amb
File MIME type: text/x-chdr
File size: 2842 byte(s)
Sat Dec 1 16:17:34 2012 UTC (12 years, 3 months ago) by amb
File MIME type: text/x-chdr
File size: 2842 byte(s)
Rename the Way_* enumerated values to Highway_*, add a new Highway_None type, change the HighwayType() function to return Highway_None instead of Highway_Count if no match found - all changes for consistency with similar types and functions.
1 | /*************************************** |
2 | A header file for the profiles. |
3 | |
4 | Part of the Routino routing software. |
5 | ******************/ /****************** |
6 | This file Copyright 2008-2012 Andrew M. Bishop |
7 | |
8 | This program is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU Affero General Public License as published by |
10 | the Free Software Foundation, either version 3 of the License, or |
11 | (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public License |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | ***************************************/ |
21 | |
22 | |
23 | #ifndef PROFILES_H |
24 | #define PROFILES_H /*+ To stop multiple inclusions. +*/ |
25 | |
26 | #include "types.h" |
27 | |
28 | |
29 | /* Data structures */ |
30 | |
31 | /*+ A data structure to hold a transport type profile. +*/ |
32 | typedef struct _Profile |
33 | { |
34 | char *name; /*+ The name of the profile. +*/ |
35 | |
36 | Transport transport; /*+ The type of transport. +*/ |
37 | |
38 | transports_t allow; /*+ The type of transport expressed as a bitmask. +*/ |
39 | |
40 | score_t highway[Highway_Count]; /*+ A floating point preference for travel on the highway. +*/ |
41 | score_t max_pref; /*+ The maximum preference for any highway type. +*/ |
42 | |
43 | speed_t speed[Highway_Count]; /*+ The maximum speed on each type of highway. +*/ |
44 | speed_t max_speed; /*+ The maximum speed for any highway type. +*/ |
45 | |
46 | score_t props_yes[Property_Count]; /*+ A floating point preference for ways with this attribute. +*/ |
47 | score_t props_no [Property_Count]; /*+ A floating point preference for ways without this attribute. +*/ |
48 | |
49 | int oneway; /*+ A flag to indicate if one-way restrictions apply. +*/ |
50 | int turns; /*+ A flag to indicate if turn restrictions apply. +*/ |
51 | |
52 | weight_t weight; /*+ The minimum weight of the route. +*/ |
53 | |
54 | height_t height; /*+ The minimum height of vehicles on the route. +*/ |
55 | width_t width; /*+ The minimum width of vehicles on the route. +*/ |
56 | length_t length; /*+ The minimum length of vehicles on the route. +*/ |
57 | } |
58 | Profile; |
59 | |
60 | |
61 | /* Functions in profiles.c */ |
62 | |
63 | int ParseXMLProfiles(const char *filename); |
64 | |
65 | Profile *GetProfile(const char *name); |
66 | |
67 | int UpdateProfile(Profile *profile,Ways *ways); |
68 | |
69 | void PrintProfile(const Profile *profile); |
70 | |
71 | void PrintProfilesXML(void); |
72 | |
73 | void PrintProfilesJSON(void); |
74 | |
75 | void PrintProfilesPerl(void); |
76 | |
77 | |
78 | #endif /* PROFILES_H */ |
Properties
Name | Value |
---|---|
cvs:description | Header file for profiles. |