summaryrefslogtreecommitdiff
path: root/indra/llcommon/llinstancetrackersubclass.h
AgeCommit message (Collapse)Author
2022-12-09DRTVWR-559: Introduce LLInstanceTrackerSubclass mediator class.Nat Goodspeed
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.