GNOME Bugzilla – Bug 642111
Make it possible to inherit from input/outputstream classes.
Last modified: 2011-02-21 11:12:34 UTC
In pure glib/gio, stream types like inputstream or outputstream are created so that they need to be inherited from. The problem is that both outputstream and inputstream class in glibmm, wrapping those glib stream types, does not allow me to override stream's functionality and create new streams. It means it does not have any pure virtual function for me to override it and make a new stream. If I want to do this, I need to do painful things with Glib::Class derivation and overriding vfunc pointers. It is really complicated. Can you fix this and complete the wrapper so that inheriting is possible? Also, it would be useful to wrap SimpleAsyncResult inside a c++ object to allow making asynchronous io support in new streams.
Surely this is an issue of the extendability of the underlying GIO APIs?
Or do we just need to implement the vfuncs? Well, a patch for that would be welcome for a future ABI break.
Most of vfuncs are wrapped in giomm, but they are commented out. Until now, I wondered what was the reason - I haven't thought about ABI issues.
How adding few virtual functions may break the abi? not sure.
They were commented out because we didn't have time to wrap them properly without breaking giomm. Yes, adding virtual methods breaks C++ ABI.
Anyway, a patch would be welcome.
Actually, someone has already started this, and your testing would be welcome: https://bugzilla.gnome.org/show_bug.cgi?id=572471#c7 *** This bug has been marked as a duplicate of bug 572471 ***