C4 Engine
C4 Engine API Documentation

List::InsertListElementAfter

Defined in:  TSList.h
Inserts an object after an existing element of a list.
Prototype

void InsertListElementAfter(ListElement<type> *element, ListElement<type> *after);

Parameters
element A pointer to the object to add to the list.
after A pointer to the object after which the new object is inserted. This parameter must point to an object that is already a member of the list.
Description
The InsertListElementAfter function adds the object specified by the element parameter to a list at the position after the object specified by the after parameter. If the object is already a member of the list, then it is moved to the new position. If the after parameter is nullptr, then the node is added to the beginning of the list. Otherwise, the after parameter must specify an object that is already a member of the list for which this function is called.

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::InsertListElementBefore

List::PrependListElement

List::AppendListElement