navit  0.5.3-trunk
textfile.c File Reference
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <math.h>
#include "config.h"
#include "debug.h"
#include "plugin.h"
#include "projection.h"
#include "item.h"
#include "map.h"
#include "maptype.h"
#include "attr.h"
#include "transform.h"
#include "file.h"
#include "textfile.h"

Functions

static void remove_comment_line (char *line)
 
static void get_line (struct map_rect_priv *mr)
 
static void map_destroy_textfile (struct map_priv *m)
 
static void textfile_coord_rewind (void *priv_data)
 
static int parse_line (struct map_rect_priv *mr, int attr)
 
static int textfile_coord_get (void *priv_data, struct coord *c, int count)
 
static void textfile_attr_rewind (void *priv_data)
 
static void textfile_encode_attr (char *attr_val, enum attr_type attr_type, struct attr *attr)
 
static int textfile_attr_get (void *priv_data, enum attr_type attr_type, struct attr *attr)
 
static struct map_rect_privmap_rect_new_textfile (struct map_priv *map, struct map_selection *sel)
 
static void map_rect_destroy_textfile (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_textfile (struct map_rect_priv *mr)
 
static struct itemmap_rect_get_item_byid_textfile (struct map_rect_priv *mr, int id_hi, int id_lo)
 
static struct map_privmap_new_textfile (struct map_methods *meth, struct attr **attrs, struct callback_list *cbl)
 
void plugin_init (void)
 

Variables

static int map_id
 
static struct item_methods methods_textfile
 
static struct map_methods map_methods_textfile
 

Function Documentation

◆ get_line()

◆ map_destroy_textfile()

static void map_destroy_textfile ( struct map_priv m)
static

◆ map_new_textfile()

◆ map_rect_destroy_textfile()

static void map_rect_destroy_textfile ( struct map_rect_priv mr)
static

◆ map_rect_get_item_byid_textfile()

static struct item* map_rect_get_item_byid_textfile ( struct map_rect_priv mr,
int  id_hi,
int  id_lo 
)
static

◆ map_rect_get_item_textfile()

◆ map_rect_new_textfile()

◆ parse_line()

static int parse_line ( struct map_rect_priv mr,
int  attr 
)
static

◆ plugin_init()

void plugin_init ( void  )

References dbg, lvl_debug, and map_new_textfile().

◆ remove_comment_line()

static void remove_comment_line ( char *  line)
static

References TEXTFILE_COMMENT_CHAR.

Referenced by get_line().

◆ textfile_attr_get()

static int textfile_attr_get ( void *  priv_data,
enum attr_type  attr_type,
struct attr attr 
)
static

◆ textfile_attr_rewind()

static void textfile_attr_rewind ( void *  priv_data)
static

◆ textfile_coord_get()

static int textfile_coord_get ( void *  priv_data,
struct coord c,
int  count 
)
static

◆ textfile_coord_rewind()

static void textfile_coord_rewind ( void *  priv_data)
static

◆ textfile_encode_attr()

static void textfile_encode_attr ( char *  attr_val,
enum attr_type  attr_type,
struct attr attr 
)
static

References attr::num, attr::str, and attr::u.

Variable Documentation

◆ map_id

int map_id
static

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Referenced by map_new_textfile().

◆ map_methods_textfile

struct map_methods map_methods_textfile
static
Initial value:
= {
"utf-8",
}
@ projection_mg
Definition: projection.h:25
static void map_destroy_textfile(struct map_priv *m)
Definition: textfile.c:65
static struct map_rect_priv * map_rect_new_textfile(struct map_priv *map, struct map_selection *sel)
Definition: textfile.c:160
static struct item * map_rect_get_item_byid_textfile(struct map_rect_priv *mr, int id_hi, int id_lo)
Definition: textfile.c:304
static struct item * map_rect_get_item_textfile(struct map_rect_priv *mr)
Definition: textfile.c:226
static void map_rect_destroy_textfile(struct map_rect_priv *mr)
Definition: textfile.c:213

Referenced by map_new_textfile().

◆ methods_textfile

struct item_methods methods_textfile
static
Initial value:
= {
}
static void textfile_attr_rewind(void *priv_data)
Definition: textfile.c:109
static int textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr)
Definition: textfile.c:122
static int textfile_coord_get(void *priv_data, struct coord *c, int count)
Definition: textfile.c:86
static void textfile_coord_rewind(void *priv_data)
Definition: textfile.c:73

Referenced by map_rect_new_textfile().