Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
Anl3ModuleReader.h
1// Copyright (c) 2013 - 2019 Marc-Michael Horstmann;
2// Copyright (c) 2020 - 2024 Trend Verlag;
3//
4// trax track library
5// AD 2014
6//
7// "the resolution of all the fruitless searches"
8//
9// Peter Gabriel
10
11#pragma once
12
13#include "trax/collections/support/Anl3TrackSystemReader.h"
14
15namespace trax{
16
17 struct Camera;
18 struct CameraCollection;
19 struct Module;
20 struct ModuleCollection;
21
22 namespace ptreesupport{
23
24 class Anl3ModuleReader : public Anl3TrackSystemReader
25 {
26 public:
27 dclspc Anl3ModuleReader( const char* pLocale = nullptr );
28 dclspc Anl3ModuleReader( SocketRegistry& socketRegistry, const char* pLocale = nullptr );
29
30 std::unique_ptr<ModuleCollection> dclspc ReadModuleCollection( const boost::property_tree::ptree& pt ) const;
31
32 std::unique_ptr<Module> dclspc ReadModule( const boost::property_tree::ptree& pt ) const;
33 private:
34 struct Kollektor{
35 IDType m_ID;
37 std::vector<IDType> m_Tracks;
38 };
39
40 std::unique_ptr<CameraCollection> ReadCameraCollection( const boost::property_tree::ptree& pt ) const;
41
42 std::unique_ptr<Camera> ReadCamera( const boost::property_tree::ptree& pt ) const;
43
44 void ReadUserCamera( const boost::property_tree::ptree& pt,
45 CameraCollection& cameraCollection ) const;
46
47 void ReadGebaeudesammlung( const boost::property_tree::ptree& pt,
48 const std::vector<std::pair<Track::Coupling,std::string>>& couplings, const std::vector<Kollektor>& kollektor, const TrackSystem& trackSystem, IndicatorCollection& indicatorCollection ) const;
49
50 std::pair<Track::End,Track::End> GetEnds( const Connector& connector, int slot, const std::vector<std::pair<Track::Coupling,std::string>>& couplings ) const;
51
52 void ConnectSockets( Module& _module ) const;
53 };
54
55 } // namespace ptreesupport
56} // namespace trax
ptree operator support
Definition CommonSupportXML.h:42
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
Collection to store cameras.
Definition Camera.h:324
Base Camera interface.
Definition Camera.h:92
A Connector rearranges the connections between several track ends.
Definition Connector.h:226
Type used for IDs in the trax library.
Definition IDType.h:43
Collection to hold a set of Indicator objects.
Definition IndicatorCollection.h:39
A collection of modules.
Definition ModuleCollection.h:41
A module is a chunck of railroad stuff that is all located in one rectangular volume.
Definition Module.h:60
Interface for a registry that reconnects Plugs and Jacks according to their IDs.
Definition SocketRegistry.h:40
A track system is the container for tracks.
Definition TrackSystem.h:56