On Thursday 20 Apr 2006 17:18, John Metta wrote:
Does Boost have any magic to help with a class method cascade? Consider:
struct INFO { float mass; float volume; ... virtual void Reset() { mass = 0.0f; volume = 0.0f; ... }; } struct WATER_INFO : virtual INFO { float rateInfow; float rateOutflow; ... virtual void Reset() { rateInflow = 0.0f; rateOutflow = 0.0f; super.Reset(); // Wish to cascade a reset function down.
What about: ::Reset(); At least, INFO::Reset(); should work (not very nice, but...). Or am I missing something? Hope this helps. Fred
}; }; struct SURFACE_WATER_INFO : virtual INFO { ... } // cascading to reset the variables at any level.