[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: C++ templates equivalent in GObject
From:       Tim Janik <timj () gtk ! org>
Date:       2003-03-16 18:42:09
[Download RAW message or body]

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
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic