Is there any problem to create C++ classes from C (Gtk::Window, etc) ?
- From: Germán Diago <germandiago gmail com>
- To: gtkmm-list gnome org
- Subject: Is there any problem to create C++ classes from C (Gtk::Window, etc) ?
- Date: Sat, 7 Nov 2009 14:16:18 +0100
Hello. I have a very technical issue. If some expert could tell me if
it's wrong.
The issue is that I can do this:
GObject * obj = G_OBJECT(g_type_new("MycppClass", NULL));
as long as MyCppClass has this layout:
class .... {
GObject parentclass;
...
};
If I define a virtual function, it won't work anymore. Is there any
workaround to this?
Because in the c gobject manual it says that the layout must be like
that, in order
for GObject to work, but for C++ it's very inflexible.
Is there any well-known solution to workaround the virtual table issue
and keep my classes
working in C? Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]