Re: Defining virtual methods with gobject
- From: Emmanuele Bassi <ebassi gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Defining virtual methods with gobject
- Date: Fri, 24 Jun 2011 10:22:07 +0100
On 2011-06-23 at 16:22, Tristin Celestin wrote:
1. Is it customary to make the prototype of the default implementation of
a virtual method available in the header file of a gobject?
no, not really.
what's customary is adding a public function for calling the virtual
one, doing type checks and NULL checks if the virtual has no default
implementation, or has an optional implementation.
2. How does one know if a method is pure virtual if only the header file can be viewed,
since the NULL assignment occurs in the init method implementation?
you have to specify it in the documentation of your class.
ciao,
Emmanuele.
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]