diff --git a/CMakeLists.txt b/CMakeLists.txt index 1210bc4ab..7bcc8090d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,7 @@ set(SOURCES "editor/norms/normsLimits.cpp" "editor/norms/normsEngine.cpp" "editor/norms/normsLine.cpp" +"editor/editorNormsReport.cpp" "editor/editorProfile.cpp" "editor/editorGauge.cpp" "editor/editorInfra.cpp" @@ -253,6 +254,7 @@ set(SOURCES "application/editormodeminimap.cpp" "application/editormodeinfra.cpp" "application/editormodespeed.cpp" +"application/editormodenorms.cpp" "application/editormodesrk.cpp" "application/editormodekm.cpp" "application/editormodejoints.cpp" diff --git a/application/editormode.cpp b/application/editormode.cpp index 203b2e613..863d9cc9c 100644 --- a/application/editormode.cpp +++ b/application/editormode.cpp @@ -1676,6 +1676,8 @@ bool editor_mode::update() steps.step("speed"); m_joints.update(); steps.step("joints"); + m_norms.update(); + steps.step("norms"); if (m_nmt_state.grade_lines_dirty) { m_nmt_state.grade_lines_dirty = false; @@ -1693,6 +1695,7 @@ bool editor_mode::update() draw_infra_overlay(); m_speed.draw_overlay(); m_joints.draw_overlay(); + m_norms.draw_overlay(); m_srk.draw_overlay(); m_km.draw_overlay(); steps.step("overlays"); diff --git a/application/editormode.h b/application/editormode.h index 0c0d6fce5..d571fdcb7 100644 --- a/application/editormode.h +++ b/application/editormode.h @@ -21,6 +21,7 @@ http://mozilla.org/MPL/2.0/. #include "application/editormodelineside.h" #include "application/editormodeparallel.h" #include "application/editormodespeed.h" +#include "application/editormodenorms.h" #include "application/editormodesrk.h" #include "application/editormodekm.h" #include "application/editormodevehicle.h" @@ -2235,7 +2236,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri editor_icons::icon picture; int family; // 0 builds the track, 1 equips it, 2 checks it }; - static std::array const &track_modes(); + static std::array const &track_modes(); bool track_plan_tab() const { return m_track_tab == track_tab::straights || m_track_tab == track_tab::route; } // a tool of the station: they share its schematic bool srk_tab() const { return m_track_tab == track_tab::station || m_track_tab == track_tab::station_signals || m_track_tab == track_tab::line_block; } @@ -2293,7 +2294,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri void render_track_tool_options(); void render_track_selection(); void show_track_tab(track_tab const Wanted) override; - bool track_analysis_tab() const { return m_track_tab == track_tab::profile || m_track_tab == track_tab::speed || m_track_tab == track_tab::joints || m_track_tab == track_tab::infra; } + bool track_analysis_tab() const { return m_track_tab == track_tab::profile || m_track_tab == track_tab::speed || m_track_tab == track_tab::joints || m_track_tab == track_tab::norms || m_track_tab == track_tab::infra; } bool track_shortcut(int const Key); bool track_busy() const; // something going on in the mode, which Esc drops before it leaves the mode std::string track_mode_name() const; @@ -3456,6 +3457,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri gauge_tool m_gauge{*this, *this, *this, *this}; speed_tool m_speed{*this, *this, *this, *this}; joints_tool m_joints{*this, *this, *this, *this}; + norms_tool m_norms{*this, *this, *this}; vehicle_tool m_vehicle{*this, *this}; hekto_tool m_hekto{*this, *this, *this, *this, *this, *this}; fouling_tool m_fouling{*this, *this, *this, *this, *this}; @@ -3464,7 +3466,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri km_tool m_km{*this, *this, *this, *this}; track_ride m_ride; minimap_tool m_minimap{*this, *this, m_ride}; - std::vector m_tools{&m_gauge, &m_speed, &m_joints, &m_vehicle, &m_hekto, &m_fouling, &m_parallel, &m_srk, &m_km, &m_ride, &m_minimap}; + std::vector m_tools{&m_gauge, &m_speed, &m_joints, &m_norms, &m_vehicle, &m_hekto, &m_fouling, &m_parallel, &m_srk, &m_km, &m_ride, &m_minimap}; void infra_rebase(); void render_infra_search(); diff --git a/application/editormodenorms.cpp b/application/editormodenorms.cpp new file mode 100644 index 000000000..fc6d717c5 --- /dev/null +++ b/application/editormodenorms.cpp @@ -0,0 +1,420 @@ +/* +This Source Code Form is subject to the +terms of the Mozilla Public License, v. +2.0. If a copy of the MPL was not +distributed with this file, You can +obtain one at +http://mozilla.org/MPL/2.0/. +*/ + +#include "stdafx.h" +#include "application/editormodenorms.h" +#include "application/editorprojection.h" +#include "application/editormodeshared.h" +#include "editor/editorFormat.hpp" + +#include "simulation/simulation.h" +#include "utilities/Globals.h" +#include "utilities/Logs.h" +#include "world/Track.h" + +#include "imgui/imgui.h" +#include "utilities/translation.h" +#include +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + +double constexpr kLineReach{5000.0}; // m each way, for the line through the selected path +double constexpr kSceneryReach{20000.0}; // m each way, for the lines of the scenery +double constexpr kBranchReach{300.0}; // m each way around the diverging track of a switch +double constexpr kOverlayRange{3000.0}; + +bool rail(TTrack const &Track) +{ + return (Track.iCategoryFlag & 15) == 1 && false == Track.m_editorremoved && Track.m_road == nullptr && editor_track::is_supported(Track); +} + +std::vector spans_of(editor_track::route const &Route) +{ + std::vector result; + result.reserve(Route.spans.size()); + for (auto const &span : Route.spans) + result.push_back({span.track, span.path, span.forward}); + return result; +} + +int rank(norms::tier const Tier) +{ + switch (Tier) + { + case norms::tier::block: return 0; + case norms::tier::warn: return 1; + default: return 2; + } +} + +ImVec4 tier_colour(norms::tier const Tier) +{ + switch (Tier) + { + case norms::tier::block: return {1.0f, 0.45f, 0.4f, 1.0f}; + case norms::tier::warn: return {1.0f, 0.75f, 0.3f, 1.0f}; + default: return ImGui::GetStyleColorVec4(ImGuiCol_TextDisabled); + } +} + +std::string source_text(norms::finding const &Finding) +{ + if (Finding.from.document.empty()) + return "-"; + return std::string{Finding.from.document} + " " + std::string{Finding.from.place}; +} + +std::array constexpr kProfileKeys{"plk", "tsi", "en", "ch"}; + +} // namespace + +void norms_tool::start() +{ + auto &state{m_state}; + state.queue.clear(); + state.next = 0; + state.lines.clear(); + state.results.clear(); + state.selected = -1; + state.status.clear(); + state.options.profile = static_cast(std::clamp(state.profile, 0, static_cast(norms::profile_id::count) - 1)); + if (state.scope == 0) + { + auto *track{m_selection.selected_track()}; + if (track == nullptr || false == rail(*track)) + { + state.status = STR_C("Select a track first"); + return; + } + state.queue.push_back({spans_of(editor_track::run_route(*track, kLineReach)), -1}); + } + else + { + // the lines through the plain tracks, then each path of a switch none of them ran along, with the line it lies in + std::unordered_set covered; + std::set> switch_paths; + for (auto *track : simulation::Paths.sequence()) + { + if (track == nullptr || false == rail(*track) || track->eType != tt_Normal || covered.contains(track)) + continue; + auto const route{editor_track::run_route(*track, kSceneryReach)}; + for (auto const &span : route.spans) + { + if (span.track->eType == tt_Normal) + covered.insert(span.track); + else + switch_paths.emplace(span.track, span.path); + } + state.queue.push_back({spans_of(route), -1}); + } + for (auto *track : simulation::Paths.sequence()) + { + if (track == nullptr || false == rail(*track) || track->eType != tt_Switch) + continue; + for (int path = 0; path < static_cast(track->m_paths.size()); ++path) + { + if (switch_paths.contains({track, path})) + continue; + auto const route{editor_track::run_route(*track, kBranchReach, path)}; + auto const own{std::ranges::find_if(route.spans, [track, path](editor_track::route_span const &Span) { return Span.track == track && Span.path == path; })}; + if (own == route.spans.end()) + continue; + state.queue.push_back({spans_of(route), static_cast(std::distance(route.spans.begin(), own))}); + } + } + } + state.history = m_history.history_revision(); +} + +void norms_tool::update() +{ + auto &state{m_state}; + if (state.queue.empty()) + return; + auto const deadline{std::chrono::steady_clock::now() + std::chrono::milliseconds(15)}; + while (state.next < state.queue.size() && std::chrono::steady_clock::now() < deadline) + { + auto const &line{state.queue[state.next++]}; + auto checked{norms_report::check(line.spans, state.options, nullptr, line.own)}; + for (auto const &entry : checked.entries) + { + // a place two lines run through is listed once + if (std::ranges::none_of(state.results, [&entry](norms_report::entry const &Other) { + return Other.track == entry.track && Other.path == entry.path && Other.finding.what == entry.finding.what && Other.finding.level == entry.finding.level && + std::abs(Other.finding.value - entry.finding.value) < 1e-6; + })) + state.results.push_back(entry); + } + state.lines.push_back(std::move(checked)); + } + if (state.next >= state.queue.size()) + finish(); +} + +void norms_tool::finish() +{ + auto &state{m_state}; + // the worst first: the hard limits, the warnings, the values above the recommended ones + std::ranges::stable_sort(state.results, [](norms_report::entry const &A, norms_report::entry const &B) { return rank(A.finding.level) < rank(B.finding.level); }); + auto const count = [&state](norms::tier const Tier) { return std::ranges::count_if(state.results, [Tier](norms_report::entry const &Entry) { return Entry.finding.level == Tier; }); }; + state.status = format(STR_P("%zu line checked against %s: %d beyond the hard limits, %d warnings, %d above the recommended values", + "%zu lines checked against %s: %d beyond the hard limits, %d warnings, %d above the recommended values", static_cast(state.lines.size())), + state.lines.size(), + std::string{norms::profile_of(state.options.profile).name}.c_str(), static_cast(count(norms::tier::block)), static_cast(count(norms::tier::warn)), + static_cast(count(norms::tier::prefer))); + state.queue.clear(); + state.next = 0; + WriteLog("Editor: norms - " + state.status, logtype::generic); +} + +std::vector norms_tool::listed() const +{ + std::vector result; + for (int i = 0; i < static_cast(m_state.results.size()); ++i) + if (m_state.notes || m_state.results[i].finding.level != norms::tier::prefer) + result.push_back(i); + return result; +} + +void norms_tool::focus(int const Index) +{ + auto &state{m_state}; + if (Index < 0 || Index >= static_cast(state.results.size())) + return; + state.selected = Index; + auto const &entry{state.results[Index]}; + auto const &paths{simulation::Paths.sequence()}; + if (entry.track == nullptr || std::ranges::find(paths, entry.track) == paths.end() || entry.track->m_editorremoved) + return; + m_selection.set_current_node(entry.track); + m_view.focus_track(*entry.track, entry.path, entry.position); +} + +void norms_tool::forget(scene::basic_node const *Node) +{ + auto &state{m_state}; + auto const removed{std::erase_if(state.results, [Node](norms_report::entry const &Entry) { return Entry.track == Node; })}; + if (removed > 0) + state.selected = -1; + for (auto &line : state.lines) + std::erase_if(line.entries, [Node](norms_report::entry const &Entry) { return Entry.track == Node; }); + for (auto &line : state.queue) + std::erase_if(line.spans, [Node](norms_report::span const &Span) { return Span.track == Node; }); +} + +void norms_tool::render_class() +{ + auto &options{m_state.options}; + auto &line{options.line}; + if (begin_fields_fitted("##normsprofile", 0.55f, {"Profile"})) + { + field_row("Profile"); + auto const current{std::string{norms::profile_of(static_cast(m_state.profile)).name}}; + if (ImGui::BeginCombo("##normsprofile", current.c_str())) + { + for (int i = 0; i < static_cast(norms::profile_id::count); ++i) + if (ImGui::Selectable(std::string{norms::profile_of(static_cast(i)).name}.c_str(), i == m_state.profile)) + m_state.profile = i; + ImGui::EndCombo(); + } + item_tooltip("PLK: P0 recommended, beyond P1 a warning, beyond P2 the hard limit. The limits of the TSI hold in every profile"); + ImGui::EndTable(); + } + // the class of the line folded to a line of what it is + std::array const kinds{norms_report::traffic_name(norms::traffic::passenger), norms_report::traffic_name(norms::traffic::mixed), norms_report::traffic_name(norms::traffic::freight)}; + std::array const tracks{STR_C("main track"), STR_C("siding")}; + auto const vmin{line.vmin > 0.0 ? line.vmin : norms::slow_speed(line.kind, line.vmax)}; + auto const summary{format(STR_C("Line class: %.0f km/h, slow trains %.0f km/h, %s, %s"), line.vmax, vmin, kinds[static_cast(line.kind)], tracks[static_cast(line.track)])}; + if (false == ImGui::TreeNode("##normsclass", "%s", summary.c_str())) + return; + if (begin_fields_fitted("##normsclassfields", 0.55f, {"Line speed (km/h)", "Slow trains (km/h)", "Traffic", "Track", "Load (Tg a year)"})) + { + field_row("Line speed (km/h)"); + ImGui::InputDouble("##normsvmax", &line.vmax, 0.0, 0.0, "%.0f"); + item_tooltip("For the tracks with no speed of their own, or for all of them"); + field_row("Slow trains (km/h)"); + ImGui::InputDouble("##normsvmin", &line.vmin, 0.0, 0.0, "%.0f"); + item_tooltip("The cant excess is checked at this speed. 0: by the type of the line, ST-T1-A6 tab. 8.1"); + field_row("Traffic"); + auto kind{static_cast(line.kind)}; + if (ImGui::Combo("##normstraffic", &kind, kinds.data(), static_cast(kinds.size()))) + line.kind = static_cast(kind); + field_row("Track"); + auto track{static_cast(line.track)}; + if (ImGui::Combo("##normstrack", &track, tracks.data(), static_cast(tracks.size()))) + line.track = static_cast(track); + field_row("Load (Tg a year)"); + ImGui::InputDouble("##normsload", &line.load, 0.0, 0.0, "%.0f"); + item_tooltip("The tonnage over the track a year, for the cant excess of ST-T1-A6 tab. 9.8"); + ImGui::EndTable(); + } + line.vmax = std::clamp(line.vmax, 10.0, 350.0); + line.vmin = std::clamp(line.vmin, 0.0, line.vmax); + line.load = std::clamp(line.load, 0.0, 100.0); + ImGui::Checkbox(STR_C("The speed of the tracks where they have one"), &options.track_speeds); + bool platform{(line.features & norms::feature::platform) != 0}; + if (ImGui::Checkbox(STR_C("Tracks at a platform"), &platform)) + line.features = platform ? line.features | norms::feature::platform : line.features & ~norms::feature::platform; + ImGui::TextDisabled("%s", STR_C("Change the class, then Check again")); + ImGui::TreePop(); +} + +void norms_tool::render_results() +{ + auto &state{m_state}; + auto const listed_rows{listed()}; + bool const chosen{state.selected >= 0 && state.selected < static_cast(state.results.size())}; + auto const details{chosen ? ImGui::GetTextLineHeightWithSpacing() * 3.0f : 0.0f}; + // each column as wide as what's in it and its name and a little apart, the last one to the edge; the names stay at the top as the + // list scrolls + ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(std::round(ImGui::GetFontSize() * 0.6f), ImGui::GetStyle().CellPadding.y)); + // down to the bottom of the window, but some rows at least where the window is short (docked across the bottom), which scrolls then + auto const height{std::max(ImGui::GetContentRegionAvail().y - details, ImGui::GetTextLineHeightWithSpacing() * 8.0f)}; + if (ImGui::BeginTable("normsresults", 6, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_ScrollY | ImGuiTableFlags_BordersOuter, ImVec2(0.0f, height))) + { + for (int column = 0; column < 6; ++column) + ImGui::TableSetupColumn(nullptr, column == 5 ? ImGuiTableColumnFlags_WidthStretch : ImGuiTableColumnFlags_None); + ImGui::TableSetupScrollFreeze(0, 1); + ImGui::TableNextRow(); + for (auto const *header : {"Path", "Tier", "Parameter", "Value", "Limit", "Source"}) + { + ImGui::TableNextColumn(); + ImGui::TextDisabled("%s", STR_C(header)); + } + ImGuiListClipper clipper; + clipper.Begin(static_cast(listed_rows.size())); + while (clipper.Step()) + for (int row = clipper.DisplayStart; row < clipper.DisplayEnd; ++row) + { + auto const index{listed_rows[row]}; + auto const &entry{state.results[index]}; + auto const &finding{entry.finding}; + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::PushStyleColor(ImGuiCol_Text, tier_colour(finding.level)); + auto const name{entry.track != nullptr ? name_of(*entry.track) : std::string{"-"}}; + if (ImGui::Selectable((name + "##norms" + std::to_string(index)).c_str(), state.selected == index, ImGuiSelectableFlags_SpanAllColumns)) + focus(index); + ImGui::PopStyleColor(); + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("%s", norms_report::message(finding, entry.kind).c_str()); + ImGui::TableNextColumn(); + ImGui::TextColored(tier_colour(finding.level), "%s", norms_report::tier_name(finding.level)); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(norms_report::parameter_name(finding.what, entry.kind)); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(finding.what == norms::parameter::profile_boundary ? "-" : norms_report::value_text(finding.what, finding.value).c_str()); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(finding.what == norms::parameter::profile_boundary ? "-" : norms_report::value_text(finding.what, finding.limit).c_str()); + ImGui::TableNextColumn(); + ImGui::TextUnformatted(source_text(finding).c_str()); + } + ImGui::EndTable(); + } + ImGui::PopStyleVar(); + if (chosen) + { + auto const &entry{state.results[state.selected]}; + ImGui::TextWrapped("%s", norms_report::message(entry.finding, entry.kind).c_str()); + } +} + +void norms_tool::render_options() +{ + auto &state{m_state}; + ImGui::PushTextWrapPos(0.0f); + ImGui::TextDisabled("%s", STR_C("Checks the geometry of the tracks against the norms of a profile: what is beyond them is listed, nothing is changed")); + ImGui::PopTextWrapPos(); + segmented("normsscope", state.scope, {{0, STR_C("Line through the selected path")}, {1, STR_C("Whole scenery")}}); + render_class(); + if (false == state.queue.empty()) + { + auto const progress{static_cast(state.next) / static_cast(state.queue.size())}; + ImGui::ProgressBar(progress, ImVec2(-70.0f, 0.0f), format(STR_C("Checking %zu / %zu"), state.next, state.queue.size()).c_str()); + ImGui::SameLine(); + if (ImGui::SmallButton(STR_C("Cancel"))) + state.queue.resize(state.next); + } + else + { + ImGui::PushStyleColor(ImGuiCol_Button, ImGui::ColorConvertU32ToFloat4(family_colour(2, 0.55f))); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::ColorConvertU32ToFloat4(family_colour(2, 0.75f))); + if (ImGui::Button(STR_C("Check"), ImVec2(-1.0f, tall_button_height()))) + start(); + ImGui::PopStyleColor(2); + item_tooltip("The radius, the cant and its deficiency and excess, their changes along the ramps and the transitions and at the joints, the lengths of the straights, arcs and transitions, the vertical curves and the grades"); + } + if (false == state.status.empty()) + ImGui::TextWrapped("%s", state.status.c_str()); + if (state.results.empty()) + return; + if (state.history != m_history.history_revision()) + ImGui::TextColored(ImVec4(1.0f, 0.75f, 0.3f, 1.0f), "%s", STR_C("The scenery changed since the check")); + ImGui::Checkbox(STR_C("Above the recommended values too"), &state.notes); + render_results(); +} + +void norms_tool::draw_overlay() const +{ + auto const &state{m_state}; + if (false == state.open || state.results.empty()) + return; + screen_projection const projection; + auto *drawlist{ImGui::GetBackgroundDrawList(ImGui::GetMainViewport())}; + glm::dvec3 const camera{Global.pCamera.Pos}; + for (int i = 0; i < static_cast(state.results.size()); ++i) + { + auto const &entry{state.results[i]}; + auto const level{entry.finding.level}; + if (level == norms::tier::prefer || glm::distance(entry.position, camera) > kOverlayRange) + continue; + ImVec2 screen; + if (false == projection.project(entry.position, screen)) + continue; + auto colour{level == norms::tier::block ? IM_COL32(255, 70, 60, 230) : IM_COL32(255, 180, 60, 200)}; + if (i == state.selected) + colour = IM_COL32(255, 255, 80, 255); + drawlist->AddCircle(screen, 12.0f, colour, 16, 2.5f); + drawlist->AddText(ImVec2(screen.x + 14.0f, screen.y - 7.0f), colour, norms_report::parameter_name(entry.finding.what, entry.kind)); + } +} + +editor_selftest_result norms_tool::selftest(std::string const &Command, std::istringstream &Words) +{ + if (Command != "normsreport") + return editor_selftest_result::unhandled; + std::string file; + int scope{0}; + std::string profile{"plk"}; + double speed{0.0}; + Words >> file >> scope >> profile >> speed; + m_state.scope = scope; + auto const key{std::ranges::find(kProfileKeys, profile)}; + m_state.profile = key != kProfileKeys.end() ? static_cast(std::distance(kProfileKeys.begin(), key)) : 0; + if (speed > 0.0) + m_state.options.line.vmax = speed; + start(); + while (false == m_state.queue.empty()) + update(); + std::string text{norms_report::header(m_state.options)}; + for (auto const &line : m_state.lines) + text += norms_report::text(line, true); + std::ofstream out{file, std::ios::binary}; + out << text; + WriteLog(format("SELFTEST normsreport %s: %s", file.c_str(), m_state.status.c_str())); + return editor_selftest_result::handled; +} diff --git a/application/editormodenorms.h b/application/editormodenorms.h new file mode 100644 index 000000000..e3e492acd --- /dev/null +++ b/application/editormodenorms.h @@ -0,0 +1,65 @@ +/* +This Source Code Form is subject to the +terms of the Mozilla Public License, v. +2.0. If a copy of the MPL was not +distributed with this file, You can +obtain one at +http://mozilla.org/MPL/2.0/. +*/ + +#pragma once + +#include "application/editortool.h" +#include "editor/editorNormsReport.hpp" + +#include +#include + +// the norms of the track geometry checked on the tracks laid, read only: a line or the whole scenery against a profile and a class +// of the line, what's beyond the limits listed in the track analysis window, a row clicked showing the place +class norms_tool final : public editor_tool +{ + public: + norms_tool(editor_selection &Selection, editor_view &View, editor_history &History) : m_selection{Selection}, m_view{View}, m_history{History} {} + void update() override; + void draw_overlay() const override; + void render_options() override; + void forget(scene::basic_node const *Node) override; + editor_selftest_result selftest(std::string const &Command, std::istringstream &Words) override; + void set_open(bool const Open) { m_state.open = Open; } + // what the last check found, for the expectations of the self-test + std::vector const &results() const { return m_state.results; } + + private: + editor_selection &m_selection; + editor_view &m_view; + editor_history &m_history; + // a line to check: its paths, and the one span whose findings alone are kept (the diverging track of a switch), -1 all + struct pending + { + std::vector spans; + int own{-1}; + }; + struct state + { + bool open{false}; + int scope{0}; // 0: the line through the selected path, 1: the whole scenery + int profile{0}; + norms_report::options options; + bool notes{false}; // the values above the recommended ones listed too + std::vector queue; + std::size_t next{0}; + std::vector lines; + std::vector results; + int selected{-1}; + std::size_t history{0}; // size of the undo history at the check + std::string status; + }; + state m_state; + void start(); + void finish(); + void focus(int const Index); + std::vector listed() const; + void render_class(); + void render_results(); +}; diff --git a/application/editormodeselftest.cpp b/application/editormodeselftest.cpp index 240fea8fb..8cac340c5 100644 --- a/application/editormodeselftest.cpp +++ b/application/editormodeselftest.cpp @@ -151,6 +151,9 @@ editor_mode::selftest_result editor_mode::selftest_dispatch(std::string const &c // a line of known curves, the points along them clicked as a curve traced, the line they make logged // laychain | b | u | r | e | t | p... the points clicked, Backspace, undo, redo, Enter, Tab, the line logged // joints ... the joints check over the scenery, the issues around the points logged, every issue with free ends without points +// normsreport [scope 0|1] [plk|tsi|en|ch] [km/h] the tracks checked against the norms of the profile, the line through the +// selected path (0) or the whole scenery (1), the speed of the line class where the tracks have none: +// the report written to the file, its counts logged // route the route design of the path nearest the point, a curve or the whole line // routevertex , routearc , routeshare , routekm // routeapply, routetake as the buttons of the route design do it @@ -224,6 +227,7 @@ editor_mode::selftest_result editor_mode::selftest_dispatch(std::string const &c // expect track // expect route the track is a part of the line open in the route tool, or not // expect norms gauge [tolerance] the rail axes distance of the norms the tracks are laid to +// expect findings how many of the tier the last check of the norms found (normsreport) // expect height the height of the end of the first path // expect lift