Drake
branch_point.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <memory>
5 #include <vector>
6 
11 
12 namespace drake {
13 namespace maliput {
14 namespace dragway {
15 
16 class BranchPoint;
17 class Lane;
18 
21 class LaneEndSet final : public api::LaneEndSet {
22  public:
24 
25  explicit LaneEndSet(const api::Lane* lane, api::LaneEnd::Which which_end)
26  : end_(lane, which_end) {}
27 
28  ~LaneEndSet() override = default;
29 
30  private:
31  int do_size() const override { return 1; }
32 
33  const api::LaneEnd& do_get(int) const override { return end_; }
34 
35  const api::LaneEnd end_;
36 };
37 
38 
40 class BranchPoint final : public api::BranchPoint {
41  public:
43 
44 
45  BranchPoint(const api::BranchPointId& id, const Lane* lane,
57  const api::RoadGeometry* road_geometry);
58 
59  ~BranchPoint() final = default;
60 
61  private:
62  const api::BranchPointId do_id() const override { return id_; }
63 
64  const api::RoadGeometry* do_road_geometry() const override;
65 
66  const api::LaneEndSet* DoGetConfluentBranches(
67  const api::LaneEnd& end) const override;
68 
69  const api::LaneEndSet* DoGetOngoingBranches(
70  const api::LaneEnd& end) const override;
71 
72  std::unique_ptr<api::LaneEnd> DoGetDefaultBranch(
73  const api::LaneEnd& end) const override;
74 
75  const api::LaneEndSet* DoGetASide() const override;
76 
77  const api::LaneEndSet* DoGetBSide() const override;
78 
79  const api::BranchPointId id_;
80  const api::RoadGeometry* road_geometry_{};
81  const LaneEndSet start_side_lane_end_set_;
82  const LaneEndSet finish_side_lane_end_set_;
83 };
84 
85 } // namespace dragway
86 } // namespace maliput
87 } // namespace drake
Dragway&#39;s implementation of api::LaneEndSet.
Definition: branch_point.h:21
A BranchPoint is a node in the network of a RoadGeometry at which Lanes connect to one another...
Definition: branch_point.h:66
A specific endpoint of a specific Lane.
Definition: lane_data.h:22
Definition: automotive_demo.cc:88
Dragway&#39;s implementation of api::Lane.
Definition: lane.h:73
Abstract API for the geometry of a road network, including both the network topology and the geometry...
Definition: road_geometry.h:26
TypeSpecificIdentifier< class BranchPoint > BranchPointId
Definition: branch_point.h:18
A set of LaneEnds.
Definition: branch_point.h:22
Dragway&#39;s implementation of api::BranchPoint.
Definition: branch_point.h:40
#define DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN deletes the special member functions for copy-construction, copy-assignment, move-construction, and move-assignment.
Definition: drake_copyable.h:35
Provides careful macros to selectively enable or disable the special member functions for copy-constr...