[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: Re: More smart wrapping for struct types?
From: Nicolas Brodu <nicolas.brodu () free ! fr>
Date: 2000-05-28 14:14:01
[Download RAW message or body]
Stefan Westerfeld wrote:
>
> Hi!
>
> I am considering to change the mapping for struct like returncodes to a
> wrapped version similar to SmartWrappers as well. I'll play with it this
> weekend - looking forward to your comments ;)
This sounds nice. I've seen that you also have made WeakReferences for the
SmartWrappers. The sequence is also a good idea, even it there might be problems
with the iterator (see below).
Some comments:
A double redirection is necessary, for the same reason as the smartwrappers.
That is, if you lazy-create and assign one object (Struct_ptr here) to another
before the creation, then only one will get created if you have simple redirect.
The _pool implementation solved this for SmartWrappers, but maybe you don't need
the whole thing here.
Consistency. Do you map idl 'void addUser(User u)' to C++ 'void addUser(const
User& u)' or 'void addUser(const User_ptr u)'? If it's the first, then is
sequence<User> mapped to vector<User *>, vector<User&>, or vector<User_ptr>, or
User_seq? I see it is now User_seq, but then you use a vector<User *>::iterator
i, where one may have expected instead vector<User_ptr>::iterator i. Maybe
defining Structs wich pointer behaviour, like the SmartWrappers, is overkill for
simple structs, but as it it now I feel a bit confused...
But please commit your first version. I suppose that as for the SmartWrappers,
about the only way to improve them was to try to use them in practice!
Cheers,
Nicolas
--
A shortcut is the longest distance between two points. (unknown author)
_______________________________________________
Kde-multimedia mailing list
Kde-multimedia@master.kde.org
http://master.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic