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 145 -
(hide annotations)
(download)
(as text)
Mon Mar 23 18:47:18 2009 UTC (15 years, 11 months ago) by amb
File MIME type: text/x-chdr
File size: 1701 byte(s)
Mon Mar 23 18:47:18 2009 UTC (15 years, 11 months ago) by amb
File MIME type: text/x-chdr
File size: 1701 byte(s)
Add a function to output default profiles as perl data structures.
1 | amb | 83 | /*************************************** |
2 | amb | 145 | $Header: /home/amb/CVS/routino/src/profiles.h,v 1.5 2009-03-23 18:47:18 amb Exp $ |
3 | amb | 83 | |
4 | A header file for the profiles. | ||
5 | ******************/ /****************** | ||
6 | Written by Andrew M. Bishop | ||
7 | |||
8 | This file Copyright 2009 Andrew M. Bishop | ||
9 | It may be distributed under the GNU Public License, version 2, or | ||
10 | any higher version. See section COPYING of the GNU Public license | ||
11 | for conditions under which this file may be redistributed. | ||
12 | ***************************************/ | ||
13 | |||
14 | |||
15 | #ifndef PROFILES_H | ||
16 | #define PROFILES_H /*+ To stop multiple inclusions. +*/ | ||
17 | |||
18 | amb | 96 | #include "types.h" |
19 | amb | 83 | |
20 | |||
21 | /* Data structures */ | ||
22 | |||
23 | /*+ A data structure to hold a transport type profile. +*/ | ||
24 | typedef struct _Profile | ||
25 | { | ||
26 | Transport transport; /*+ The type of transport. +*/ | ||
27 | |||
28 | Allowed allow; /*+ The type of transport expressed as what must be allowed on a way. +*/ | ||
29 | |||
30 | int highways[Way_Unknown]; /*+ A flag to indicate if the transport is allowed on the highway. +*/ | ||
31 | |||
32 | speed_t speed[Way_Unknown]; /*+ The maximum speed on each type of highway. +*/ | ||
33 | |||
34 | int oneway; /*+ A flag to indicate if one-way restrictions apply. +*/ | ||
35 | amb | 138 | |
36 | weight_t weight; /*+ The minimum weight of the route. +*/ | ||
37 | |||
38 | height_t height; /*+ The minimum height of vehicles on the route. +*/ | ||
39 | width_t width; /*+ The minimum width of vehicles on the route. +*/ | ||
40 | length_t length; /*+ The minimum length of vehicles on the route. +*/ | ||
41 | amb | 83 | } |
42 | Profile; | ||
43 | |||
44 | |||
45 | /* Functions */ | ||
46 | |||
47 | Profile *GetProfile(Transport transport); | ||
48 | |||
49 | void PrintProfile(const Profile *profile); | ||
50 | |||
51 | amb | 129 | void PrintProfilesJS(void); |
52 | |||
53 | amb | 145 | void PrintProfilesPerl(void); |
54 | |||
55 | amb | 83 | #endif /* PROFILES_H */ |
Properties
Name | Value |
---|---|
cvs:description | Header file for profiles. |