Re: squid-3 lib/Array.c

From: Robert Collins <robertc@dont-contact.us>
Date: 19 Jan 2003 17:16:26 +1100

On Sun, 2003-01-19 at 00:39, Henrik Nordstrom wrote:
> Robert Collins wrote:
> >
> > On Sat, 2003-01-18 at 13:14, Henrik Nordstrom wrote:
> > > See no problem with this.
> > >
> > > Array.cc created. When you are done please delete Array.c and notify me
> > > again.
> >
> > Ok, the initial move is done (it compiles and runs). When you've done
> > any CVS magic needed, I'll put in the C++ features that I did the move
> > for.
>
> There is no CVS magic involved other than to eventaully clean up the
> attic when the old Array.c is no longer wanted.
>
> You can go ahead and code any C++ you like in Array.cc.

Right, done.

Array.cc now leverages a template based typesafe container, loosely
based on the STL vector, but using the squid 2 Array sizing logic.

The primary benefits of this change is typesafety ( no void *
typecasts), and storage management (self free on delete or end of
scope).

Secondary benefits include a typesafe iterator for generic programming.

The API is the same as it was before for Array * objects. For use of the
templated class, there are methods on the Vector template that match the
old API.

Rob

-- 
GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.

Received on Sat Jan 18 2003 - 23:16:30 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:07 MST