diff options
Diffstat (limited to 'tools/validator/validator.cpp')
-rw-r--r-- | tools/validator/validator.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index 9c66e09..fd004d7 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp | |||
@@ -45,6 +45,9 @@ class Validator { | |||
45 | for (const auto& [panel_name, panel_info] : info_.panel_names) { | 45 | for (const auto& [panel_name, panel_info] : info_.panel_names) { |
46 | ValidatePanelName(panel_name, panel_info); | 46 | ValidatePanelName(panel_name, panel_info); |
47 | } | 47 | } |
48 | for (const auto& [prog_name, prog_info] : info_.progressives) { | ||
49 | ValidateProgressive(prog_name, prog_info); | ||
50 | } | ||
48 | } | 51 | } |
49 | 52 | ||
50 | private: | 53 | private: |
@@ -164,6 +167,11 @@ class Validator { | |||
164 | std::cout << " CONNECTION " << connection.ShortDebugString() | 167 | std::cout << " CONNECTION " << connection.ShortDebugString() |
165 | << std::endl; | 168 | << std::endl; |
166 | } | 169 | } |
170 | |||
171 | for (const std::string& prog_name : | ||
172 | door_info.progressives_referenced_by) { | ||
173 | std::cout << " PROGRESSIVE " << prog_name << std::endl; | ||
174 | } | ||
167 | } else if (door_info.definitions.size() > 1) { | 175 | } else if (door_info.definitions.size() > 1) { |
168 | std::cout << "Door " << door_identifier.ShortDebugString() | 176 | std::cout << "Door " << door_identifier.ShortDebugString() |
169 | << " was defined multiple times." << std::endl; | 177 | << " was defined multiple times." << std::endl; |
@@ -369,6 +377,14 @@ class Validator { | |||
369 | } | 377 | } |
370 | } | 378 | } |
371 | 379 | ||
380 | void ValidateProgressive(const std::string& prog_name, | ||
381 | const ProgressiveInfo& prog_info) const { | ||
382 | if (prog_info.definitions.size() > 1) { | ||
383 | std::cout << "Progressive \"" << prog_name | ||
384 | << "\" has multiple definitions." << std::endl; | ||
385 | } | ||
386 | } | ||
387 | |||
372 | const CollectedInfo& info_; | 388 | const CollectedInfo& info_; |
373 | }; | 389 | }; |
374 | 390 | ||