On Mon, Oct 20, 2008 at 3:10 PM, Derek Gaston <[EMAIL PROTECTED]> wrote:
> On Oct 20, 2008, at 1:32 PM, John Peterson wrote:
>>
>> This image also shows a generic ShellMatrix-derived-from-NumericMatrix
>> as we've been discussing.  This allows for the development of future
>> "shell" matrix types which have nothing to do with Petsc.   It may be
>> a little confusing that a PetscShellMatrix is-not-a ShellMatrix, but
>> trying to implement multiple inheritance here is asking for trouble
>> because you would have the "dreaded diamond" problem
>> (http://www.parashift.com/c++-faq-lite/multiple-inheritance.html#faq-25.8)
>
> Nothing wrong with diamond inheritance... just need to use virtual
> inheritance.  If you were going to go this route I would definitely vote for
> using virtual inheritance and having the tree be correct.

Well, yeah but I also think multiple inheritance is not what we are
trying to express here.  You normally use MI to combine two interfaces
together in the same class; here we want a single interface (whatever
the NumericMatrix interface turns out to be) for the most derived
class.

As I understand it, the ShellMatrix is meant to reimplement
NumericMatrix functionality like m() and n(), and not to be an
orthogonal complement to it like, say, MeshInput is for MeshOutput.

-- 
John

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to