Re: virtual inheritance and Glib::Interface



On Thu, 2006-04-06 at 19:52 -0500, Jonathon Jongsma wrote:
> On 4/6/06, Murray Cumming <murrayc murrayc com> wrote:
> > On Wed, 2006-04-05 at 20:38 -0500, Jonathon Jongsma wrote:
> > > I'm not quite sure I understand your explanation.
> >
> > With
> > - DerivedDerived : public Derived
> > - Derived : virtual public Base
> > - Base
> >
> > You must do
> > DerivedDerived::DerivedDerived(int something)
> > : Derived(something),
> >   Base(something)
> 
> Ahh, of course.  I understand now.  Thanks for the explanation.

Another reason that occurs to me: We generally use virtual inheritance
to share class data (member variables), but there are no member
variables in Glib::Interface - just in the base classes which are
shared. Hopefully we don't lose too many bytes just by having the the
class instance itself.
 
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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