1 #ifndef LIBMARKLIN_TRAIN_H_
2 #define LIBMARKLIN_TRAIN_H_
4 #include <sigc++/trackable.h>
12 class Train: public sigc::trackable
15 Train(TrafficManager &, Locomotive &);
16 const std::string &get_name() const { return name; }
17 void set_speed(unsigned);
18 void place(Section *, const Section::Endpoint *);
19 bool free_section(Section *);
25 const Section::Endpoint *entry;
27 SectionRef(Section *s, const Section::Endpoint *e): section(s), entry(e) { }
29 typedef std::list<SectionRef> SectRefSeq;
31 TrafficManager &trfc_mgr;
34 SectRefSeq cur_sections;
35 SectRefSeq rsv_sections;
36 unsigned target_speed;
38 void sensor_event(unsigned, bool);
41 typedef std::list<Train *> TrainSeq;
43 } // namespace Marklin