]> git.tdb.fi Git - r2c2.git/blob - source/libmarklin/trackpart.h
Add Id tags and copyright notices to files
[r2c2.git] / source / libmarklin / trackpart.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef MARKLIN_TRACKPART_H_
9 #define MARKLIN_TRACKPART_H_
10
11 #include <msp/datafile/loader.h>
12 #include "endpoint.h"
13
14 namespace Marklin {
15
16 struct TrackPart
17 {
18         class Loader: public Msp::DataFile::Loader
19         {
20         private:
21                 TrackPart &part;
22
23         public:
24                 Loader(TrackPart &);
25                 TrackPart &get_object() { return part; }
26         private:
27                 virtual void finish();
28
29                 void start(float, float, float);
30         };
31
32         float    x, y;
33         float    dir;
34         float    length;
35         float    radius;
36         unsigned route;
37         bool     dead_end;
38
39         TrackPart();
40
41         void collect_endpoints(std::vector<Endpoint> &);
42 };
43
44 } // namespace Marklin
45
46 #endif