axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@opensource.lk
Subject RE: STL elimination - Suggestions
Date Tue, 01 Jun 2004 10:50:19 GMT
Hi Roshan,

I examined your code and found out following problems.

1. In The put method code should be change as follows. Otherwise it will
crash When try to put more than 10 elements.


if (m_iCurrentPosition == m_iCapasity ) {
		m_iCapasity += 10;
		m_pKeys = (void**) realloc(m_pKeys, sizeof(void*) *         m_iCapasity);
		m_pValues=(void**) realloc(m_pValues, sizeof(void*) *
m_iCapasity);//Added line.
}


2. When try to put the same value object with different key objects
 to the map it crashes.

Regards
Lahiru Wimalasiri


> 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.
>
> 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