{
if(container)
{
+ bool justAdded = false;
Free();
- pointer = container.GetAtPosition(index, create);
- return pointer != null;
+ pointer = container.GetAtPosition(index, create, &justAdded);
+ return !justAdded && pointer != null;
}
return false;
}
virtual IteratorPointer GetNext(IteratorPointer pointer) { return null; }
virtual D GetData(IteratorPointer pointer) { return (D)0; }
virtual bool SetData(IteratorPointer pointer, D data);
- virtual IteratorPointer GetAtPosition(const I pos, bool create) { return null; }
+ virtual IteratorPointer GetAtPosition(const I pos, bool create, bool * justAdded) { return null; }
virtual IteratorPointer Insert(IteratorPointer after, T value);
virtual IteratorPointer Add(T value);