Skip to content

Shrink the ITtrackExtrapolator interface

Gerhard Raven requested to merge less-virtual-iextrapolator into master

ITrackExtrapolator requires a large number of functions to be implementend, but then all implementations rely on the TrackExtrapolator 'mix-in' class to implement most functions in terms of a much smaller set of functions.

This commit shrinks the actual interface by promoting the 'mix-in' code into the interface definition, and no longer having those functions as 'pure virtual' -- instead they will forward to the smaller set of actual functions which an implementation must define.

NOTE: this process is only done for those functions for which all implementations defer to the mix-in class. This could be taken further by actually changing some of the implementations, as currently not all are actually consistent in which functions they do or do not implement. But this is is left for a future MR as fixing this would potentially change references, whereas the current set of changes should not.

NOTE NOTE: this is a good example of the fact that the 'user' interface (i.e. which methods can a user of the interface invoke?), and the 'implementation' interface (i.e. what functionality must an implementation provide) are typically not the same thing. See eg. this article from 2001

Edited by Gerhard Raven

Merge request reports