| 13 | namespace routing |
| 14 | { |
| 15 | class JointSegment |
| 16 | { |
| 17 | public: |
| 18 | static auto constexpr kInvalidSegmentId = std::numeric_limits<uint32_t>::max(); |
| 19 | |
| 20 | JointSegment() = default; |
| 21 | JointSegment(Segment const & from, Segment const & to); |
| 22 | |
| 23 | uint32_t GetFeatureId() const { return m_featureId; } |
| 24 | NumMwmId GetMwmId() const { return m_numMwmId; } |
| 25 | uint32_t GetStartSegmentId() const { return m_startSegmentId; } |
| 26 | uint32_t GetEndSegmentId() const { return m_endSegmentId; } |
| 27 | uint32_t GetSegmentId(bool start) const { return start ? m_startSegmentId : m_endSegmentId; } |
| 28 | bool IsForward() const { return m_forward; } |
| 29 | |
| 30 | void AssignID(Segment const & seg); |
| 31 | void AssignID(JointSegment const & seg); |
| 32 | |
| 33 | static JointSegment MakeFake(uint32_t fakeId, uint32_t featureId = kInvalidFeatureId); |
| 34 | bool IsFake() const; |
| 35 | |
| 36 | Segment GetSegment(bool start) const; |
| 37 | |
| 38 | bool operator<(JointSegment const & rhs) const; |
| 39 | bool operator==(JointSegment const & rhs) const; |
| 40 | bool operator!=(JointSegment const & rhs) const { return !(*this == rhs); } |
| 41 | |
| 42 | private: |
| 43 | uint32_t m_featureId = kInvalidFeatureId; |
| 44 | |
| 45 | uint32_t m_startSegmentId = kInvalidSegmentId; |
| 46 | uint32_t m_endSegmentId = kInvalidSegmentId; |
| 47 | |
| 48 | NumMwmId m_numMwmId = kFakeNumMwmId; |
| 49 | bool m_forward = false; |
| 50 | }; |
| 51 | |
| 52 | class JointEdge |
| 53 | { |
no outgoing calls
no test coverage detected