Re: Wrapping variable argument functions



José Alburquerque wrote:
José Alburquerque wrote:
Murray Cumming wrote:
On Wed, 2008-02-06 at 14:32 -0500, José Alburquerque wrote:
Hi. I have a general question about gmmproc: Can it wrap methods with variable arguments? For example would _WRAP_METHOD(void method(int field1, ...), c_function) work if the c_function accepts the same variable argument list as the method? Thanks.
No. These are generally convenience functions for C, which usually
repeatedly call other functions that we do wrap. We don't generally
want ... arguments in C++ because they are not at all type-safe.

I'm looking at two functions in gstreamer (the GstCaps gst_caps_set_simple and the GstStructure gst_structure_set functions) that are giving me a bit of trouble. They're meant to set a series of fields in the Caps and Structure. What would I do in a case like this? Thanks.

-Jose

In both cases, they seem to call a ..._set_valist() related function do I use these?

You know, I think I'll do something like what happens with Gst::Element::link() which returns the element so another link can be called right after, as in:

element->link(one)->link(two);

So the syntax would look like:

pad->set(f1)->set(f2).  Would this work?  Thanks.

-Jose
-Jose
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



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