Logo Search packages:      
Sourcecode: pwlib version File versions

virtual PINDEX PCollection::InsertAt ( PINDEX  index,
PObject obj 
) [pure virtual, inherited]

Insert a new object at the specified ordinal index. If the index is greater than the number of objects in the collection then the equivalent of the Append()# function is performed.

The exact semantics depends on the specific type of the collection. So the function may not place the object at the specified index at all. For example, in a PSortedList# the object is placed in the correct ordinal position in the list.

Returns:
index of the newly inserted object.
Parameters:
index  Index position in collection to place the object.
obj  New object to place into the collection.

Implemented in PArrayObjects, PAbstractSet, PAbstractDictionary, PAbstractList, and PAbstractSortedList.


Generated by  Doxygen 1.6.0   Back to index