Go to the documentation of this file.
5 #include <boost/variant/variant.hpp>
15 template <
typename ValueT>
17 using Type = std::decay_t<ValueT>;
19 template <
typename ValueT>
37 using Cache = boost::variant<bool, double, Id, int, Velocity>;
171 return value().c_str();
176 return value().c_str();
204 static constexpr
const char Type[] =
"type";
205 static constexpr
const char Subtype[] =
"subtype";
206 static constexpr
const char OneWay[] =
"one_way";
210 static constexpr
const char Location[] =
"location";
211 static constexpr
const char Dynamic[] =
"dynamic";
212 static constexpr
const char Color[] =
"color";
216 static constexpr
const char Ele[] =
"ele";
222 static constexpr
const char Name[] =
"name";
223 static constexpr
const char Region[] =
"region";
228 static constexpr
const char Area[] =
"area";
229 static constexpr
const char Fallback[] =
"fallback";
230 static constexpr
const char Width[] =
"width";
231 static constexpr
const char Height[] =
"height";
235 static constexpr
const char SignType[] =
"sign_type";
250 static std::string
tag(
const std::string& participant) {
253 static constexpr
const char Vehicle[] =
"vehicle";
263 static constexpr
const char Bicycle[] =
"bicycle";
264 static constexpr
const char Train[] =
"train";
273 static constexpr
const char Node[] =
"node";
274 static constexpr
const char Way[] =
"way";
275 static constexpr
const char Relation[] =
"relation";
276 static constexpr
const char Lanelet[] =
"lanelet";
282 static constexpr
const char LineThin[] =
"line_thin";
286 static constexpr
const char Wall[] =
"wall";
287 static constexpr
const char Fence[] =
"fence";
288 static constexpr
const char Zebra[] =
"zebra_marking";
291 static constexpr
const char Keepout[] =
"keepout";
292 static constexpr
const char StopLine[] =
"stop_line";
293 static constexpr
const char Virtual[] =
"virtual";
295 static constexpr
const char ZigZag[] =
"zig-zag";
296 static constexpr
const char LiftGate[] =
"lift_gate";
298 static constexpr
const char Gate[] =
"gate";
299 static constexpr
const char Door[] =
"door";
301 static constexpr
const char Rail[] =
"rail";
302 static constexpr
const char Bump[] =
"bump";
305 static constexpr
const char Solid[] =
"solid";
306 static constexpr
const char Dashed[] =
"dashed";
310 static constexpr
const char Straight[] =
"straight";
311 static constexpr
const char Left[] =
"left";
312 static constexpr
const char Right[] =
"right";
316 static constexpr
const char High[] =
"high";
317 static constexpr
const char Low[] =
"low";
320 static constexpr
const char Arrow[] =
"arrow";
321 static constexpr
const char Pole[] =
"pole";
322 static constexpr
const char Post[] =
"post";
323 static constexpr
const char Symbol[] =
"symbol";
324 static constexpr
const char Start[] =
"start";
325 static constexpr
const char End[] =
"end";
326 static constexpr
const char Dot[] =
"dot";
330 static constexpr
const char RedGreen[] =
"red_green";
332 static constexpr
const char Red[] =
"red";
333 static constexpr
const char Yellow[] =
"yellow";
334 static constexpr
const char White[] =
"white";
337 static constexpr
const char Road[] =
"road";
338 static constexpr
const char Highway[] =
"highway";
341 static constexpr
const char BusLane[] =
"bus_lane";
343 static constexpr
const char Walkway[] =
"walkway";
346 static constexpr
const char Stairs[] =
"stairs";
349 static constexpr
const char Nonurban[] =
"nonurban";
350 static constexpr
const char Urban[] =
"urban";
351 static constexpr
const char Private[] =
"private";
354 static constexpr
const char Parking[] =
"parking";
357 static constexpr
const char Building[] =
"building";
359 static constexpr
const char Exit[] =
"exit";
374 for (
const auto& o : obj) {
375 stream << o.first <<
": " << o.second <<
" ";
std::shared_ptr< Cache > cache_
cache for the last queried value
Optional< double > asDouble() const
interpret this attribute as double value
units::MPSQuantity Velocity
An attribute represents one value of a tag of a lanelet primitive.
static constexpr const char RedGreen[]
static constexpr const char LiftGate[]
static constexpr const char VehicleCar[]
static constexpr const char Vegetation[]
static constexpr const char BicycleLane[]
static constexpr const char StopLine[]
static constexpr const char Bump[]
static constexpr const char StraightRight[]
static constexpr const char Freespace[]
static constexpr const char JerseyBarrier[]
static constexpr const char LaneChange[]
static constexpr const char Yellow[]
static constexpr const char VehicleEmergency[]
static constexpr const char SpeedLimit[]
static constexpr const char Zebra[]
static constexpr const char Pedestrian[]
static constexpr const char Highway[]
static constexpr const char RoadBorder[]
static constexpr const char Train[]
static constexpr const char White[]
static constexpr const char Right[]
static constexpr const char LeftRight[]
Optional< Velocity > asVelocity() const
interpret this attribute as Velocity
static constexpr const char Low[]
static constexpr const char Ele[]
static constexpr const char VehicleCarElectric[]
bool operator==(const Attribute &lhs, const Attribute &rhs)
static constexpr const char High[]
static constexpr const char PedestrianMarking[]
static constexpr const char Left[]
static constexpr const char LineThin[]
std::ostream & operator<<(std::ostream &stream, const Attribute &obj)
static constexpr const char Region[]
static constexpr const char VehicleTruck[]
std::decay_t< ValueT > Type
static constexpr const char ZigZag[]
const std::string & value() const
gets the value of this attribute
static constexpr const char Dynamic[]
A general rule or limitation for a lanelet (abstract base class)
static std::string tag(const std::string &participant)
Obtain the tag for the participant override.
static constexpr const char Building[]
static constexpr const char PlayStreet[]
static constexpr const char Type[]
static constexpr const char Door[]
Represents a speed limit that affects a lanelet.
Expresses a generic traffic sign rule.
static constexpr const char Parking[]
static constexpr const char Exit[]
static constexpr const char Gate[]
static constexpr const char VehicleBus[]
static constexpr const char SignType[]
static constexpr const char ParticipantVehicle[]
static constexpr const char Trajectory[]
Famous Area class that represents a basic area as element of the map.
static constexpr const char Walkway[]
static constexpr const char Straight[]
static constexpr const char LaneChangeRight[]
Defines right of way restrictions.
static constexpr const char Virtual[]
boost::optional< T > Optional
static constexpr const char Wall[]
The famous (mutable) lanelet class.
Attribute(const std::string &value)
static constexpr const char Multipolygon[]
static constexpr AttributeNamesItem Map[]
Represents a traffic light restriction on the lanelet.
static constexpr const char Subtype[]
static constexpr const char Dot[]
static constexpr const char Crosswalk[]
static constexpr const char Width[]
Optional< Id > asId() const
interpret this attribute as an id
static constexpr const char OneWay[]
Lists which attribute strings are mapped to which enum value.
static constexpr const char EmergencyLane[]
parts of tag that have to be combined with either Participants:, OneWay: or SpeedLimit to generate an...
static constexpr const char Participant[]
static constexpr const char DashedSolid[]
Optional< bool > asBool() const
interpret this attribute as bool value
Attribute(std::string &&value)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
static constexpr const char End[]
static constexpr const char Height[]
static constexpr const char LaneChangeLeft[]
static constexpr const char Fence[]
static constexpr const char SpeedLimitMandatory[]
static constexpr const char Solid[]
static constexpr const char SharedWalkway[]
boost::variant< bool, double, Id, int, Velocity > Cache
Defines an all way stop. These are a special form of right of way, where all lanelets have to yield,...
static constexpr const char Curbstone[]
static constexpr const char Temporary[]
static constexpr const char Arrow[]
static constexpr const char SolidDashed[]
static constexpr const char LineThick[]
static constexpr const char SolidSolid[]
static constexpr const char Name[]
static constexpr const char Stairs[]
static constexpr const char Private[]
static constexpr const char Bicycle[]
static constexpr const char Vehicle[]
static constexpr const char VehicleCarCombustion[]
static constexpr const char Road[]
A hybrid map is just like a normal map with keys as string, but elements can also be accessed using a...
static constexpr const char Nonurban[]
static constexpr const char Node[]
static constexpr const char RedYellow[]
static constexpr const char Fallback[]
static constexpr const char Post[]
static constexpr const char Red[]
static constexpr const char BusLane[]
static constexpr const char Start[]
Common values for attributes are defined here.
Optional< ValueOfT< T > > as() const
templated version. Works ony for the as.. above
static constexpr const char Urban[]
static constexpr const char Color[]
static constexpr const char Way[]
static constexpr const char Keepout[]
static constexpr const char GuardRail[]
static constexpr const char VehicleMotorcycle[]
std::pair< const char *, const AttributeName > AttributeNamesItem
static constexpr const char Dashed[]
static constexpr const char RedYellowGreen[]
static constexpr const char Relation[]
AttributeName
Typical Attributes names within lanelet.
Attribute(const char *value)
static constexpr const char Visualization[]
static constexpr const char Symbol[]
static constexpr const char BikeMarking[]
void setValue(const std::string &value)
set the value of this attribute
static constexpr const char Pole[]
static constexpr const char TrafficIsland[]
static constexpr const char VehicleTaxi[]
std::string value_
internal value of this parameter
static constexpr const char Location[]
static constexpr const char ParticipantPedestrian[]
static constexpr const char Rail[]
static constexpr const char StraightLeft[]
typename internal::ValueOf< T >::Type ValueOfT
Optional< int > asInt() const
interpret this attribute as an int
lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52