James Kanze
11/9/2008 12:08:00 PM
On Nov 8, 2:17 pm, Gennaro Prota <gennaro/pr...@yahoo.com> wrote:
> maverik wrote:
> >> Nothing wrong in encapsulating a std::vector,
> >> you are doing it exactly as planned.
> >> The only issue is the name AbstractCollection since its not abstract?
> >> How about Vector, Container or Collection.
> > Thanks, you are right.
> That's not the only issue. Check Item 2 in "Effective STL" by
> Scott Meyers:
> Beware the illusion of container-independent code
Exactly. As long as the iterator is just a typedef, he's not
encapsulating anything. To effectively encapsulate, he also has
to encapsulate the iterator.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34