Re: Gobject and c++ types.



> Just reading this and thinking about it, it occured to me that there is a
> rather uncumbersome way, similar to propertyproxy, by which we can have
> automatically C and C++ signals


Maybe I can try some of the above. I have a doubt about wrapping
Gobjects from c++ (for now I'm trying my own implementation of
Glib::Object too)

I have

class glib::object {
  GObject parent_class;
public:
   ....

};


class MyClass : public glib::object {

....
};


My problem is that if I make my destructors virtual (which I do want
to do), then:

GObject * obj = G_OBJECT(g_type_new(g_type_from_name("MyClass"), NULL));

G_OBJECT casting won't work. I think it's because with a vtable, the
layout for the type changes, but I don't know how to workaround this
and
keep G_OBJECT macro working, which is very important for C
compatibility and exposure.


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