summaryrefslogtreecommitdiff
path: root/navit/vehicleprofile.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-05-12 08:26:22 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-05-12 08:26:22 +0000
commitbae5d2f8e3ab7a995f998a3f4074948c6412e784 (patch)
tree3ef68e59d32547d623f7faf5f033370bfb1d26d5 /navit/vehicleprofile.c
parentea2f2bab588f4d560d7950bb593e07b4f1e2a64b (diff)
downloadnavit-svn-bae5d2f8e3ab7a995f998a3f4074948c6412e784.tar.gz
Add:Core:Support for length and weight restrictions
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3236 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicleprofile.c')
-rw-r--r--navit/vehicleprofile.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/navit/vehicleprofile.c b/navit/vehicleprofile.c
index e887200a..a6970c55 100644
--- a/navit/vehicleprofile.c
+++ b/navit/vehicleprofile.c
@@ -51,6 +51,21 @@ vehicleprofile_set_attr_do(struct vehicleprofile *this_, struct attr *attr)
/* previously used strdupn not available on win32 */
this_->name = g_strdup(attr->u.str);
break;
+ case attr_vehicle_axle_weight:
+ this_->axle_weight=attr->u.num;
+ break;
+ case attr_vehicle_height:
+ this_->height=attr->u.num;
+ break;
+ case attr_vehicle_length:
+ this_->length=attr->u.num;
+ break;
+ case attr_vehicle_weight:
+ this_->weight=attr->u.num;
+ break;
+ case attr_vehicle_width:
+ this_->width=attr->u.num;
+ break;
default:
break;
}
@@ -67,6 +82,11 @@ vehicleprofile_new(struct attr *parent, struct attr **attrs)
this_=g_new0(struct vehicleprofile, 1);
this_->attrs=attr_list_dup(attrs);
this_->roadprofile_hash=g_hash_table_new(NULL, NULL);
+ this_->length=-1;
+ this_->width=-1;
+ this_->height=-1;
+ this_->weight=-1;
+ this_->axle_weight=-1;
for (attr=attrs;*attr; attr++)
vehicleprofile_set_attr_do(this_, *attr);
return this_;