17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 08:30:23 +01:00

feat(editor): the signalling mode numbers the switches of a station along it and names them after its code, the drives and the switch records follow, and an undo of names passed round among the tracks leaves the drives right

This commit is contained in:
maj00r
2026-10-22 07:50:59 +02:00
parent 8c5795348f
commit 5044beb380
10 changed files with 332 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ http://mozilla.org/MPL/2.0/.
#pragma once
#include <map>
#include <optional>
#include <string>
#include <vector>
@@ -72,6 +73,11 @@ void put(record Entry, scene::layer_handle const Layer);
void place(record &Entry, TTrack const &First);
void classify(record &Entry, TTrack const &Switch);
void forget(std::string const &Name);
// the records follow renamed switches: their parts and the records named after them; Bases renames the records of slips and
// crossings, whose names aren't the names of their parts
void rename(std::map<std::string, std::string> const &Parts, std::map<std::string, std::string> const &Bases);
// the number of the switch, slip or crossing of the record of the name, as the lists of the switches give it
void number(std::string const &Name, std::string const &Number);
// on save: the records follow the renamed switches, the ones whose paths are gone are dropped
void tidy();
// "Rz 60E1-500-1:12 L", as the type is written on the lists of the switches