maliput_malidrive
LaneTravelDirection Class Reference

Detailed Description

Hold the travel direction of a lane obtained from parsing a userData XML node.

An userData node example:

<userData>
<vectorLane travelDir="undirected"/>
</userData>

#include <src/maliput_malidrive/builder/builder_tools.h>

Public Types

enum  Direction {
  kUndirected = 0, kForward, kBackward, kBidirectional,
  kUndefined
}
 Possible directions obtained from the XODR. More...
 

Public Member Functions

 LaneTravelDirection ()=delete
 
 LaneTravelDirection (const std::optional< std::string > &user_data)
 Constructs a LaneTravelDirection. More...
 
Direction GetXodrTravelDir () const
 
std::string GetMaliputTravelDir () const
 Matches the travel direction with Maliput's standard. More...
 

Member Enumeration Documentation

◆ Direction

enum Direction
strong

Possible directions obtained from the XODR.

Note: "Undefined" refer to when travel direction information is omitted or node isn't well formed.

Enumerator
kUndirected 
kForward 
kBackward 
kBidirectional 
kUndefined 

Constructor & Destructor Documentation

◆ LaneTravelDirection() [1/2]

LaneTravelDirection ( )
delete

◆ LaneTravelDirection() [2/2]

LaneTravelDirection ( const std::optional< std::string > &  user_data)
explicit

Constructs a LaneTravelDirection.

Parameters
user_dataContains a UserData XMLNode that holds information about the direction of the lane.
Exceptions
maliput::common::assertion_errorWhen the travel direction information is not compatible.

Member Function Documentation

◆ GetMaliputTravelDir()

std::string GetMaliputTravelDir ( ) const

Matches the travel direction with Maliput's standard.

See also
maliput::BuildDirectionUsageRuleType().
Returns
The direction usage of the lane.

◆ GetXodrTravelDir()

Direction GetXodrTravelDir ( ) const
Returns
The direction of the lane describend in the userData XML node.

The documentation for this class was generated from the following files: