void width(float);
};
+ struct Bogie;
+
struct Axle
{
class Loader: public Msp::DataFile::ObjectLoader<Axle>
void wheel_diameter(float);
};
+ unsigned index;
+ Bogie *bogie;
+ float local_position;
float position;
float wheel_dia;
bool powered;
Axle();
};
- typedef std::vector<Axle> AxleArray;
-
struct Bogie
{
class Loader: public Msp::DataFile::ObjectLoader<Bogie>
{
+ private:
+ VehicleType &parent;
+
public:
- Loader(Bogie &);
+ Loader(VehicleType &, Bogie &);
private:
void axle();
void position(float);
};
+ unsigned index;
float position;
- AxleArray axles;
+ unsigned first_axle;
+ std::vector<Axle *> axles;
std::string object;
bool rotate_object;
Bogie();
};
- typedef std::vector<Bogie> BogieArray;
-
struct Rod
{
enum Anchor
Rod();
};
+ typedef std::vector<Axle> AxleArray;
+ typedef std::vector<Bogie> BogieArray;
typedef std::vector<Rod> RodArray;
-
typedef std::map<unsigned, std::string> FunctionMap;
private:
float width;
float height;
AxleArray axles;
+ std::vector<Axle *> fixed_axles;
BogieArray bogies;
RodArray rods;
std::string object;
float get_length() const { return length; }
float get_width() const { return width; }
float get_height() const { return height; }
- const AxleArray &get_fixed_axles() const { return axles; }
+ const AxleArray &get_axles() const { return axles; }
+ const Axle &get_axle(unsigned) const;
const Axle &get_fixed_axle(unsigned) const;
const BogieArray &get_bogies() const { return bogies; }
const Bogie &get_bogie(unsigned) const;