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 bool check_train_direction;
41 sigc::connection train_conn;
42 bool check_allocated_blocks;
46 Signal(Layout &, const SignalType &);
49 const SignalType &get_type() const { return type; }
51 void set_address(unsigned);
52 void set_position(const Vector &);
53 void set_direction(float);
55 void normalize_location();
57 const Vector &get_position() const { return position; }
58 float get_direction() const { return direction; }
60 void tick(const Msp::Time::TimeDelta &);
63 void block_reserved(const Block &, Train *);
64 void train_advanced(Block &);
68 void save(std::list<Msp::DataFile::Statement> &) const;