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

TrafficEvent object. More...

Inheritance diagram for gem::TrafficEvent:
Collaboration diagram for gem::TrafficEvent:

Public Member Functions

 TrafficEvent (const TrafficEvent &event)=default
 Default copy constructor.
 TrafficEvent (TrafficEvent &&event)=default
 Default move constructor noexcept is deduced.
TrafficEvent & operator= (const TrafficEvent &event)=default
 Default copy assignment.
TrafficEvent & operator= (TrafficEvent &&event)=default
 Default move assignment noexcept is deduced.
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

TrafficEvent object.

Implements share-read / copy-on-write Api object over ITrafficEvent base interface.

Constructor & Destructor Documentation

◆ TrafficEvent() [1/2]

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

Default copy constructor.

Parameters
eventThe traffic event to copy

◆ TrafficEvent() [2/2]

gem::TrafficEvent::TrafficEvent ( TrafficEvent && event)
default

Default move constructor noexcept is deduced.

Parameters
eventThe traffic event to move

Member Function Documentation

◆ cancelGetPreviewData()

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

Cancel a previous call of getPreviewData.

Parameters
[in]listenerThe progress listener

◆ getAffectedTransportMode()

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

Get affected transport modes.

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

◆ getArea()

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

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
inlinenoexcept

Get the bounding box of the traffic event.

Returns
The bounding box

◆ getDelay()

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

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
inlinenoexcept

Get the description of the traffic event.

Returns
The description

◆ getEndTime()

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

Get end time ( UTC ).

Returns
The end time

◆ getEventClass()

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

Get the traffic event class.

Returns
The traffic event class

◆ getEventSeverity()

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

Get the traffic event severity.

Returns
The traffic event severity

◆ getImage()

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

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
inlinenoexcept

Get the traffic event impact zone.

Returns
The impact zone type

◆ getLength()

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

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
inlinenoexcept

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
inlinenoexcept

Get the traffic event preview URL.

Returns
The preview URL

◆ getReferencePoint()

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

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
inlinenoexcept

Get start time ( UTC ).

Returns
The start time

◆ hasOppositeSibling()

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

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
inlinenoexcept

Check if traffic event is active ( i.e.

is started )

Returns
True if the event is active

◆ isAntiArea()

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

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
inlinenoexcept

Check if traffic event is expired ( i.e.

is ended )

Returns
True if the event is expired

◆ isRoadblock()

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

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
inlinenoexcept

Check if the traffic event is a user roadblock.

Returns
True if the traffic event is a user roadblock

◆ operator=() [1/2]

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

Default copy assignment.

Parameters
eventThe traffic event to copy
Returns
The copied traffic event

◆ operator=() [2/2]

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

Default move assignment noexcept is deduced.

Parameters
eventThe traffic event to move
Returns
The moved traffic event