]> git.tdb.fi Git - r2c2.git/blob - source/libr2c2/beamgate.h
Avoid unnecessary wait time with shared destinations
[r2c2.git] / source / libr2c2 / beamgate.h
1 #ifndef LIBR2C2_BEAMGATE_H_
2 #define LIBR2C2_BEAMGATE_H_
3
4 #include "beamgatetype.h"
5 #include "sensor.h"
6 #include "trackattachment.h"
7
8 namespace R2C2 {
9
10 class BeamGate: public TrackAttachment, public Sensor
11 {
12 public:
13         class Loader: public Msp::DataFile::ObjectLoader<BeamGate>
14         {
15         public:
16                 Loader(BeamGate &);
17         private:
18                 void address(unsigned);
19                 void position(float, float, float);
20                 void rotation(float);
21         };
22
23         BeamGate(Layout &);
24         virtual ~BeamGate();
25
26         virtual BeamGate *clone(Layout * = 0) const;
27         virtual const BeamGateType &get_type() const;
28
29         virtual void set_position(const Vector &);
30         virtual void set_rotation(const Angle &);
31         virtual void set_tilt(const Angle &) { }
32 private:
33         void update_attachment();
34
35 public:
36         virtual Block *get_block() const;
37
38         void save(std::list<Msp::DataFile::Statement> &) const;
39 };
40
41 } // namespace R2C2
42
43 #endif