C4 Engine
C4 Engine API Documentation

List::PrependListElement

Defined in:  TSList.h
Adds an object to the beginning of a list.
Prototype

void PrependListElement(ListElement<type> *element);

Parameters
element A pointer to the object to add to the list.
Description
The PrependListElement function adds the object specified by the element parameter to the beginning of a list. If the object is already a member of the list, then it is moved to the beginning.

If the object being added is already a member of a different list of the same type, then it is first removed from that list before being added to the new list.
See Also

List::AppendListElement

List::InsertListElementBefore

List::InsertListElementAfter