Re: Derived interfaces : An Example Solution
- From: murrayc t-online de (Murray Cumming)
- To: Jeff Franks <jcf tpg com au>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Derived interfaces : An Example Solution
- Date: 04 Nov 2001 13:04:54 +0100
n Sun, 2001-11-04 at 08:19, Jeff Franks wrote:
> Murray Cumming wrote:
>
> >So, if interfaces can't really be inherited, what does this do:
> >gpointer g_type_interface_peek_parent (gpointer g_iface)
> >?
> >
>
> Translating the GTK interfaces into C++ was tricky. You can only derive
> an interface from G_TYPE_INTERFACE, not an exisitng interface.
I'm not sure that's what Owen said in his other email, though it doesn't
seem to be coded like normal gobject inheritance.
g_type_add_interface_static() seems to recognise the inheritance
relationship of it's Interface (e.g. GtkTreeModel) and IFace (e.g.
GTreeModelIFace) types.
I am pleased to see that you seem to be using
g_type_interface_peek_parent() to get the original *IFace, in the same
way as gtkmm-1.3, because I wasn't very sure of that part.
I have already implemented the shared Instance base for the
multiply-inherited Objects and Interfaces classes, as you said before.
Our code is now much the same.
--
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]