|
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include <cstddef> |
| 4 | +#include <string> |
| 5 | +#include <vector> |
| 6 | + |
| 7 | +#include "domain/Geometry2D.h" |
| 8 | + |
| 9 | +namespace safecrowd::domain { |
| 10 | + |
| 11 | +enum class ZoneKind { |
| 12 | + Unknown, |
| 13 | + Room, |
| 14 | + Corridor, |
| 15 | + Exit, |
| 16 | + Intersection, |
| 17 | + Stair, |
| 18 | +}; |
| 19 | + |
| 20 | +enum class ConnectionKind { |
| 21 | + Unknown, |
| 22 | + Doorway, |
| 23 | + Opening, |
| 24 | + Exit, |
| 25 | + Stair, |
| 26 | + Ramp, |
| 27 | +}; |
| 28 | + |
| 29 | +enum class TravelDirection { |
| 30 | + Bidirectional, |
| 31 | + ForwardOnly, |
| 32 | + ReverseOnly, |
| 33 | + Closed, |
| 34 | +}; |
| 35 | + |
| 36 | +enum class ControlKind { |
| 37 | + Unknown, |
| 38 | + Gate, |
| 39 | + ExitControl, |
| 40 | + BarrierToggle, |
| 41 | +}; |
| 42 | + |
| 43 | +struct ElementProvenance { |
| 44 | + std::vector<std::string> sourceIds{}; |
| 45 | + std::vector<std::string> canonicalIds{}; |
| 46 | +}; |
| 47 | + |
| 48 | +struct Zone2D { |
| 49 | + std::string id{}; |
| 50 | + ZoneKind kind{ZoneKind::Unknown}; |
| 51 | + std::string label{}; |
| 52 | + Polygon2D area{}; |
| 53 | + std::size_t defaultCapacity{0}; |
| 54 | + bool isStair{false}; |
| 55 | + bool isRamp{false}; |
| 56 | + ElementProvenance provenance{}; |
| 57 | +}; |
| 58 | + |
| 59 | +struct Connection2D { |
| 60 | + std::string id{}; |
| 61 | + ConnectionKind kind{ConnectionKind::Unknown}; |
| 62 | + std::string fromZoneId{}; |
| 63 | + std::string toZoneId{}; |
| 64 | + double effectiveWidth{0.0}; |
| 65 | + TravelDirection directionality{TravelDirection::Bidirectional}; |
| 66 | + bool isStair{false}; |
| 67 | + bool isRamp{false}; |
| 68 | + LineSegment2D centerSpan{}; |
| 69 | + ElementProvenance provenance{}; |
| 70 | +}; |
| 71 | + |
| 72 | +struct Barrier2D { |
| 73 | + std::string id{}; |
| 74 | + Polyline2D geometry{}; |
| 75 | + bool blocksMovement{true}; |
| 76 | + ElementProvenance provenance{}; |
| 77 | +}; |
| 78 | + |
| 79 | +struct ControlPoint2D { |
| 80 | + std::string id{}; |
| 81 | + ControlKind kind{ControlKind::Unknown}; |
| 82 | + std::string targetId{}; |
| 83 | + bool defaultOpen{true}; |
| 84 | + ElementProvenance provenance{}; |
| 85 | +}; |
| 86 | + |
| 87 | +struct FacilityLayout2D { |
| 88 | + std::string id{}; |
| 89 | + std::string name{}; |
| 90 | + std::string levelId{}; |
| 91 | + std::vector<Zone2D> zones{}; |
| 92 | + std::vector<Connection2D> connections{}; |
| 93 | + std::vector<Barrier2D> barriers{}; |
| 94 | + std::vector<ControlPoint2D> controls{}; |
| 95 | +}; |
| 96 | + |
| 97 | +} // namespace safecrowd::domain |
0 commit comments