[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: shower strikes again (whap!)

Hmmm... (Not in the shower this time.  Well, two outa' three ain't bad.)

If we have the object's entire type available:

 - Stubs can be:
   - a subclass of the ActualClass they're stubbing, (thus inheriting all
     the member variables, which makes them the right size)
   - whose constructor uses an overloaded stub-constructor for the superclass
   - and whose member functions, if they really need the data, are overridden
     to grab the disk data, mutate, and call the superclass member function.

 - And on platforms where mutation is not possible, the shepherd types are
   just the real type with an "I'm real/get real" test/member function call
   at the start of each must-be-real member function.  (Extra test per member
   function, but that's quicker than a forwarder's extra subroutine call...)
THAT's portable.  We can switch platforms by switching the definition of
the macro that marks the must-be-real member functions for stubble.