Re: C++ templates equivalent in GObject
- From: Tim Janik <timj gtk org>
- To: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: C++ templates equivalent in GObject
- Date: Sun, 16 Mar 2003 19:42:09 +0100 (CET)
On Sun, 16 Mar 2003, Jerry Kakol wrote:
> (and was functionally equivalent to):
>
> struct <ParameterType> _GFoo
> {
> GObject parent;
>
> ....
>
> <ParameterType> bar;
>
> ...
> };
>
> struct <ParameterType> _GFooClass
> {
> GObjectClass parent_class;
>
> ...
>
> int (*bar_func) (<ParameterType bar, ...);
>
> ...
> };
>
> , etc.
>
> Could some low level (by GObject terms) messing with GType or
> GTypeInstance help here (I'm just shooting blindly, I have no idea). I
> don't care about type safety or a full blown template implementation
> like in C++, just what the example above illustrates.
nope, you simply need C++ to do these kind of things (short of
writing your own preprocessor which would be something like
a limitedC++ to C converter).
>
> --
> Jerry Kakol <jkakol cox net>
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]