navit  0.5.3-trunk
vehicleprofile.c File Reference
#include <stdlib.h>
#include <glib.h>
#include <string.h>
#include "debug.h"
#include "item.h"
#include "xmlconfig.h"
#include "roadprofile.h"
#include "vehicleprofile.h"
#include "callback.h"

Functions

static void vehicleprofile_set_attr_do (struct vehicleprofile *this_, struct attr *attr)
 
static void vehicleprofile_free_hash_item (gpointer key, gpointer value, gpointer user_data)
 
static void vehicleprofile_free_hash (struct vehicleprofile *this_)
 
static void vehicleprofile_clear (struct vehicleprofile *this_)
 
static void vehicleprofile_apply_roadprofile (struct vehicleprofile *this_, struct navit_object *rp, int is_option)
 
static void vehicleprofile_apply_attrs (struct vehicleprofile *this_, struct navit_object *obj, int is_option)
 
static void vehicleprofile_debug_roadprofile (gpointer key, gpointer value, gpointer user_data)
 
static void vehicleprofile_update (struct vehicleprofile *this_)
 
struct vehicleprofilevehicleprofile_new (struct attr *parent, struct attr **attrs)
 
struct attr_itervehicleprofile_attr_iter_new (void *unused)
 
void vehicleprofile_attr_iter_destroy (struct attr_iter *iter)
 
int vehicleprofile_get_attr (struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
 
int vehicleprofile_set_attr (struct vehicleprofile *this_, struct attr *attr)
 
int vehicleprofile_add_attr (struct vehicleprofile *this_, struct attr *attr)
 
int vehicleprofile_remove_attr (struct vehicleprofile *this_, struct attr *attr)
 
struct roadprofilevehicleprofile_get_roadprofile (struct vehicleprofile *this_, enum item_type type)
 
char * vehicleprofile_get_name (struct vehicleprofile *this_)
 Returns the vehicle profile's name. More...
 
static int vehicleprofile_init (struct vehicleprofile *this_)
 

Variables

struct object_func vehicleprofile_func
 

Function Documentation

◆ vehicleprofile_add_attr()

int vehicleprofile_add_attr ( struct vehicleprofile this_,
struct attr attr 
)

◆ vehicleprofile_apply_attrs()

static void vehicleprofile_apply_attrs ( struct vehicleprofile this_,
struct navit_object obj,
int  is_option 
)
static

◆ vehicleprofile_apply_roadprofile()

static void vehicleprofile_apply_roadprofile ( struct vehicleprofile this_,
struct navit_object rp,
int  is_option 
)
static

◆ vehicleprofile_attr_iter_destroy()

void vehicleprofile_attr_iter_destroy ( struct attr_iter iter)

◆ vehicleprofile_attr_iter_new()

struct attr_iter* vehicleprofile_attr_iter_new ( void *  unused)

◆ vehicleprofile_clear()

◆ vehicleprofile_debug_roadprofile()

static void vehicleprofile_debug_roadprofile ( gpointer  key,
gpointer  value,
gpointer  user_data 
)
static

◆ vehicleprofile_free_hash()

static void vehicleprofile_free_hash ( struct vehicleprofile this_)
static

◆ vehicleprofile_free_hash_item()

static void vehicleprofile_free_hash_item ( gpointer  key,
gpointer  value,
gpointer  user_data 
)
static

References value.

Referenced by vehicleprofile_free_hash().

◆ vehicleprofile_get_attr()

int vehicleprofile_get_attr ( struct vehicleprofile this_,
enum attr_type  type,
struct attr attr,
struct attr_iter iter 
)

◆ vehicleprofile_get_name()

char* vehicleprofile_get_name ( struct vehicleprofile this_)

Returns the vehicle profile's name.

References vehicleprofile::name.

◆ vehicleprofile_get_roadprofile()

struct roadprofile* vehicleprofile_get_roadprofile ( struct vehicleprofile this_,
enum item_type  type 
)

◆ vehicleprofile_init()

static int vehicleprofile_init ( struct vehicleprofile this_)
static

◆ vehicleprofile_new()

◆ vehicleprofile_remove_attr()

int vehicleprofile_remove_attr ( struct vehicleprofile this_,
struct attr attr 
)

◆ vehicleprofile_set_attr()

int vehicleprofile_set_attr ( struct vehicleprofile this_,
struct attr attr 
)

◆ vehicleprofile_set_attr_do()

static void vehicleprofile_set_attr_do ( struct vehicleprofile this_,
struct attr attr 
)
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.

References attr_to_name(), vehicleprofile::axle_weight, vehicleprofile::dangerous_goods, dbg, vehicleprofile::flags, vehicleprofile::flags_forward_mask, vehicleprofile::flags_reverse_mask, vehicleprofile::height, vehicleprofile::length, lvl_debug, vehicleprofile::maxspeed_handling, vehicleprofile::mode, vehicleprofile::name, attr::num, vehicleprofile::route_depth, vehicleprofile::static_distance, vehicleprofile::static_speed, attr::str, vehicleprofile::through_traffic_penalty, vehicleprofile::turn_around_penalty, vehicleprofile::turn_around_penalty2, attr::type, attr::u, vehicleprofile::weight, and vehicleprofile::width.

Referenced by vehicleprofile_apply_attrs(), vehicleprofile_new(), and vehicleprofile_set_attr().

◆ vehicleprofile_update()

Variable Documentation

◆ vehicleprofile_func

struct object_func vehicleprofile_func
Initial value:
= {
attr_vehicleprofile,
}
void vehicleprofile_attr_iter_destroy(struct attr_iter *iter)
Definition: vehicleprofile.c:234
struct vehicleprofile * vehicleprofile_new(struct attr *parent, struct attr **attrs)
Definition: vehicleprofile.c:211
static int vehicleprofile_init(struct vehicleprofile *this_)
Definition: vehicleprofile.c:279
int vehicleprofile_get_attr(struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: vehicleprofile.c:239
struct attr_iter * vehicleprofile_attr_iter_new(void *unused)
Definition: vehicleprofile.c:230
int vehicleprofile_set_attr(struct vehicleprofile *this_, struct attr *attr)
Definition: vehicleprofile.c:244
int vehicleprofile_add_attr(struct vehicleprofile *this_, struct attr *attr)
Definition: vehicleprofile.c:250
int vehicleprofile_remove_attr(struct vehicleprofile *this_, struct attr *attr)
Definition: vehicleprofile.c:265
void * navit_object_unref(struct navit_object *obj)
Definition: xmlconfig.c:1313
struct navit_object * navit_object_ref(struct navit_object *obj)
Definition: xmlconfig.c:1307
void(* object_func_iter_destroy)(struct attr_iter *)
Definition: xmlconfig.h:57
void *(* object_func_new)(struct attr *parent, struct attr **attrs)
Definition: xmlconfig.h:54
int(* object_func_remove_attr)(void *, struct attr *attr)
Definition: xmlconfig.h:60
void *(* object_func_ref)(void *)
Definition: xmlconfig.h:64
struct attr_iter *(* object_func_iter_new)(void *)
Definition: xmlconfig.h:56
int(* object_func_init)(void *)
Definition: xmlconfig.h:61
void *(* object_func_dup)(void *)
Definition: xmlconfig.h:63
int(* object_func_add_attr)(void *, struct attr *attr)
Definition: xmlconfig.h:59
void(* object_func_destroy)(void *)
Definition: xmlconfig.h:62
int(* object_func_set_attr)(void *, struct attr *attr)
Definition: xmlconfig.h:58
int(* object_func_get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: xmlconfig.h:55
void *(* object_func_unref)(void *)
Definition: xmlconfig.h:65

Referenced by object_func_lookup(), and vehicleprofile_new().