-const LocoType &Catalogue::get_locomotive(unsigned art_nr) const
-{
- const VehicleType &veh = get_vehicle(art_nr);
- if(const LocoType *loco = dynamic_cast<const LocoType *>(&veh))
- return *loco;
-
- throw Exception("Vehicle is not a locomotive");
-}
-