From: <der...@us...> - 2003-08-31 22:11:39
|
Update of /cvsroot/openh323/pwlib/include/ptlib In directory sc8-pr-cvs1:/tmp/cvs-serv5593/include/ptlib Modified Files: lists.h Log Message: Fix from Diego Tartara for the SetAt function. Many thanks. Index: lists.h =================================================================== RCS file: /cvsroot/openh323/pwlib/include/ptlib/lists.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** lists.h 12 Nov 2002 08:55:53 -0000 1.21 --- lists.h 31 Aug 2003 22:11:29 -0000 1.22 *************** *** 28,31 **** --- 28,34 ---- * * $Log$ + * Revision 1.22 2003/08/31 22:11:29 dereksmithies + * Fix from Diego Tartara for the SetAt function. Many thanks. + * * Revision 1.21 2002/11/12 08:55:53 robertj * Changed scope of PAbstraSortedList::Element class so descendant classes *************** *** 247,256 **** /**Set the object at the specified ordinal position to the new value. This ! will overwrite the existing entry. If the AllowDeleteObjects option is ! set then the old object is also deleted. ! ! The object accessed in this way is remembered by the class and further ! access will be fast. Access to elements one either side of that saved ! element, and the head and tail of the list, will always be fast. Note if the index is beyond the size of the collection then the --- 250,256 ---- /**Set the object at the specified ordinal position to the new value. This ! will overwrite the existing entry. ! This method will NOT delete the old object independently of the ! AllowDeleteObjects option. Use #ReplaceAt()# instead. Note if the index is beyond the size of the collection then the *************** *** 264,267 **** --- 264,282 ---- PObject * val /// New value to place into the collection. ); + + /**Set the object at the specified ordinal position to the new value. This + will overwrite the existing entry. If the AllowDeleteObjects option is + set then the old object is also deleted. + + Note if the index is beyond the size of the collection then the + function will assert. + + @return + TRUE if the object was successfully replaced. + */ + virtual BOOL ReplaceAt( + PINDEX index, /// Index position in collection to set. + PObject * val /// New value to place into the collection. + ); /**Get the object at the specified ordinal position. If the index was *************** *** 921,934 **** virtual void RemoveAll(); ! /**Set the object at the specified ordinal position to the new value. This ! will overwrite the existing entry. If the AllowDeleteObjects option is ! set then the old object is also deleted. ! ! Note, the object placed at #index# will not stay at that ! ordinal position. It is actually placed at the correct position for its ! rank. ! @return ! TRUE if the object was successfully added. */ virtual BOOL SetAt( --- 936,944 ---- virtual void RemoveAll(); ! /**This method simply returns FALSE as the list order is mantained by the ! class. Kept to mimic #PAbstractList# interface. ! @return ! FALSE allways */ virtual BOOL SetAt( |