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

RouteTrafficEvent object. More...

Inheritance diagram for gem::RouteTrafficEvent:
Collaboration diagram for gem::RouteTrafficEvent:

Public Member Functions

 RouteTrafficEvent (const RouteTrafficEvent &event)=default
 Default copy constructor.
 RouteTrafficEvent (RouteTrafficEvent &&event)=default
 Default move constructor noexcept is deduced.
RouteTrafficEvent & operator= (const RouteTrafficEvent &event)=default
 Default copy assignment.
RouteTrafficEvent & operator= (RouteTrafficEvent &&event)=default
 Default move assignment noexcept is deduced.
int getDistanceToDestination () const noexcept
 Get the distance in meters from starting point on current route of the traffic event to the destination.
const CoordinatesRef getFrom () const noexcept
 Get the route traffic event start point.
const CoordinatesRef getTo () const noexcept
 Get the route traffic event end point.
std::pair< Landmark, bool > getFromLandmark () const noexcept
 Get the traffic event start point as landmark.
std::pair< Landmark, bool > getToLandmark () const noexcept
 Get the traffic event end point as landmark.
void asyncUpdateToFromData (ProgressListener listener) const
 Update the local data needed for "from" and "to" landmarks address and description.
void cancelUpdate ()
 Cancel the local data update for "from" and "to" landmarks.
bool isRoadblock () const noexcept
 Check if this traffic event is a roadblock.
int getDelay () const noexcept
 Get the estimated delay in seconds caused by the traffic event.
int getLength () const noexcept
 Get the length in meters of the road segment affected by the traffic event.
ETrafficEventImpactZone getImpactZone () const noexcept
 Get the traffic event impact zone.
const CoordinatesRef getReferencePoint () const noexcept
 Get the traffic event reference point.
RectangleGeographicArea getBoundingBox () const noexcept
 Get the bounding box of the traffic event.
GeographicArea getArea () const noexcept
 Get the area of the traffic event.
bool isAntiArea () const noexcept
 Check if the impact zone is the anti-area of the event area.
const StringRef getDescription () const noexcept
 Get the description of the traffic event.
ETrafficEventClass getEventClass () const noexcept
 Get the traffic event class.
ETrafficEventSeverity getEventSeverity () const noexcept
 Get the traffic event severity.
const ImageRef getImage () const noexcept
 Get the image of the traffic event.
const StringRef getPreviewUrl () const noexcept
 Get the traffic event preview URL.
int getPreviewData (ParameterList &params, ProgressListener listener) const noexcept
 Get the traffic preview data as a list of parameters.
void cancelGetPreviewData (ProgressListener listener) const noexcept
 Cancel a previous call of getPreviewData.
bool isUserRoadblock () const noexcept
 Check if the traffic event is a user roadblock.
int getAffectedTransportMode () const noexcept
 Get affected transport modes.
Time getStartTime () const noexcept
 Get start time ( UTC ).
Time getEndTime () const noexcept
 Get end time ( UTC ).
bool isActive () const noexcept
 Check if traffic event is active ( i.e.
bool isExpired () const noexcept
 Check if traffic event is expired ( i.e.
bool hasOppositeSibling () const noexcept
 Check if event has a sibling on opposite direction.

Detailed Description

RouteTrafficEvent object.

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

Constructor & Destructor Documentation

◆ RouteTrafficEvent() [1/2]

gem::RouteTrafficEvent::RouteTrafficEvent ( const RouteTrafficEvent & event)
default

Default copy constructor.

Parameters
eventThe route traffic event to copy

◆ RouteTrafficEvent() [2/2]

gem::RouteTrafficEvent::RouteTrafficEvent ( RouteTrafficEvent && event)
default

Default move constructor noexcept is deduced.

Parameters
eventThe route traffic event to move

Member Function Documentation

◆ asyncUpdateToFromData()

void gem::RouteTrafficEvent::asyncUpdateToFromData ( ProgressListener listener) const
inline

Update the local data needed for "from" and "to" landmarks address and description.

Parameters
[in]listenerThe progress listener

◆ cancelGetPreviewData()

void gem::TrafficEvent::cancelGetPreviewData ( ProgressListener listener) const
inlinenoexceptinherited

Cancel a previous call of getPreviewData.

Parameters
[in]listenerThe progress listener

◆ cancelUpdate()

void gem::RouteTrafficEvent::cancelUpdate ( )
inline

Cancel the local data update for "from" and "to" landmarks.

The operation is synchronous, after it returns the update listener will not be used anymore

◆ getAffectedTransportMode()

int gem::TrafficEvent::getAffectedTransportMode ( ) const
inlinenoexceptinherited

Get affected transport modes.

Returns
The affected transport modes. See gem::ERouteTransportMode.

◆ getArea()

GeographicArea gem::TrafficEvent::getArea ( ) const
inlinenoexceptinherited

Get the area of the traffic event.

If the impact zone if TEIZ_Path, the area is the bounding box.

If the impact zone if TEIZ_Area, the area is the geographic area with which the event was defined

Returns
The geographic area

◆ getBoundingBox()

RectangleGeographicArea gem::TrafficEvent::getBoundingBox ( ) const
inlinenoexceptinherited

Get the bounding box of the traffic event.

Returns
The bounding box

◆ getDelay()

int gem::TrafficEvent::getDelay ( ) const
inlinenoexceptinherited

Get the estimated delay in seconds caused by the traffic event.

For roadblocks it will return -1.

Returns
The delay in seconds.

◆ getDescription()

const StringRef gem::TrafficEvent::getDescription ( ) const
inlinenoexceptinherited

Get the description of the traffic event.

Returns
The description

◆ getDistanceToDestination()

int gem::RouteTrafficEvent::getDistanceToDestination ( ) const
inlinenoexcept

Get the distance in meters from starting point on current route of the traffic event to the destination.

Returns
The distance in meters.

◆ getEndTime()

Time gem::TrafficEvent::getEndTime ( ) const
inlinenoexceptinherited

Get end time ( UTC ).

Returns
The end time

◆ getEventClass()

ETrafficEventClass gem::TrafficEvent::getEventClass ( ) const
inlinenoexceptinherited

Get the traffic event class.

Returns
The traffic event class

◆ getEventSeverity()

ETrafficEventSeverity gem::TrafficEvent::getEventSeverity ( ) const
inlinenoexceptinherited

Get the traffic event severity.

Returns
The traffic event severity

◆ getFrom()

const CoordinatesRef gem::RouteTrafficEvent::getFrom ( ) const
inlinenoexcept

Get the route traffic event start point.

Returns
The start point

◆ getFromLandmark()

std::pair< Landmark, bool > gem::RouteTrafficEvent::getFromLandmark ( ) const
inlinenoexcept

Get the traffic event start point as landmark.

Returns
Pair of <Landmark, data locally cached flag>. If the landmark has no local data cached the description and address info is empty. A call to asyncUpdateToFromData must be done in order gather information from server.

◆ getImage()

const ImageRef gem::TrafficEvent::getImage ( ) const
inlinenoexceptinherited

Get the image of the traffic event.

If the traffic event doesn't have an image the Image::isValid() will return false

Returns
The image

◆ getImpactZone()

ETrafficEventImpactZone gem::TrafficEvent::getImpactZone ( ) const
inlinenoexceptinherited

Get the traffic event impact zone.

Returns
The impact zone type

◆ getLength()

int gem::TrafficEvent::getLength ( ) const
inlinenoexceptinherited

Get the length in meters of the road segment affected by the traffic event.

Returns
The length in meters.

◆ getPreviewData()

int gem::TrafficEvent::getPreviewData ( ParameterList & params,
ProgressListener listener ) const
inlinenoexceptinherited

Get the traffic preview data as a list of parameters.

Parameters
[out]paramsThe list of parameters to fill with the preview data
[in]listenerThe progress listener
Returns
The error code

◆ getPreviewUrl()

const StringRef gem::TrafficEvent::getPreviewUrl ( ) const
inlinenoexceptinherited

Get the traffic event preview URL.

Returns
The preview URL

◆ getReferencePoint()

const CoordinatesRef gem::TrafficEvent::getReferencePoint ( ) const
inlinenoexceptinherited

Get the traffic event reference point.

If the traffic event doesn't have a reference point the Coordinates::hasCoordinates() will return false

Returns
The reference point

◆ getStartTime()

Time gem::TrafficEvent::getStartTime ( ) const
inlinenoexceptinherited

Get start time ( UTC ).

Returns
The start time

◆ getTo()

const CoordinatesRef gem::RouteTrafficEvent::getTo ( ) const
inlinenoexcept

Get the route traffic event end point.

Returns
The end point

◆ getToLandmark()

std::pair< Landmark, bool > gem::RouteTrafficEvent::getToLandmark ( ) const
inlinenoexcept

Get the traffic event end point as landmark.

Returns
Pair of <Landmark, data locally cached flag>. If the landmark has no local data cached the description and address info is empty. A call to asyncUpdateToFromData must be done in order gather information from server.

◆ hasOppositeSibling()

bool gem::TrafficEvent::hasOppositeSibling ( ) const
inlinenoexceptinherited

Check if event has a sibling on opposite direction.

Returns
True if the event has a sibling on opposite direction

◆ isActive()

bool gem::TrafficEvent::isActive ( ) const
inlinenoexceptinherited

Check if traffic event is active ( i.e.

is started )

Returns
True if the event is active

◆ isAntiArea()

bool gem::TrafficEvent::isAntiArea ( ) const
inlinenoexceptinherited

Check if the impact zone is the anti-area of the event area.

Valid only for TEIZ_Area impact zone

Returns
True if the impact zone is the anti-area

◆ isExpired()

bool gem::TrafficEvent::isExpired ( ) const
inlinenoexceptinherited

Check if traffic event is expired ( i.e.

is ended )

Returns
True if the event is expired

◆ isRoadblock()

bool gem::TrafficEvent::isRoadblock ( ) const
inlinenoexceptinherited

Check if this traffic event is a roadblock.

For roadblocks the getDelay() will return -1.

Returns
True if the traffic event is a roadblock.

◆ isUserRoadblock()

bool gem::TrafficEvent::isUserRoadblock ( ) const
inlinenoexceptinherited

Check if the traffic event is a user roadblock.

Returns
True if the traffic event is a user roadblock

◆ operator=() [1/2]

RouteTrafficEvent & gem::RouteTrafficEvent::operator= ( const RouteTrafficEvent & event)
default

Default copy assignment.

Parameters
eventThe route traffic event to copy
Returns
The copied route traffic event(this)

◆ operator=() [2/2]

RouteTrafficEvent & gem::RouteTrafficEvent::operator= ( RouteTrafficEvent && event)
default

Default move assignment noexcept is deduced.

Parameters
eventThe route traffic event to move
Returns
The moved route traffic event (this)