Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::RouteSegment Class Reference

RouteSegment object. More...

Inheritance diagram for gem::RouteSegment:
Collaboration diagram for gem::RouteSegment:

Public Member Functions

 RouteSegment (const RouteSegment &obj)=default
 Default copy constructor.
 RouteSegment (RouteSegment &&obj)=default
 Default move constructor.
RouteSegment & operator= (const RouteSegment &obj)=default
 noexcept is deduced
RouteSegment & operator= (RouteSegment &&obj)=default
 Default move assignment.
const PTRouteSegmentRef toPTRouteSegment () const noexcept
 noexcept is deduced
const EVRouteSegmentRef toEVRouteSegment () const noexcept
 Convert to an EVRouteSegment from this one.
LandmarkList getWaypoints () const noexcept
 Get the list containing segment start and end waypoints.
TimeDistance getTimeDistance () const noexcept
 Get length in meters and estimated travel time in seconds for the route / route segment.
RectangleGeographicArea getGeographicArea () const noexcept
 Get geographic area of the route.
bool getIncursCosts () const noexcept
 Method to check if traveling the route or route segment incurs cost to the user.
String getSummary () const noexcept
 Get summary of the route segment.
RouteInstructionList getInstructions () const noexcept
 Get route instructions list.
bool isCommon () const noexcept
 Check if this segment is of common type.
bool isEV () const noexcept
 Check if this instruction is part of an EV route.
TollSectionList getTollSections () const noexcept
 Get segment toll sections.

Detailed Description

RouteSegment object.

Implements share-read / copy-on-write Api object over RouteSegmentBase.

Constructor & Destructor Documentation

◆ RouteSegment() [1/2]

gem::RouteSegment::RouteSegment ( const RouteSegment & obj)
default

Default copy constructor.

Parameters
objRouteSegment to copy from.

◆ RouteSegment() [2/2]

gem::RouteSegment::RouteSegment ( RouteSegment && obj)
default

Default move constructor.

Parameters
objRouteSegment to move from.

Member Function Documentation

◆ getGeographicArea()

RectangleGeographicArea gem::RouteSegmentBase::getGeographicArea ( ) const
inlinenoexceptinherited

Get geographic area of the route.

The geographic area is the smallest rectangle that can be drawn around the route.

Returns
Geographic area covered by the route, represented as a GeographicArea object.

◆ getIncursCosts()

bool gem::RouteSegmentBase::getIncursCosts ( ) const
inlinenoexceptinherited

Method to check if traveling the route or route segment incurs cost to the user.

Returns
True if the route incurs costs, false otherwise.

◆ getInstructions()

RouteInstructionList gem::RouteSegmentBase::getInstructions ( ) const
inlinenoexceptinherited

Get route instructions list.

Returns
A list of route instructions for the route segment.

◆ getSummary()

String gem::RouteSegmentBase::getSummary ( ) const
inlinenoexceptinherited

Get summary of the route segment.

Returns
A string containing the summary of the route segment.

◆ getTimeDistance()

TimeDistance gem::RouteSegmentBase::getTimeDistance ( ) const
inlinenoexceptinherited

Get length in meters and estimated travel time in seconds for the route / route segment.

Returns
Time and distance information for the route, encapsulated in a TimeDistance object.

◆ getTollSections()

TollSectionList gem::RouteSegmentBase::getTollSections ( ) const
inlinenoexceptinherited

Get segment toll sections.

Returns
The error code. On success, the toll sections are returned

◆ getWaypoints()

LandmarkList gem::RouteSegmentBase::getWaypoints ( ) const
inlinenoexceptinherited

Get the list containing segment start and end waypoints.

Returns
A List of Landmarks along the route

◆ isCommon()

bool gem::RouteSegmentBase::isCommon ( ) const
inlinenoexceptinherited

Check if this segment is of common type.

A common type route segment has the same travel mode as the parent route.

E.g. a walk segment in a public transport route has isCommon = false

Returns
True if the segment is common type, false otherwise.

◆ isEV()

bool gem::RouteSegmentBase::isEV ( ) const
inlinenoexceptinherited

Check if this instruction is part of an EV route.

Returns
True if it is an EV route, false otherwise.

◆ operator=() [1/2]

RouteSegment & gem::RouteSegment::operator= ( const RouteSegment & obj)
default

noexcept is deduced

Default copy assignment

Parameters
objRouteSegment to copy from.
Returns
RouteSegment reference.

◆ operator=() [2/2]

RouteSegment & gem::RouteSegment::operator= ( RouteSegment && obj)
default

Default move assignment.

Parameters
objRouteSegment to move from.
Returns
RouteSegment reference.

◆ toEVRouteSegment()

const EVRouteSegmentRef gem::RouteSegment::toEVRouteSegment ( ) const
inlinenoexcept

Convert to an EVRouteSegment from this one.

Returns
EVRouteSegment reference.

◆ toPTRouteSegment()

const PTRouteSegmentRef gem::RouteSegment::toPTRouteSegment ( ) const
inlinenoexcept

noexcept is deduced

Convert to a PTRouteSegment from this one

Returns
PTRouteSegment reference.