axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Weerasuriya <ros...@opensource.lk>
Subject RE: STL elimination - Suggestions
Date Wed, 02 Jun 2004 05:16:35 GMT
hi Kenneth,

Thanks for your comments.

 >What is the intended use of AxisMap?  Note that
 >insertion/lookup is now O(N), rather than O(lg N).  Creating
 >a map is now O(N^2)

Can you elaborate more on this?

 >The heavy use of 'void *' means that you are no longer
 >type-safe

Can you elaborate more on this?

 >In AxixMap::put(), you delete a "void *". Do you mean to
 >call the value dealloc function instead?

Yes it is a mistake.

 >In ~AxisMap(), you are using the pre-ISO scoping rules for
 >for-loops.

Corrected it.

rgds,
Roshan




At 09:39 AM 6/1/2004 -0500, you wrote:
>On Tue, 1 Jun 2004, Roshan Weerasuriya wrote:
> > hi all,
> >
> > Please have a look at the AxisMap class implemented below and provide your
> > comments. The implementation files are attached with this mail. The
> > attachement includes:
> > 1) AxisMap.h, AxisMap.cpp       //AxisMap implemntaion
> > 2) AxisMapUtils.h, AxisMapUtils.cpp //Utility methods such as Standard
> > De-allocator funcitons
> > 3) TestMap3.cpp  //The sample cpp file which includes example usage of the
> > above AxisMap implementation
> >
> > The idea is to eliminate stl map from the code base and use Axis's own
> > AxisMap implementation.
>
>Some comments:
>
>What is the intended use of AxisMap?  Note that
>insertion/lookup is now O(N), rather than O(lg N).  Creating
>a map is now O(N^2).  Fine if you don't plan on putting a
>lot in it.  Otherwise it might be a performance problem.
>
>Also, if you are going to be putting a lot of things in it,
>you might consider growing exponentially.
>
>I suggest trying to make the interface look like STL.  Many
>experienced C++ programmers will already be familiar with
>STL, which would save them from having to learn yet another
>interface.
>
>The heavy use of 'void *' means that you are no longer
>type-safe.  I would personally prefer either the use of
>polymorphism and RTTI, or templates.
>
>In AxixMap::put(), you delete a "void *".  Do you mean to
>call the value dealloc function instead?
>
>In ~AxisMap(), you are using the pre-ISO scoping rules for
>for-loops.
>
>
>
> > rgds,
> > Roshan
> >
> > At 10:13 AM 5/6/2004 +0530, you wrote:
> > >What I would suggest -
> > >1. expose a small set of classes and make the interface stl-free
> > >2. in your internal classes you can still use stl
> > >
> > >Why do you want to remove stl all-together?
> > >
> > > > -----Original Message-----
> > > > From: Kenneth Chiu [mailto:chiuk@cs.indiana.edu]
> > > > Sent: Thursday, May 06, 2004 9:41 AM
> > > > To: Apache AXIS C Developers List
> >




Mime
View raw message