Private virtual methods
- From: Tony Houghton <h realh co uk>
- To: gir-devel-list gnome org
- Subject: Private virtual methods
- Date: Sat, 4 Aug 2018 16:48:51 +0100
The GObject tutorial says you can easily make a "private" virtual method by adding a function pointer slot to a class definition as usual but not providing a corresponding public function. How should this be documented/annotated for gi? Presumably you can't use the name of the non-existent public function, so what should be used for the first line of the comment block?
Also, are abstract/pure virtual methods supported? It could be done by setting the class' function pointer slot to NULL, but gi doesn't seem to have an annotation for abstracts, and a C compiler can't detect attempts to instantiate an object without setting the slots to valid functions. So I'm guessing they should be avoided in code intended to provide a bindable API? Perhaps I should raise a feature request for it?
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]