navit  0.5.3-trunk
binding_python.c File Reference
#include "common.h"
#include "config.h"
#include <glib.h>
#include <fcntl.h>
#include "coord.h"
#include "projection.h"
#include "debug.h"
#include "item.h"
#include "map.h"
#include "mapset.h"
#include "plugin.h"
#include "attr.h"
#include "xmlconfig.h"

Data Structures

struct  coordObject
 
struct  mapObject
 
struct  coord_rectObject
 
struct  map_rectObject
 
struct  mapsetObject
 

Macros

#define Obj_HEAD   PyObject_HEAD_INIT(&PyType_Type)
 

Functions

static void coord_destroy_py (coordObject *self)
 
static void map_destroy_py (mapObject *self)
 
static PyObject * map_getattr_py (PyObject *self, char *name)
 
static PyObject * coord_new_py (PyObject *self, PyObject *args)
 
static void coord_rect_destroy_py (coord_rectObject *self)
 
static PyObject * coord_rect_new_py (PyObject *self, PyObject *args)
 
static void map_rect_destroy_py (map_rectObject *self)
 
static PyObject * map_rect_new_py (mapObject *self, PyObject *args)
 
static PyObject * map_dump_file_py (mapObject *self, PyObject *args)
 
static PyObject * map_set_attr_py (mapObject *self, PyObject *args)
 
static PyObject * map_new_py (PyObject *self, PyObject *args)
 
PyObject * map_py_ref (struct map *map)
 
static void mapset_destroy_py (mapsetObject *self)
 
static PyObject * mapset_getattr_py (PyObject *self, char *name)
 
static PyObject * mapset_add_py (mapsetObject *self, PyObject *args)
 
static PyObject * mapset_new_py (PyObject *self, PyObject *args)
 
static PyObject * config_load_py (PyObject *self, PyObject *args)
 
PyObject * python_object_from_attr (struct attr *attr)
 
void plugin_init (void)
 

Variables

PyTypeObject coord_Type
 
PyTypeObject map_Type
 
PyTypeObject coord_rect_Type
 
PyTypeObject map_rect_Type
 
static PyMethodDef map_methods []
 
PyTypeObject mapset_Type
 
static PyMethodDef mapset_methods []
 
static PyMethodDef navitMethods []
 

Macro Definition Documentation

◆ Obj_HEAD

#define Obj_HEAD   PyObject_HEAD_INIT(&PyType_Type)

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.

Function Documentation

◆ config_load_py()

static PyObject* config_load_py ( PyObject *  self,
PyObject *  args 
)
static

References config_load(), and file.

◆ coord_destroy_py()

static void coord_destroy_py ( coordObject self)
static

References coord_destroy().

◆ coord_new_py()

static PyObject* coord_new_py ( PyObject *  self,
PyObject *  args 
)
static

◆ coord_rect_destroy_py()

static void coord_rect_destroy_py ( coord_rectObject self)
static

References coord_rect_destroy().

◆ coord_rect_new_py()

static PyObject* coord_rect_new_py ( PyObject *  self,
PyObject *  args 
)
static

◆ map_destroy_py()

static void map_destroy_py ( mapObject self)
static

References map_destroy().

◆ map_dump_file_py()

static PyObject* map_dump_file_py ( mapObject self,
PyObject *  args 
)
static

References map_dump_file().

◆ map_getattr_py()

static PyObject * map_getattr_py ( PyObject *  self,
char *  name 
)
static

References name.

◆ map_new_py()

static PyObject* map_new_py ( PyObject *  self,
PyObject *  args 
)
static

◆ map_py_ref()

PyObject* map_py_ref ( struct map map)

◆ map_rect_destroy_py()

static void map_rect_destroy_py ( map_rectObject self)
static

References map_rect_destroy().

◆ map_rect_new_py()

static PyObject* map_rect_new_py ( mapObject self,
PyObject *  args 
)
static

◆ map_set_attr_py()

static PyObject* map_set_attr_py ( mapObject self,
PyObject *  args 
)
static

◆ mapset_add_py()

static PyObject* mapset_add_py ( mapsetObject self,
PyObject *  args 
)
static

References mapset_add_attr().

◆ mapset_destroy_py()

static void mapset_destroy_py ( mapsetObject self)
static

References mapset_destroy().

◆ mapset_getattr_py()

static PyObject * mapset_getattr_py ( PyObject *  self,
char *  name 
)
static

References mapset_methods, and name.

◆ mapset_new_py()

static PyObject* mapset_new_py ( PyObject *  self,
PyObject *  args 
)
static

◆ plugin_init()

void plugin_init ( void  )

References navitMethods, and size.

◆ python_object_from_attr()

PyObject* python_object_from_attr ( struct attr attr)

Variable Documentation

◆ coord_rect_Type

PyTypeObject coord_rect_Type
Initial value:
= {
PyObject_HEAD_INIT(&PyType_Type)
.tp_name="coord_rect",
.tp_basicsize=sizeof(coord_rectObject),
.tp_dealloc=(destructor)coord_rect_destroy_py,
}
static void coord_rect_destroy_py(coord_rectObject *self)
Definition: binding_python.c:127
Definition: binding_python.c:98

Referenced by coord_rect_new_py(), and map_rect_new_py().

◆ coord_Type

PyTypeObject coord_Type
Initial value:
= {
.tp_name="coord",
.tp_basicsize=sizeof(coordObject),
.tp_dealloc=(destructor)coord_destroy_py,
}
static void coord_destroy_py(coordObject *self)
Definition: binding_python.c:92
#define Obj_HEAD
Definition: binding_python.c:39
Definition: binding_python.c:44

Referenced by coord_new_py(), and coord_rect_new_py().

◆ map_methods

PyMethodDef map_methods[]
static
Initial value:
= {
{"dump_file", (PyCFunction) map_dump_file_py, METH_VARARGS },
{"map_rect_new", (PyCFunction) map_rect_new_py, METH_VARARGS },
{"set_attr", (PyCFunction) map_set_attr_py, METH_VARARGS },
{NULL, NULL },
}
static PyObject * map_dump_file_py(mapObject *self, PyObject *args)
Definition: binding_python.c:169
static PyObject * map_rect_new_py(mapObject *self, PyObject *args)
Definition: binding_python.c:152
static PyObject * map_set_attr_py(mapObject *self, PyObject *args)
Definition: binding_python.c:178

◆ map_rect_Type

PyTypeObject map_rect_Type
Initial value:
= {
PyObject_HEAD_INIT(&PyType_Type)
.tp_name="map_rect",
.tp_basicsize=sizeof(map_rectObject),
.tp_dealloc=(destructor)map_rect_destroy_py,
}
static void map_rect_destroy_py(map_rectObject *self)
Definition: binding_python.c:162
Definition: binding_python.c:133

Referenced by map_rect_new_py().

◆ map_Type

PyTypeObject map_Type
Initial value:
= {
.tp_name="map",
.tp_basicsize=sizeof(mapObject),
.tp_dealloc=(destructor)map_destroy_py,
.tp_getattr=map_getattr_py,
}
static PyObject * map_getattr_py(PyObject *self, char *name)
Definition: binding_python.c:195
static void map_destroy_py(mapObject *self)
Definition: binding_python.c:220
Definition: binding_python.c:61

Referenced by map_new_py(), and map_py_ref().

◆ mapset_methods

PyMethodDef mapset_methods[]
static
Initial value:
= {
{"add", (PyCFunction) mapset_add_py, METH_VARARGS },
{NULL, NULL },
}
static PyObject * mapset_add_py(mapsetObject *self, PyObject *args)
Definition: binding_python.c:249

Referenced by mapset_getattr_py().

◆ mapset_Type

PyTypeObject mapset_Type
Initial value:
= {
PyObject_HEAD_INIT(&PyType_Type)
.tp_name="mapset",
.tp_basicsize=sizeof(mapsetObject),
.tp_dealloc=(destructor)mapset_destroy_py,
.tp_getattr=mapset_getattr_py,
}
static PyObject * mapset_getattr_py(PyObject *self, char *name)
Definition: binding_python.c:265
static void mapset_destroy_py(mapsetObject *self)
Definition: binding_python.c:278
Definition: binding_python.c:228

Referenced by mapset_new_py().

◆ navitMethods

PyMethodDef navitMethods[]
static
Initial value:
= {
{"attr", attr_new_py, METH_VARARGS},
{"coord", coord_new_py, METH_VARARGS, "Create a new coordinate point."},
{"coord_rect", coord_rect_new_py, METH_VARARGS, "Create a new coordinate rectangle."},
{"map", map_new_py, METH_VARARGS, "Create a new map."},
{"mapset", mapset_new_py, METH_VARARGS, "Create a new mapset."},
{"config_load", config_load_py, METH_VARARGS, "Load a config"},
{"config", config_py, METH_VARARGS, "Get Config Object"},
{"pcoord", pcoord_py, METH_VARARGS},
{NULL, NULL, 0, NULL}
}
PyObject * attr_new_py(PyObject *self, PyObject *args)
Definition: attr.c:69
static PyObject * config_load_py(PyObject *self, PyObject *args)
Definition: binding_python.c:282
static PyObject * map_new_py(PyObject *self, PyObject *args)
Definition: binding_python.c:200
static PyObject * coord_new_py(PyObject *self, PyObject *args)
Definition: binding_python.c:82
static PyObject * mapset_new_py(PyObject *self, PyObject *args)
Definition: binding_python.c:269
static PyObject * coord_rect_new_py(PyObject *self, PyObject *args)
Definition: binding_python.c:117
PyObject * pcoord_py(PyObject *self, PyObject *args)
Definition: pcoord.c:59
PyObject * config_py(PyObject *self, PyObject *args)
Definition: config.c:58

Referenced by plugin_init().