]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/layout.h
Make use of the mspmath library
[r2c2.git] / source / libr2c2 / layout.h
index 73c74b8d4c6cc1177415aead1990360a58080b96..48a2796dcb7003affb134f99471e03ebcefb3324 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/datafile/objectloader.h>
 #include <msp/time/timestamp.h>
 #include "block.h"
+#include "geometry.h"
 
 namespace R2C2 {
 
@@ -16,7 +17,6 @@ class Route;
 class Signal;
 class Track;
 class Train;
-class Vector;
 class Vehicle;
 class Zone;
 
@@ -31,7 +31,6 @@ public:
        public:
                Loader(Layout &);
        private:
-               virtual void finish();
                void route();
                void route(const std::string &);
                void signal(ArticleNumber);
@@ -93,8 +92,16 @@ public:
 
        void add_signal(Signal &);
        const std::set<Signal *> &get_signals() const { return signals; }
+       Signal *pick_signal(const Vector &, const Vector &);
        void remove_signal(Signal &);
 
+       Object *pick_object(const Vector &, const Vector &);
+
+private:
+       template<typename T>
+       static T *pick(const std::set<T *> &, const Vector &, const Vector &);
+
+public:
        void add_block(Block &);
        Block &get_block(unsigned) const;
        const std::set<Block *> &get_blocks() const { return blocks; }