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

Data Structures

struct  coordObject
 
struct  mapObject
 
struct  coord_rectObject
 
struct  map_rectObject
 
struct  mapsetObject
 

Macros

#define Obj_HEAD   PyObject_HEAD_INIT(&PyType_Type)
 
#define HEAD_INIT   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

◆ HEAD_INIT

#define HEAD_INIT   PyObject_HEAD_INIT(&PyType_Type)

◆ 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().

◆ coord_destroy_py()

static void coord_destroy_py ( coordObject self)
static

References coordObject::c, and 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

◆ 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

◆ map_dump_file_py()

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

References mapObject::m, and 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

◆ 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

◆ mapset_destroy_py()

static void mapset_destroy_py ( mapsetObject self)
static

◆ 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:
= {
.tp_name = "coord_rect",
.tp_basicsize = sizeof(coord_rectObject),
.tp_dealloc = (destructor)coord_rect_destroy_py,
}
#define HEAD_INIT
Definition binding_python.c:43
static void coord_rect_destroy_py(coord_rectObject *self)
Definition binding_python.c:125
Definition binding_python.c:101

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:95
#define Obj_HEAD
Definition binding_python.c:37
Definition binding_python.c:48

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:161
static PyObject * map_rect_new_py(mapObject *self, PyObject *args)
Definition binding_python.c:145
static PyObject * map_set_attr_py(mapObject *self, PyObject *args)
Definition binding_python.c:169

◆ map_rect_Type

PyTypeObject map_rect_Type
Initial value:
= {
.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:155
Definition binding_python.c:131

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:184
static void map_destroy_py(mapObject *self)
Definition binding_python.c:208
Definition binding_python.c:64

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:231

Referenced by mapset_getattr_py().

◆ mapset_Type

PyTypeObject mapset_Type
Initial value:
= {
.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:245
static void mapset_destroy_py(mapsetObject *self)
Definition binding_python.c:258
Definition binding_python.c:215

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:65
static PyObject * coord_new_py(PyObject *self, PyObject *args)
Definition binding_python.c:85
static PyObject * mapset_new_py(PyObject *self, PyObject *args)
Definition binding_python.c:249
static PyObject * config_load_py(PyObject *self, PyObject *args)
Definition binding_python.c:262
static PyObject * coord_rect_new_py(PyObject *self, PyObject *args)
Definition binding_python.c:115
static PyObject * map_new_py(PyObject *self, PyObject *args)
Definition binding_python.c:188
PyObject * pcoord_py(PyObject *self, PyObject *args)
Definition pcoord.c:56
PyObject * config_py(PyObject *self, PyObject *args)
Definition config.c:55

Referenced by plugin_init().