Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /branches/destination-access/src/profiles.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1807 - (show annotations) (download) (as text)
Wed Sep 23 18:20:13 2015 UTC (9 years, 5 months ago) by amb
File MIME type: text/x-chdr
File size: 3112 byte(s)
Merge the trunk changes back into the destination-access branch.

1 /***************************************
2 A header file for the profiles.
3
4 Part of the Routino routing software.
5 ******************/ /******************
6 This file Copyright 2008-2015 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 /* The parts that are read from the XML file */
37
38 Transport transport; /*+ The type of transport. +*/
39
40 score_t highway[Highway_Count]; /*+ A floating point preference for travel on the highway. +*/
41
42 speed_t speed[Highway_Count]; /*+ The maximum speed on each type of highway. +*/
43
44 score_t props[Property_Count]; /*+ A floating point preference for ways with this attribute. +*/
45
46 int oneway; /*+ A flag to indicate if one-way restrictions apply. +*/
47 int turns; /*+ A flag to indicate if turn restrictions apply. +*/
48
49 weight_t weight; /*+ The minimum weight of the route. +*/
50
51 height_t height; /*+ The minimum height of vehicles on the route. +*/
52 width_t width; /*+ The minimum width of vehicles on the route. +*/
53 length_t length; /*+ The minimum length of vehicles on the route. +*/
54
55 /* The derived parts */
56
57 transports_t allow; /*+ The type of transport expressed as a bitmask. +*/
58
59 score_t props_yes[Property_Count]; /*+ A floating point preference for ways with this attribute. +*/
60 score_t props_no [Property_Count]; /*+ A floating point preference for ways without this attribute. +*/
61
62 score_t max_pref; /*+ The maximum preference for any highway type. +*/
63 speed_t max_speed; /*+ The maximum speed for any highway type. +*/
64 }
65 Profile;
66
67
68 /* Functions in profiles.c */
69
70 int ParseXMLProfiles(const char *filename,const char *name,int all);
71
72 char **GetProfileNames(void);
73
74 Profile *GetProfile(const char *name);
75
76 void FreeXMLProfiles(void);
77
78 int UpdateProfile(Profile *profile,Ways *ways);
79
80 void PrintProfile(const Profile *profile);
81
82 void PrintProfilesXML(void);
83
84 void PrintProfilesJSON(void);
85
86 void PrintProfilesPerl(void);
87
88
89 #endif /* PROFILES_H */

Properties

Name Value
cvs:description Header file for profiles.