CARLA
RoadInfo.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 #include "carla/NonCopyable.h"
11 
12 #include <map>
13 #include <string>
14 #include <vector>
15 
16 namespace carla {
17 namespace road {
18 namespace element {
19 
20  class RoadInfo : private NonCopyable {
21  public:
22 
23  virtual ~RoadInfo() = default;
24 
25  virtual void AcceptVisitor(RoadInfoVisitor &) = 0;
26 
27  /// Distance from road's start location.
28  double GetDistance() const {
29  return _s;
30  }
31 
32  protected:
33 
34  RoadInfo(double distance = 0.0) : _s(distance) {}
35 
36  private:
37 
38  double _s;
39  };
40 
41 } // namespace element
42 } // namespace road
43 } // namespace carla
double GetDistance() const
Distance from road&#39;s start location.
Definition: RoadInfo.h:28
virtual void AcceptVisitor(RoadInfoVisitor &)=0
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
RoadInfo(double distance=0.0)
Definition: RoadInfo.h:34
Inherit (privately) to suppress copy/move construction and assignment.