CARLA
RoadInfoSpeed.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
10 
11 namespace carla {
12 namespace road {
13 namespace element {
14 
15  class RoadInfoSpeed final : public RoadInfo {
16  public:
17 
18  RoadInfoSpeed(double s, double speed)
19  : RoadInfo(s),
20  _speed(speed) {}
21 
22  void AcceptVisitor(RoadInfoVisitor &v) final {
23  v.Visit(*this);
24  }
25 
26  double GetSpeed() const {
27  return _speed;
28  }
29 
30  private:
31 
32  const double _speed;
33  };
34 
35 } // namespace element
36 } // namespace road
37 } // namespace carla
RoadInfoSpeed(double s, double speed)
Definition: RoadInfoSpeed.h:18
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
void AcceptVisitor(RoadInfoVisitor &v) final
Definition: RoadInfoSpeed.h:22