List::InsertBefore
Defined in: C4List.h
Inserts an object before an existing element of a list.
Prototype
void InsertBefore(ListElement<type> *element, ListElement<type> *before);
Parameters
element |
A pointer to the object to add to the list.
|
before |
A pointer to the object before which the new object is inserted. This parameter must point to an object that is already a member of the list.
|
Description
The InsertBefore function adds the object specified by the element parameter to a list at the position before the object specified by the before parameter. If the object is already a member of the list, then it is moved to the new position. If the object is a member of a different list, then it is first removed from that list before being added to the new list.
See Also
List::InsertAfter
List::Prepend
List::Append
|