Re: Return type of vfuncs
- From: Marko Anastasov <marko marko anastasov name>
- To: Johannes Schmid <johannes schmid gmx de>
- Cc: GTKmm List <gtkmm-list gnome org>
- Subject: Re: Return type of vfuncs
- Date: Fri, 13 Oct 2006 17:28:20 +0200
On Fri, 2006-10-13 at 08:32 +0200, Johannes Schmid wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Marko!
>
> The problem is that I cannot use any hand-coded functions because the
> .hg files are generated from an idl file using some evil perl script.
Why does that make them unchangeable? I guess it could only be if
that happens at compile-time.
Where can that script be found? I suppose it would be helpful and
save some time when wrapping anything to be proc'ed by gmmproc.
>
> Regardings the GError* argument: I have used "errthrow" for the methods
> but I could not find out how to do this for vfuncs.
Non-manually, I'm not sure it's possible.
Marko
>
> Regards,
> Johannes
>
> Marko Anastasov wrote:
> > 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
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFLzLq7Dsf+G5b/WsRAu5zAJ0eG3vflqzwS8VRr3e46I8NjGynaACgtiy1
> 7cUZucxjV9+MiL/J0206nPs=
> =izN2
> -----END PGP SIGNATURE-----
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]