TSLTrackAggregator Class Referenceabstract
Inheritance diagram for TSLTrackAggregator:

Detailed Description

A track aggregator provides the ability to collate multiple tracks into a single visualisation at display time.

Public Types

enum  AggregatorType { AggregatorCustom , AggregatorByEchelon , AggregatorByDensity }
 The types of aggregator provided by the MapLink API. More...
 

Public Member Functions

virtual TSLTrackAggregator::AggregatorType type () const =0
 
virtual void preProcess ()
 
virtual TSLTrackBaseaggregateTrack (TSLTrackBase *track, const TSLRenderingInterface *renderingInterface)=0
 
virtual void postProcess ()
 
virtual uint32_t numAdditionalTracks () const
 
virtual TSLTrackBasegetAdditionalTrack (uint32_t index) const
 
virtual ~TSLTrackAggregator ()
 Destructor. More...
 

Protected Member Functions

 TSLTrackAggregator ()
 

Member Enumeration Documentation

◆ AggregatorType

The types of aggregator provided by the MapLink API.

Enumerator
AggregatorCustom 

This value should be returned by any user/application defined aggregators.

AggregatorByEchelon 

A TSLTrackAggregatorEchelon.

AggregatorByDensity 

A TSLTrackAggregatorDensity.

Constructor & Destructor Documentation

◆ ~TSLTrackAggregator()

virtual TSLTrackAggregator::~TSLTrackAggregator ( )
virtual

Destructor.

◆ TSLTrackAggregator()

TSLTrackAggregator::TSLTrackAggregator ( )
protected

Member Function Documentation

◆ aggregateTrack()

virtual TSLTrackBase * TSLTrackAggregator::aggregateTrack ( TSLTrackBase track,
const TSLRenderingInterface renderingInterface 
)
pure virtual

This method will be called by the track manager to check whether a track is aggregated or not. The implementation of the aggregator must perform its algorithm to determine this. If NULL is returned the provided track will not be rendered by the track manager

Any tracks which are contained within the returned TSLTrackBase will not be drawn (unless aggregation has been disabled)

The rendering interface is provided to allow the aggregator access to draw-specific settings such as the extent of the drawing surface, or the zoom level of the display.

Parameters
trackThe input track
renderingInterfaceThe current rendering interface
Returns
the TSLTrackBase instance to be rendered.

Implemented in TSLTrackAggregatorDensity, and TSLTrackAggregatorEchelon.

◆ getAdditionalTrack()

virtual TSLTrackBase * TSLTrackAggregator::getAdditionalTrack ( uint32_t  index) const
virtual

Query an additional track provided by this aggregator

Returns
the TSLNTrackBase referred to by the index.

Reimplemented in TSLTrackAggregatorDensity.

◆ numAdditionalTracks()

virtual uint32_t TSLTrackAggregator::numAdditionalTracks ( ) const
virtual

Query the number of additional tracks provided by this aggregator

Returns
the number of additional tracks.

Reimplemented in TSLTrackAggregatorDensity.

◆ postProcess()

virtual void TSLTrackAggregator::postProcess ( )
virtual

Perform any required post processing

This method will be called by the track manager during each draw

  • This method will be called after all applicable tracks have been passed to aggregateTrack
  • This method will be called before the track manager reads any additional tracks from the aggregator

The aggregator should use this method to perform complex calculations based on multiple tracks, and to populate a list of additional tracks to draw if needed.

Reimplemented in TSLTrackAggregatorDensity.

◆ preProcess()

virtual void TSLTrackAggregator::preProcess ( )
virtual

Reset the aggregator and perform any required pre processing

This method will be called by the track manager at the start of each draw to allow the aggregator to perform any setup or reset operations required.

Reimplemented in TSLTrackAggregatorDensity.

◆ type()

virtual TSLTrackAggregator::AggregatorType TSLTrackAggregator::type ( ) const
pure virtual

Query the type of the aggregator

Any aggregator defined by the application must return TSLTrackAggregator::AggregatorCustom

Returns
The type of the aggregator

Implemented in TSLTrackAggregatorDensity, and TSLTrackAggregatorEchelon.