Re: virtual inheritance and Glib::Interface
- From: Murray Cumming <murrayc murrayc com>
- To: Jonathon Jongsma <jonathon jongsma gmail com>
- Cc: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: Re: virtual inheritance and Glib::Interface
- Date: Wed, 05 Apr 2006 20:22:23 +0200
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.
--
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]