Commit Graph

1 Commits (5bfe6f57ae6242a8a28839fe6f9a143f29a03bb1)

Author SHA1 Message Date
Nat Goodspeed 00478b1e76 DRTVWR-559: Introduce LLInstanceTrackerSubclass mediator class.
Deriving your tracked class T from LLInstanceTracker<T> gives you
T::getInstance() et al. But what about a subclass S derived from T?
S::getInstance() still delivers a pointer to T, requiring explicit downcast.
And so on for other LLInstanceTracker methods.

Instead, derive S from LLInstanceTrackerSubclass<S, T>. This implies that S is
a grandchild class of T, but it also recasts the LLInstanceTracker methods to
deliver results for S rather than for T.
2022-12-09 13:16:39 -05:00