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