Allow Inheritance for Objects while registering Base Class
This MR adds a new member function to "base class objects", i.e. the different types. On the clipboard, this new T::getBaseType()
function is used to deduce the storage type rather than typeid(T)
directly.
When having inheritance, e.g. class Straightline : public Track
, the latter would store the objects as Straightline
which means modules asking for objects of the type Track
get an empty response.
By using T::getBaseType()
also derived objects will report to the clipboard as Track
objects and are stored as such.
Warning: this function should not be implemented for derived classes.
(cc) @lhuth, relevant for !189 (merged)