navit 0.5.3-trunk
Loading...
Searching...
No Matches
route_protected.h
Go to the documentation of this file.
1
30#ifndef NAVIT_ROUTE_PROTECTED_H
31#define NAVIT_ROUTE_PROTECTED_H
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#define RP_TRAFFIC_DISTORTION 1
38#define RP_TURN_RESTRICTION 2
39#define RP_TURN_RESTRICTION_RESOLVED 4
40
41#define RSD_MAXSPEED(x) *((int *)route_segment_data_field_pos((x), attr_maxspeed))
42
71
78 struct item item;
79 int flags;
80 int len;
81 int score;
83 /*NOTE: After a segment, various fields may follow, depending on what flags are set. Order of fields:
84 1.) maxspeed Maximum allowed speed on this segment. Present if
85 AF_SPEED_LIMIT is set. 2.) offset If the item is segmented (i.e. represented by
86 more than one segment), this indicates the position of this segment in the item. Present if AF_SEGMENTED is set.
87 */
88};
89
100
118
134
160
161/* prototypes */
162struct route_graph *route_get_graph(struct route *this_);
163struct map_selection *route_get_selection(struct route *this_);
164void route_free_selection(struct map_selection *sel);
165void route_add_traffic_distortion(struct route *this_, struct item *item);
166void route_remove_traffic_distortion(struct route *this_, struct item *item);
167void route_change_traffic_distortion(struct route *this_, struct item *item);
168struct route_graph_point *route_graph_add_point(struct route_graph *this, struct coord *f);
169void route_graph_add_turn_restriction(struct route_graph *this, struct item *item);
170void route_graph_free_points(struct route_graph *this);
171struct route_graph_point *route_graph_get_point(struct route_graph *this, struct coord *c);
173 struct route_graph_point *last);
177void route_graph_free_segments(struct route_graph *this);
178void route_graph_build_done(struct route_graph *rg, int cancel);
179void route_recalculate_partial(struct route *this_);
181/* end of prototypes */
182#ifdef __cplusplus
183}
184#endif
185
186#endif
attr_type
Definition attr_type_def.h:11
char data
Definition garmin_img.c:2
char type[3]
Definition garmin_img.c:2
static struct pcoord c
Definition popup.c:375
int route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data)
Checks if the route graph already contains a particular segment.
Definition route.c:1582
void route_recalculate_partial(struct route *this_)
Triggers partial recalculation of the route, based on the existing route graph.
Definition route.c:2735
void route_remove_traffic_distortion(struct route *this_, struct item *item)
Removes a traffic distortion item from the route.
Definition route.c:4198
struct route_graph_point * route_graph_get_point_next(struct route_graph *this, struct coord *c, struct route_graph_point *last)
Gets the next route_graph_point with the specified coordinates.
Definition route.c:1323
void route_free_selection(struct map_selection *sel)
Destroys a list of map selections.
Definition route.c:1074
void route_change_traffic_distortion(struct route *this_, struct item *item)
Changes a traffic distortion item on the route.
Definition route.c:4132
void route_graph_add_segment(struct route_graph *this, struct route_graph_point *start, struct route_graph_point *end, struct route_graph_segment_data *data)
Inserts a new segment into the route graph.
Definition route.c:1607
void route_graph_free_segments(struct route_graph *this)
Destroys all segments of a route graph.
Definition route.c:1861
void * route_segment_data_field_pos(struct route_segment_data *seg, enum attr_type type)
Returns the position of a certain field appended to a route graph segment.
Definition route.c:1526
struct map_selection * route_get_selection(struct route *this_)
Retrieves the map selection for the route.
Definition route.c:1053
struct route_graph_point * route_graph_add_point(struct route_graph *this, struct coord *f)
Inserts a point into the route graph at the specified coordinates.
Definition route.c:1407
struct route_graph * route_get_graph(struct route *this_)
Retrieves the route graph.
Definition route.c:4177
void route_graph_add_turn_restriction(struct route_graph *this, struct item *item)
Adds a turn restriction item to the route graph.
Definition route.c:2492
struct route_graph_point * route_graph_get_point(struct route_graph *this, struct coord *c)
Gets the first route_graph_point with the specified coordinates.
Definition route.c:1347
void route_add_traffic_distortion(struct route *this_, struct item *item)
Adds a traffic distortion item to the route.
Definition route.c:4119
#define HASH_SIZE
Definition route_protected.h:157
void route_graph_build_done(struct route_graph *rg, int cancel)
Releases all resources needed to build the route graph.
Definition route.c:3151
void route_graph_free_points(struct route_graph *this)
Frees all the memory used for points in the route graph passed.
Definition route.c:1421
Definition callback.c:27
Definition coord.h:33
Definition event_glib.c:115
Represents an object on a map.
Definition item.h:122
Definition map.c:62
Used to select data from a map.
Definition map.h:63
Definition map.c:55
Handle for a mapset in use.
Definition mapset.c:150
A point in the route graph.
Definition route_protected.h:49
struct route_graph_point * hash_next
Definition route_protected.h:50
struct route_graph_segment * seg
Definition route_protected.h:55
struct route_graph_segment * start
Definition route_protected.h:51
struct route_graph_segment * end
Definition route_protected.h:53
int rhs
Definition route_protected.h:62
int value
Definition route_protected.h:59
struct coord c
Definition route_protected.h:68
int flags
Definition route_protected.h:69
int dst_val
Definition route_protected.h:64
struct route_graph_segment * dst_seg
Definition route_protected.h:66
struct fibheap_el * el
Definition route_protected.h:57
Data for a segment in the route graph.
Definition route_protected.h:104
int flags
Definition route_protected.h:109
int score
Definition route_protected.h:115
int len
Definition route_protected.h:110
struct size_weight_limit size_weight
Definition route_protected.h:113
int maxspeed
Definition route_protected.h:111
int dangerous_goods
Definition route_protected.h:114
struct item * item
Definition route_protected.h:105
int offset
Definition route_protected.h:106
A segment in the route graph.
Definition route_protected.h:124
struct route_graph_point * start
Definition route_protected.h:130
struct route_graph_point * end
Definition route_protected.h:131
struct route_graph_segment * start_next
Definition route_protected.h:126
struct route_graph_segment * next
Definition route_protected.h:125
struct route_graph_segment * end_next
Definition route_protected.h:128
struct route_segment_data data
Definition route_protected.h:132
A complete route graph.
Definition route_protected.h:141
struct fibheap * heap
Definition route_protected.h:156
struct vehicleprofile * vehicleprofile
Definition route_protected.h:149
struct map_rect * mr
Definition route_protected.h:148
struct route_graph_segment * avoid_seg
Definition route_protected.h:155
struct callback * idle_cb
Definition route_protected.h:150
struct route_graph_point * hash[HASH_SIZE]
Definition route_protected.h:158
struct map_selection * sel
Definition route_protected.h:145
struct callback * done_cb
Definition route_protected.h:151
struct map * m
Definition route_protected.h:147
struct route_graph_segment * route_segments
Definition route_protected.h:153
struct event_idle * idle_ev
Definition route_protected.h:152
int busy
Definition route_protected.h:142
struct mapset_handle * h
Definition route_protected.h:146
A segment in the route graph or path.
Definition route_protected.h:77
int flags
Definition route_protected.h:79
int len
Definition route_protected.h:80
int score
Definition route_protected.h:81
A complete route.
Definition route.c:205
Size and weight limits for a route segment.
Definition route_protected.h:93
int width
Definition route_protected.h:94
int axle_weight
Definition route_protected.h:98
int height
Definition route_protected.h:96
int length
Definition route_protected.h:95
int weight
Definition route_protected.h:97
Definition vehicleprofile.h:33