Home » U++ Library support » U++ Core » no true Iterator support in Upp???
no true Iterator support in Upp??? [message #28946] |
Tue, 28 September 2010 22:56 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
recently i came along to look closer at Iterator implementations in containers and i have to admit it is simpler that i expected..
generally i like simple, no doubt, it's most times the best option anyway. but the Iterator question somehow bugs me.. 2 things especially..
* Upp Iterator exist in 2 flavors, Iterator and ConstIterator, depending which one is able to be acessed, depending of the source state...(a const object can only return a ConstIterator). the speraration needs to be there to be able to correctly have mutator methods even on ConstIterator, like advancing the ii index..
* Iterator is *not* container independant, not even the template versions.., its not a 'sourceless' interface.. that you can store together with others from different container type but same element type i.e.
* Iterator interfaces are not coherent. the template version is not the same as the Vector version i.e. The template version is only used by the BiVector/BiArray containers, offering the rich interface..
* the virtual function less implementation of Iterator as per container, simpy beeing a pointer to an element is for speed reasons.., as well as the pure templated version..
what about a bit more flexible iterator interface?
i'm digging, as soon as done, i might post some ideas, but as i know mirek, he'll be up and done in no time with a cool solution anyway.
cheers
|
|
|
|
|
no true Iterator support in Upp???
By: kohait00 on Tue, 28 September 2010 22:56
|
|
|
Re: no true Iterator support in Upp???
By: kohait00 on Tue, 28 September 2010 23:02
|
|
|
Re: no true Iterator support in Upp???
By: mirek on Wed, 29 September 2010 09:07
|
|
|
Re: no true Iterator support in Upp???
By: kohait00 on Wed, 29 September 2010 11:28
|
|
|
Re: no true Iterator support in Upp???
By: kohait00 on Wed, 29 September 2010 12:12
|
|
|
Re: no true Iterator support in Upp???
By: mirek on Wed, 29 September 2010 13:44
|
|
|
Re: no true Iterator support in Upp???
By: kohait00 on Wed, 29 September 2010 14:02
|
|
|
PROPOSAL
By: kohait00 on Thu, 30 September 2010 16:16
|
|
|
Re: no true Iterator support in Upp???
By: mirek on Thu, 30 September 2010 21:15
|
|
|
Re: no true Iterator support in Upp???
By: kohait00 on Thu, 30 September 2010 21:25
|
Goto Forum:
Current Time: Sat Jun 01 03:04:21 CEST 2024
Total time taken to generate the page: 0.01834 seconds
|