HAL
hal::LaneIndex Class Reference

#include <net_layout_junction.h>

Collaboration diagram for hal::LaneIndex:
Collaboration graph

Public Types

enum  HVIndex { Horizontal , Vertical }
 

Public Member Functions

 LaneIndex (HVIndex ihv, int ilane)
 
 operator int () const
 
LaneIndexoperator++ ()
 
LaneIndexoperator-- ()
 
HVIndex hvIndex () const
 
int laneIndex () const
 
bool isHorizontal () const
 
bool isVertical () const
 

Static Public Member Functions

static LaneIndex horizontal (int ilane)
 
static LaneIndex vertical (int ilane)
 

Friends

uint qHash (const LaneIndex &ri)
 

Detailed Description

Condensed lane index comprises information whether road is horizontal or vertical

Definition at line 29 of file net_layout_junction.h.

Member Enumeration Documentation

◆ HVIndex

Enumerator
Horizontal 
Vertical 

Definition at line 34 of file net_layout_junction.h.

Constructor & Destructor Documentation

◆ LaneIndex()

hal::LaneIndex::LaneIndex ( HVIndex  ihv,
int  ilane 
)
inline

Constructor

Parameters
ihvHorizontal or Vertical
ilaneLane index

Definition at line 41 of file net_layout_junction.h.

Referenced by horizontal(), and vertical().

Member Function Documentation

◆ horizontal()

static LaneIndex hal::LaneIndex::horizontal ( int  ilane)
inlinestatic

Construct horizontal lane

Parameters
ilane- lane index

Definition at line 88 of file net_layout_junction.h.

References Horizontal, and LaneIndex().

◆ hvIndex()

HVIndex hal::LaneIndex::hvIndex ( ) const
inline

Getter for road direction

Returns
Horizontal or Vertical

Definition at line 64 of file net_layout_junction.h.

Referenced by isHorizontal(), and isVertical().

◆ isHorizontal()

bool hal::LaneIndex::isHorizontal ( ) const
inline

Convenience method to check whether road direction is horizontal

Returns
true if horizontal, false otherwise

Definition at line 76 of file net_layout_junction.h.

References Horizontal, and hvIndex().

◆ isVertical()

bool hal::LaneIndex::isVertical ( ) const
inline

Convenience method to check whether road direction is vertical

Returns
true if vertical, false otherwise

Definition at line 82 of file net_layout_junction.h.

References hvIndex(), and Vertical.

◆ laneIndex()

int hal::LaneIndex::laneIndex ( ) const
inline

Getter for lane index

Returns
The index (might be negative)

Definition at line 70 of file net_layout_junction.h.

◆ operator int()

hal::LaneIndex::operator int ( ) const
inline

Cast to integer, mainly used as index

Definition at line 46 of file net_layout_junction.h.

◆ operator++()

LaneIndex& hal::LaneIndex::operator++ ( )
inline

Increment to next parallel lane

Returns
The incremented index

Definition at line 52 of file net_layout_junction.h.

◆ operator--()

LaneIndex& hal::LaneIndex::operator-- ( )
inline

Decrement to previous parallel lane

Returns
The decremented index

Definition at line 58 of file net_layout_junction.h.

◆ vertical()

static LaneIndex hal::LaneIndex::vertical ( int  ilane)
inlinestatic

Construct vertical lane

Parameters
ilane- lane index

Definition at line 94 of file net_layout_junction.h.

References LaneIndex(), and Vertical.

Friends And Related Function Documentation

◆ qHash

uint qHash ( const LaneIndex ri)
friend

Definition at line 956 of file net_layout_junction.cpp.


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