navit  0.5.3-trunk
map_methods Struct Reference

Holds all functions a map plugin has to implement to be usable. More...

#include <map.h>

Data Fields

enum projection pro
 
char * charset
 
void(* map_destroy )(struct map_priv *priv)
 
struct map_rect_priv *(* map_rect_new )(struct map_priv *map, struct map_selection *sel)
 
void(* map_rect_destroy )(struct map_rect_priv *mr)
 
struct item *(* map_rect_get_item )(struct map_rect_priv *mr)
 
struct item *(* map_rect_get_item_byid )(struct map_rect_priv *mr, int id_hi, int id_lo)
 
struct map_search_priv *(* map_search_new )(struct map_priv *map, struct item *item, struct attr *search, int partial)
 
void(* map_search_destroy )(struct map_search_priv *ms)
 
struct item *(* map_search_get_item )(struct map_search_priv *ms)
 
struct item *(* map_rect_create_item )(struct map_rect_priv *mr, enum item_type type)
 
int(* map_get_attr )(struct map_priv *priv, enum attr_type type, struct attr *attr)
 
int(* map_set_attr )(struct map_priv *priv, struct attr *attr)
 

Detailed Description

Holds all functions a map plugin has to implement to be usable.

This structure holds pointers to a map plugin's functions, which Navit's core will call to communicate with the plugin. For further information look into map.c, which has functions with the same names acting more or less as "wrappers" around the functions here. Especially the arguments (and their meaning) of each function will be described there.

Note that there is no separate method to remove an item from a map. This is instead accomplished by retrieving the item, then setting its type to type_none via its item_type_set method (provided the item and its map support removal).

Field Documentation

◆ charset

char* map_methods::charset

The charset this map uses - e.g. "iso8859-1" or "utf-8". Please specify this in a form so that g_convert() can handle it.

Referenced by map_convert_string_tmp(), map_new_csv(), map_new_shapefile(), map_new_textfile(), map_requires_conversion(), map_search_destroy(), and map_search_new().

◆ map_destroy

void(* map_methods::map_destroy) (struct map_priv *priv)

Function used to destroy ("close") a map.

Referenced by map_destroy().

◆ map_get_attr

int(* map_methods::map_get_attr) (struct map_priv *priv, enum attr_type type, struct attr *attr)

Function to get a map attribute, can be NULL

Referenced by map_get_attr().

◆ map_rect_create_item

struct item*(* map_methods::map_rect_create_item) (struct map_rect_priv *mr, enum item_type type)

Function to create a new item in the map

Referenced by map_rect_create_item().

◆ map_rect_destroy

void(* map_methods::map_rect_destroy) (struct map_rect_priv *mr)

Function to destroy a map rect

Referenced by map_rect_destroy().

◆ map_rect_get_item

struct item*(* map_methods::map_rect_get_item) (struct map_rect_priv *mr)

Function to return the next item from a map rect

Referenced by map_rect_get_item().

◆ map_rect_get_item_byid

struct item*(* map_methods::map_rect_get_item_byid) (struct map_rect_priv *mr, int id_hi, int id_lo)

Function to get an item with a specific ID from a map rect, can be NULL

Referenced by map_rect_get_item_byid().

◆ map_rect_new

struct map_rect_priv*(* map_methods::map_rect_new) (struct map_priv *map, struct map_selection *sel)

Function to create a new map rect on the map.

Referenced by map_rect_new().

◆ map_search_destroy

void(* map_methods::map_search_destroy) (struct map_search_priv *ms)

Function to destroy a map search struct, ignored if map_search_new is NULL

Referenced by map_search_destroy().

◆ map_search_get_item

struct item*(* map_methods::map_search_get_item) (struct map_search_priv *ms)

Function to get the next item of a search on the map, ignored if map_search_new is NULL

Referenced by map_search_get_item().

◆ map_search_new

struct map_search_priv*(* map_methods::map_search_new) (struct map_priv *map, struct item *item, struct attr *search, int partial)

Function to start a new search on the map, can be NULL

Referenced by map_search_new().

◆ map_set_attr

int(* map_methods::map_set_attr) (struct map_priv *priv, struct attr *attr)

Function to set a map attribute, can be NULL

Referenced by map_set_attr().

◆ pro

enum projection map_methods::pro

The projection used for that type of map

Referenced by map_projection(), map_set_projection(), tm_rect_new(), and traffic_process_messages_int().


The documentation for this struct was generated from the following file: