GNOME Bugzilla – Bug 653865
Tool to generate class boilerplate
Last modified: 2017-10-11 09:11:32 UTC
There is http://burtonini.com/cgi/gobject.py and probably others out there, but I was wondering whether it might make sense to have such a tool shipped together with GLib, in the shape of a command-line tool.
FWIW Ross' script above has been enhanced and is maintained as http://git.gnome.org/browse/turbine these days
*** Bug 341378 has been marked as a duplicate of this bug. ***
I'm not sure we're going to add a boilerplate generator script to GObject, but it's worth thinking about an IDL for GObject instead. in the meantime, we are discussing the addition of a header boilerplate generation macro in bug 389585. there's also GProperty, which adds macros to declare accessors for properties.
Since this bug was filed, we’ve gained GNOME Builder, which has template support for GObjects; and the boilerplate has been reduced through the addition of G_DECLARE_{FINAL,DERIVABLE}_TYPE macros. I think that’s sufficient.