+++ /dev/null
-#ifndef MARKLIN_3D_SECTION_H_
-#define MARKLIN_3D_SECTION_H_
-
-#include <list>
-#include <set>
-#include "track.h"
-
-namespace Marklin {
-
-class Train;
-class TrafficManager;
-
-class Section
-{
-public:
- struct Endpoint
- {
- Track *track;
- const Track::Endpoint *track_ep;
- Section *link;
- unsigned routes;
-
- Endpoint(Track *, const Track::Endpoint *);
- };
- typedef std::list<Endpoint> EndpointSeq;
-
- Section(TrafficManager &, Track *);
- unsigned get_sensor_id() const { return sensor_id; }
- const TrackSet &get_tracks() const { return tracks; }
- const Endpoint *get_endpoint_by_link(const Section *) const;
- const Endpoint *traverse(const Endpoint *) const;
- void check_link(Section &);
- bool reserve(const Train *);
- void print_debug();
-private:
- TrafficManager &trfc_mgr;
- unsigned id;
- unsigned sensor_id;
- TrackSet tracks;
- EndpointSeq endpoints;
- const Train *train;
-
- void find_routes(Track *, const Track::Endpoint *, unsigned, TrackSet &);
-
- static unsigned next_id;
-};
-typedef std::list<Section *> SectionSeq;
-
-} // namespace Marklin
-
-#endif