CARLA
RoadInfoGeometry.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 
9 #include "carla/Debug.h"
12 
13 namespace carla {
14 namespace road {
15 namespace element {
16 
17  class RoadInfoGeometry final : public RoadInfo {
18  public:
19 
20  RoadInfoGeometry(double s, std::unique_ptr<Geometry> &&geom)
21  : RoadInfo(s),
22  _geom(std::move(geom)) {
23  DEBUG_ASSERT(_geom != nullptr);
24  }
25 
26  void AcceptVisitor(RoadInfoVisitor &v) final {
27  v.Visit(*this);
28  }
29 
30  const Geometry &GetGeometry() const {
31  return *_geom;
32  }
33 
34  private:
35 
36  const std::unique_ptr<const Geometry> _geom;
37  };
38 
39 } // namespace element
40 } // namespace road
41 } // namespace carla
RoadInfoGeometry(double s, std::unique_ptr< Geometry > &&geom)
const std::unique_ptr< const Geometry > _geom
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
#define DEBUG_ASSERT(predicate)
Definition: Debug.h:66
const Geometry & GetGeometry() const
void AcceptVisitor(RoadInfoVisitor &v) final