Re: Return type of vfuncs



On Thu, 2006-10-12 at 23:48 +0200, Johannes Schmid wrote:
> Hi!
> 
> While I tried to complete libanjutamm I ran into the following problem.
> gmmproc generates this for a vfunc return a Glib::ListHandle:
> 
> (...)
> typedef Glib::ListHandle<Editor*> RType;
> return RType();
> }
> 
> The bad thing is, that Glib::ListHandle does not have a constructor with
> zero arguments so this will never work! The line to generate the vfunc
> is the following:
> 
> _WRAP_VFUNC(Glib::ListHandle<Editor*> get_editors ( GError** err),
> "get_editors")
> 
> How is this supposed to work or am I totally wrong?

I suppose you could _IGNORE(get_editors), declare a virtual function
manually in the *.hg file and implement it in *.ccg where you would
call ListHandle constructor with the GList as a parameter.

Btw why GErrors and not exceptions? (Sorry if this is a decision
I missed earlier.)

Marko




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]