Logo Search packages:      
Sourcecode: navit version File versions

static void* route_segment_data_field_pos ( struct route_segment_data seg,
enum attr_type  type 
) [static]

Returns the position of a certain field appended to a route graph segment.

This function returns a pointer to a field that is appended to a route graph segment.

seg The route graph segment the field is appended to
type Type of the field that should be returned
A pointer to a field of a certain type, or NULL if no such field is present

Definition at line 1019 of file route.c.

References route_segment_data::flags.

      unsigned char *ptr;
      ptr = ((unsigned char*)seg) + sizeof(struct route_segment_data);

      if (seg->flags & AF_SPEED_LIMIT) {
            if (type == attr_maxspeed) 
                  return (void*)ptr;
            ptr += sizeof(int);
      if (seg->flags & AF_SEGMENTED) {
            if (type == attr_offset) 
                  return (void*)ptr;
            ptr += sizeof(int);
      return NULL;

Generated by  Doxygen 1.6.0   Back to index