lbl_status->set_geometry(GLtk::Geometry(10, 60, geom.w-20, 20));
status.signal_changed.connect(sigc::mem_fun(this, &TrainPanel::train_status_changed));
- const map<unsigned, string> &funcs = train.get_locomotive_type().get_functions();
+ const VehicleType::FunctionMap &funcs = train.get_locomotive_type().get_functions();
unsigned x = 10;
- for(map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=36)
+ for(VehicleType::FunctionMap::const_iterator i=funcs.begin(); i!=funcs.end(); ++i, x+=36)
{
string fname = i->second;
fname[0] = toupper(fname[0]);
typedef std::vector<Rod> RodArray;
+ typedef std::map<unsigned, std::string> FunctionMap;
+
private:
ArticleNumber art_nr;
std::string name;
bool locomotive;
- std::map<unsigned, std::string> functions;
+ FunctionMap functions;
bool swap_direction;
float length;
float width;
const std::string &get_name() const { return name; }
bool is_locomotive() const { return locomotive; }
unsigned get_max_function() const;
- const std::map<unsigned, std::string> &get_functions() const { return functions; }
+ const FunctionMap &get_functions() const { return functions; }
bool get_swap_direction() const { return swap_direction; }
float get_length() const { return length; }
float get_width() const { return width; }
Gtk::HBox *func_box = new Gtk::HBox(false, 5);
vbox->add(*manage(func_box));
- const std::map<unsigned, string> &funcs = train.get_loco_type().get_functions();
- for(std::map<unsigned, string>::const_iterator i=funcs.begin(); i!=funcs.end(); ++i)
+ const R2C2::VehicleType::FunctionMap &funcs = train.get_loco_type().get_functions();
+ for(R2C2::VehicleType::FunctionMap::const_iterator i=funcs.begin(); i!=funcs.end(); ++i)
{
Gtk::CheckButton *&chk = chk_funcs[i->first];
chk = new Gtk::CheckButton(i->second);