Routino SVN Repository Browser

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

ViewVC logotype

Contents of /trunk/src/profiles.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 343 - (show annotations) (download) (as text)
Tue Mar 30 17:58:58 2010 UTC (14 years, 11 months ago) by amb
File MIME type: text/x-chdr
File size: 2798 byte(s)
Change the name of the --profile-json and --profile-perl options.

1 /***************************************
2 $Header: /home/amb/CVS/routino/src/profiles.h,v 1.15 2010-03-30 17:58:58 amb Exp $
3
4 A header file for the profiles.
5
6 Part of the Routino routing software.
7 ******************/ /******************
8 This file Copyright 2008-2010 Andrew M. Bishop
9
10 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 ***************************************/
23
24
25 #ifndef PROFILES_H
26 #define PROFILES_H /*+ To stop multiple inclusions. +*/
27
28 #include "types.h"
29
30
31 /* Data structures */
32
33 /*+ A data structure to hold a transport type profile. +*/
34 typedef struct _Profile
35 {
36 char *name; /*+ The name of the profile. +*/
37
38 Transport transport; /*+ The type of transport. +*/
39
40 wayallow_t allow; /*+ The type of transport expressed as what must be allowed on a way. +*/
41
42 score_t highway[Way_Count]; /*+ A floating point preference for travel on the highway. +*/
43 score_t max_pref; /*+ The maximum preference for any highway type. +*/
44
45 speed_t speed[Way_Count]; /*+ The maximum speed on each type of highway. +*/
46 speed_t max_speed; /*+ The maximum speed for any highway type. +*/
47
48 score_t props_yes[Property_Count]; /*+ A floating point preference for ways with this attribute. +*/
49 score_t props_no [Property_Count]; /*+ A floating point preference for ways without this attribute. +*/
50
51 int oneway; /*+ A flag to indicate if one-way restrictions apply. +*/
52
53 weight_t weight; /*+ The minimum weight of the route. +*/
54
55 height_t height; /*+ The minimum height of vehicles on the route. +*/
56 width_t width; /*+ The minimum width of vehicles on the route. +*/
57 length_t length; /*+ The minimum length of vehicles on the route. +*/
58 }
59 Profile;
60
61
62 /* Functions */
63
64 int ParseXMLProfiles(const char *filename);
65
66 Profile *GetProfile(const char *name);
67
68 void UpdateProfile(Profile *profile);
69
70 void PrintProfile(const Profile *profile);
71
72 void PrintProfilesXML(void);
73
74 void PrintProfilesJSON(void);
75
76 void PrintProfilesPerl(void);
77
78 #endif /* PROFILES_H */

Properties

Name Value
cvs:description Header file for profiles.