Re: Implementing GInterfaces purely from C++?



Murray Cumming wrote:
> 
> In Glom I do:
> 
> class DbTreeModel
>   : public Glib::Object,
>     public Gtk::TreeModel
> here:
> http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.h?view=markup
> 
> and
> 
> DbTreeModel::DbTreeModel()
> : Glib::ObjectBase( typeid(DbTreeModel) ), //register a custom GType.
>   Glib::Object(), //The custom GType is actually registered here.
> here:
> http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/db_adddel/glom_db_treemodel.cc?view=markup
> 
> and it seems to work. It's not otherwise a good example though.
> 

Ah, of course. I forgot that you can explicitly invoke indirect base class
constructors. Thanks!

--phil


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