Jean-Marc Lasgouttes a écrit :
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

IMHO first step is to make ParagraphList a proper class that
_contains_ a (private) vector. Methods should be added to this
ParagraphList so that what we use from the vector is covered.
Nothing more. No tricks with using etc. should be used.

Abdelrazak> I thought that's what I did... except of course that I
Abdelrazak> already use a list inside.

Wouldn't it be simpler to use a vector<Paragraph*> and change its
interface to look like a vector<Paragraph>? I am not sure why we want
a list, actually. Inserting/erasing in a vector of pointers should be
fast enough...

That was my initial idea but then the change to the code would be even bigger. The nice aspect of the list underneath is that you can use the its iterator and apply all kind of function in one shot if you want.


JMarc


Reply via email to