ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
indicator_hint.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Thomas Lobig - initial implementation and API
13  ********************************************************************************/
14 
15 #pragma once
16 
17 #include <vector>
18 #include <string>
19 #include <map>
20 
21 namespace adore
22 {
23  namespace env
24  {
30  typedef int TIndicatorHintID;
31 
33  {
37  both
38  };
39 
41  {
42  public:
44  {
46  startX = 0.0;
47  startY = 0.0;
48  stopX = 0.0;
49  stopY = 0.0;
50  }
51 
52  constexpr static adore::env::IndicatorSide indicatorSideFromString(std::string_view key)
53  {
54  if (key.compare("left") == 0)
55  {
56  return IndicatorSide::left;
57  }
58  else if (key.compare("right") == 0)
59  {
60  return IndicatorSide::right;
61  }
62  else if (key.compare("both") == 0)
63  {
64  return IndicatorSide::both;
65  }
66  else // either "none" or unknown
67  {
68  return IndicatorSide::none;
69  }
70  }
71 
72  constexpr static std::string_view stringFromIndicatorSide(adore::env::IndicatorSide side)
73  {
74  switch (side)
75  {
77  return "none";
78  break;
80  return "left";
81  break;
83  return "right";
84  break;
86  return "both";
87  break;
88  default:
89  return "none";
90  }
91  }
92 
94  double startX;
95  double startY;
96  double stopX;
97  double stopY;
99  };
100 
101  typedef std::vector<IndicatorHint> TIndicatorHintList;
102  } // namespace env
103 } // namespace adore
IndicatorSide
Definition: indicator_hint.h:33
@ none
Definition: indicator_hint.h:34
@ right
Definition: indicator_hint.h:36
@ both
Definition: indicator_hint.h:37
@ left
Definition: indicator_hint.h:35
int TIndicatorHintID
indicator lights hints valid from startx/y to stopx/y - to be matched with corresponding borders
Definition: indicator_hint.h:30
std::vector< IndicatorHint > TIndicatorHintList
Definition: indicator_hint.h:101
Definition: areaofeffectconverter.h:20
Definition: indicator_hint.h:41
double stopX
Definition: indicator_hint.h:96
double stopY
Definition: indicator_hint.h:97
constexpr static adore::env::IndicatorSide indicatorSideFromString(std::string_view key)
Definition: indicator_hint.h:52
double startY
Definition: indicator_hint.h:95
IndicatorHint()
Definition: indicator_hint.h:43
TIndicatorHintID id
Definition: indicator_hint.h:98
IndicatorSide value
Definition: indicator_hint.h:93
double startX
Definition: indicator_hint.h:94
constexpr static std::string_view stringFromIndicatorSide(adore::env::IndicatorSide side)
Definition: indicator_hint.h:72