After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642111 - Make it possible to inherit from input/outputstream classes.
Make it possible to inherit from input/outputstream classes.
Status: RESOLVED DUPLICATE of bug 572471
Product: glibmm
Classification: Bindings
Component: giomm
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2011-02-11 16:04 UTC by Michal Zegan
Modified: 2011-02-21 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michal Zegan 2011-02-11 16:04:37 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.
Comment 1 Murray Cumming 2011-02-11 16:06:47 UTC
Surely this is an issue of the extendability of the underlying GIO APIs?
Comment 2 Murray Cumming 2011-02-11 16:07:20 UTC
Or do we just need to implement the vfuncs? Well, a patch for that would be welcome for a future ABI break.
Comment 3 Krzesimir Nowak 2011-02-11 16:10:04 UTC
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.
Comment 4 Michal Zegan 2011-02-11 16:14:24 UTC
How adding few virtual functions may break the abi? not sure.
Comment 5 Murray Cumming 2011-02-11 16:16:47 UTC
They were commented out because we didn't have time to wrap them properly without breaking giomm. Yes, adding virtual methods breaks C++ ABI.
Comment 6 Murray Cumming 2011-02-21 09:58:18 UTC
Anyway, a patch would be welcome.
Comment 7 Murray Cumming 2011-02-21 11:12:34 UTC
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 ***