+unsigned Vehicle::get_n_link_slots() const
+{
+ return 2;
+}
+
+Vehicle *Vehicle::get_link(unsigned i) const
+{
+ if(i>=2)
+ throw out_of_range("Vehicle::get_link");
+
+ return (i==0 ? prev : next);
+}
+
+int Vehicle::get_link_slot(const Object &other) const
+{
+ if(&other==prev)
+ return 0;
+ else if(&other==next)
+ return 1;
+ else
+ return -1;
+}
+
+
+Vehicle::Axle::Axle(const VehicleType::Axle &t):
+ type(&t),
+ angle(0)
+{ }
+
+
+Vehicle::Bogie::Bogie(const VehicleType::Bogie &t):
+ type(&t),
+ direction(0)
+{
+ for(VehicleType::AxleArray::const_iterator i=type->axles.begin(); i!=type->axles.end(); ++i)
+ axles.push_back(*i);
+}
+
+
+Vehicle::Rod::Rod(const VehicleType::Rod &t):
+ type(&t),
+ angle(0)
+{ }
+