Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PAbstractSortedList::Remove ( const PObject obj ) [virtual]

Remove the object from the collection. If the AllowDeleteObjects option is set then the object is also deleted.

Note that the comparison for searching for the object in collection is made by pointer, not by value. Thus the parameter must point to the same instance of the object that is in the collection.

Returns:
TRUE if the object was in the collection.

Implements PCollection.

Definition at line 936 of file collect.cxx.

References PAbstractList::GetObjectsIndex().

{
  if (GetObjectsIndex(obj) == P_MAX_INDEX)
    return FALSE;

  RemoveElement(info->lastElement);
  return TRUE;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index