<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/llinstancetrackersubclass.h, branch 26.4</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=26.4</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=26.4'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2022-12-09T18:16:39Z</updated>
<entry>
<title>DRTVWR-559: Introduce LLInstanceTrackerSubclass mediator class.</title>
<updated>2022-12-09T18:16:39Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-12-09T18:16:39Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=00478b1e7671cb109771a1ad4fb40d47d15ab756'/>
<id>urn:sha1:00478b1e7671cb109771a1ad4fb40d47d15ab756</id>
<content type='text'>
Deriving your tracked class T from LLInstanceTracker&lt;T&gt; 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&lt;S, T&gt;. 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.
</content>
</entry>
</feed>
