Comments welcome :-)
leo
PS playing with the patch needs "make realclean" as well as my latest
imcc commit from CVS.
> After the overwhelming amount of f'ups to my proposal:
Still :)
One more comment:
The iterator class is intended to pass almost every method on to the
aggregate, e.g.
> + PMC* getprop (STRING* key) {
> + return ((PMC *)SELF->data)->vtable->getprop(INTERP,
> + (PMC *)SELF->data, key);
> + }
I think, this is the same behavior as a reference. Hence the Iterator
class could inherit from a Ref class and just override iterator specific
functions.
Are there any thoughts about a Ref (or Reference) class?
leo
> Leopold Toetsch wrote:
>> + PMC* getprop (STRING* key) {
>> + return ((PMC *)SELF->data)->vtable->getprop(INTERP,
>> + (PMC *)SELF->data, key);
>> + }
> I think, this is the same behavior as a reference. Hence the Iterator
> class could inherit from a Ref class and just override iterator specific
> functions.
> Are there any thoughts about a Ref (or Reference) class?
I really hate code duplication, so ...
Summary: The Iterator behaves like the aggregate it is attached to. All
the get_<type> methods would just delegate the method to the ->data
member as shown above for the C<getprop> method.
Is this the same as the functionality of a Reference class?
Thanks for answering,
leo