Re: gdlmm



> On Wed, 2005-09-14 at 20:37 +0200, Murray Cumming wrote:
>
>> 2. The use of the *_new() functions in the constructors means that
>> signals and vfuncs will not work. You need to investigate whether the
>> _new() functions do anything other than g_object_new() and either
>> a) Patch the C lib.
>> b) Duplicate some of that code in the .ccg file.
>>
>
> Small question, is the use of _new functions in constructors always a
> problem, or is something like _WRAP_CTOR(Dock(const Dock& original, bool
> floating), gdl_dock_new_from) OK ?

That's good. That just tells _WRAP_CTOR() to look at gdl_dock_new_from()
to see what C parameter types it takes, so it can know how to convert the
C++ parameters to the C parameters (by looking at the .m4 conversion
files.). It then uses g_object_new() in the generated .cc file.

You just need to make sure that you don't hard-code a _new function into
the .ccg file. Where you need to hand-write a constructor, look at the
gtkmm .ccg files - there's a macro (_CONSTRUCT, or something like that)
that helps.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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