1 #ifndef LIBR2C2_SIGNAL_H_
2 #define LIBR2C2_SIGNAL_H_
4 #include <msp/datafile/objectloader.h>
5 #include <msp/time/timedelta.h>
19 class Loader: public Msp::DataFile::ObjectLoader<Signal>
25 void address(unsigned);
26 void direction(float);
27 void position(float, float, float);
32 const SignalType &type;
40 sigc::connection train_conn;
41 bool check_allocated_blocks;
45 Signal(Layout &, const SignalType &);
48 const SignalType &get_type() const { return type; }
50 void set_address(unsigned);
51 void set_position(const Vector &);
52 void set_direction(float);
54 void normalize_location();
56 const Vector &get_position() const { return position; }
57 float get_direction() const { return direction; }
59 void tick(const Msp::Time::TimeDelta &);
62 void block_reserved(const Block &, Train *);
63 void train_advanced(Block &);
67 void save(std::list<Msp::DataFile::Statement> &) const;