Re: virtual inheritance and Glib::Interface



On 4/5/06, Murray Cumming <murrayc murrayc com> wrote:
> On Wed, 2006-04-05 at 13:37 -0500, Jonathon Jongsma wrote:
> > Just so I understand, what do you think is not true?  The fact that
> > multiple Interface objects might be created?
>
> Yes. Not true, I think. Here's an attempted explanation:
>
> Gtk::TreeStore inherits non-virtually from TreeModel, TreeSortable,
> TreeDragSource, and TreeDragDest
>
> Because each of these inherits virtually from Interface, TreeStore has
> only one copy of Interface. That's kind out counterintuitive, but I

Perhaps you misunderstood.  I was saying that these classes do NOT
inherit virtually from Interface.  At least looking at CVS they do not
appear to be.

> It would only be useful to, for instance, inherit TreeModel virtually
> from TreeStore and ListStore, if I was going to create classes like
> this:

Yes, I was not trying to suggest that ListStore inherit from TreeModel
virtually, I was suggesting that since ListStore inherits from 4
classes with a common ancestor (of which TreeModel is one), those 4
classes should use virtual inheritance to inherit from Interface,
which they don't appear to do.

Jonner



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