diff options
Diffstat (limited to 'tools/validator/validator.cpp')
| -rw-r--r-- | tools/validator/validator.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
| diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index 4149caa..e4c6324 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp | |||
| @@ -256,6 +256,22 @@ class Validator { | |||
| 256 | std::cout << "Port " << port_identifier.ShortDebugString() | 256 | std::cout << "Port " << port_identifier.ShortDebugString() |
| 257 | << " was defined multiple times." << std::endl; | 257 | << " was defined multiple times." << std::endl; |
| 258 | } | 258 | } |
| 259 | |||
| 260 | if (!port_info.target_connections_referenced_by.empty()) { | ||
| 261 | for (const HumanPort& port : port_info.definitions) { | ||
| 262 | if (port.has_required_door()) { | ||
| 263 | std::cout << "Port " << port_identifier.ShortDebugString() | ||
| 264 | << " has a required door but is the target of a connection:" | ||
| 265 | << std::endl; | ||
| 266 | |||
| 267 | for (const HumanConnection& connection : | ||
| 268 | port_info.target_connections_referenced_by) { | ||
| 269 | std::cout << " CONNECTION " << connection.ShortDebugString() | ||
| 270 | << std::endl; | ||
| 271 | } | ||
| 272 | } | ||
| 273 | } | ||
| 274 | } | ||
| 259 | } | 275 | } |
| 260 | 276 | ||
| 261 | void ValidatePainting(const PaintingIdentifier& painting_identifier, | 277 | void ValidatePainting(const PaintingIdentifier& painting_identifier, |
| @@ -279,6 +295,22 @@ class Validator { | |||
| 279 | std::cout << "Painting " << painting_identifier.ShortDebugString() | 295 | std::cout << "Painting " << painting_identifier.ShortDebugString() |
| 280 | << " was defined multiple times." << std::endl; | 296 | << " was defined multiple times." << std::endl; |
| 281 | } | 297 | } |
| 298 | |||
| 299 | if (!painting_info.target_connections_referenced_by.empty()) { | ||
| 300 | for (const HumanPainting& painting : painting_info.definitions) { | ||
| 301 | if (painting.has_required_door()) { | ||
| 302 | std::cout << "Painting " << painting_identifier.ShortDebugString() | ||
| 303 | << " has a required door but is the target of a connection:" | ||
| 304 | << std::endl; | ||
| 305 | |||
| 306 | for (const HumanConnection& connection : | ||
| 307 | painting_info.target_connections_referenced_by) { | ||
| 308 | std::cout << " CONNECTION " << connection.ShortDebugString() | ||
| 309 | << std::endl; | ||
| 310 | } | ||
| 311 | } | ||
| 312 | } | ||
| 313 | } | ||
| 282 | } | 314 | } |
| 283 | 315 | ||
| 284 | void ValidatePanel(const PanelIdentifier& panel_identifier, | 316 | void ValidatePanel(const PanelIdentifier& panel_identifier, |
| @@ -340,6 +372,22 @@ class Validator { | |||
| 340 | std::cout << "Panel " << panel_identifier.ShortDebugString() | 372 | std::cout << "Panel " << panel_identifier.ShortDebugString() |
| 341 | << " is missing an AP ID." << std::endl; | 373 | << " is missing an AP ID." << std::endl; |
| 342 | } | 374 | } |
| 375 | |||
| 376 | if (!panel_info.target_connections_referenced_by.empty()) { | ||
| 377 | for (const HumanPanel& panel : panel_info.definitions) { | ||
| 378 | if (panel.has_required_door()) { | ||
| 379 | std::cout << "Panel " << panel_identifier.ShortDebugString() | ||
| 380 | << " has a required door but is the target of a connection:" | ||
| 381 | << std::endl; | ||
| 382 | |||
| 383 | for (const HumanConnection& connection : | ||
| 384 | panel_info.target_connections_referenced_by) { | ||
| 385 | std::cout << " CONNECTION " << connection.ShortDebugString() | ||
| 386 | << std::endl; | ||
| 387 | } | ||
| 388 | } | ||
| 389 | } | ||
| 390 | } | ||
| 343 | } | 391 | } |
| 344 | 392 | ||
| 345 | void ValidateKeyholder(const KeyholderIdentifier& keyholder_identifier, | 393 | void ValidateKeyholder(const KeyholderIdentifier& keyholder_identifier, |
