Re: virtual inheritance and Glib::Interface



On 4/5/06, Murray Cumming <murrayc murrayc com> wrote:
> On Wed, 2006-04-05 at 13:14 -0500, Jonathon Jongsma wrote:
> > I was looking at Gtk::ListStore and noticed that it used multiple
> > inheritance.  Specifically:
> > class ListStore :
> >   public Glib::Object,
> >   public TreeModel,
> >   public TreeSortable,
> >   public TreeDragSource,
> >   public TreeDragDest
> >
> > TreeModel, TreeSortable, TreeDragSource, and TreeDragDest all inherit
> > from Glib::Interface.  I noticed that Glib::Interface inherits
> > virtually from Glib::ObjectBase (as does Glib::Object), but TreeModel,
> > TreeSortable, TreeDragSource, and TreeDragDest don't inherit virtually
> > from Glib::Interface.  It seems that we're probably creating multiple
> > Glib::Interface objects whenever we create a Gtk::ListStore (and by
> > extension Gtk::TreeStore).  There may very well be more cases where
> > this is true, but I haven't looked any farther yet.  Is there any
> > reason why we wouldn't want want to inherit virtually from
> > Glib::Interface in these cases?
>
> I don't think that's true, and it's not what the doxygen diagrams show,
> though they could be wrong. You could confirm it by putting some
> std::cout in the constructors.
>

Just so I understand, what do you think is not true?  The fact that
multiple Interface objects might be created? or that these classes
don't use virtual inheritance?

Jonner



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