Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
AnlReader.h
1// Copyright (c) 2013 - 2019 Marc-Michael Horstmann;
2// Copyright (c) 2020 - 2024 Trend Verlag;
3// All Rights Reserved.
4//
5//
6// trax track library
7// AD 2024
8//
9// "His clothes are dirty but his hands are clean
10// And you're the best thing, he's ever seen"
11//
12// Ministry
13
14#pragma once
15
16#include "trax/SocketRegistry.h"
17
18#include <filesystem>
19
20namespace trax{
21
22 struct Module;
23 struct ModuleCollection;
24 struct TrackSystem;
25
26 class AnlReader{
27 public:
28 dclspc AnlReader( const char* pLocale = nullptr );
29 dclspc AnlReader( SocketRegistry& socketRegistry, const char* pLocale = nullptr );
30
31
32 std::unique_ptr<ModuleCollection> dclspc ReadModuleCollection( const std::filesystem::path& path ) const;
33
34 std::unique_ptr<ModuleCollection> dclspc ReadModuleCollection( const unsigned char* bufferStart, const unsigned char* bufferEnd ) const;
35
36
42
43 std::unique_ptr<Module> dclspc ReadModule( const std::filesystem::path& fromPath, int atIdx = 1 ) const;
44
45 std::unique_ptr<Module> dclspc ReadModule( const unsigned char* bufferStart, const unsigned char* bufferEnd, int atIdx = 1 ) const;
47
53
54 std::shared_ptr<TrackSystem> dclspc ReadTrackSystem( const std::filesystem::path& fromPath, int atIdx = 1 ) const;
55
56 std::shared_ptr<TrackSystem> dclspc ReadTrackSystem( const unsigned char* bufferStart, const unsigned char* bufferEnd, int atIdx = 1 ) const;
58 private:
59 std::unique_ptr<SocketRegistry> m_pSocketRegistry;
60 const char* m_pLocale = nullptr;
61 protected:
62 SocketRegistry& m_SocketRegistry;
63 };
64
65} // namespace trax
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
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