Function LinkedList.LinkedListHead.addNode
addNode -- insert a node into a list
void addNode
(
scope ref LinkedList . LinkedListNode node,
scope LinkedList . LinkedListNode* listNode = null
);
Insert a node into a doubly linked list AFTER a given node position. Insertion at the head of a list is possible by passing a zero value for node, though the addNodeHead function is slightly faster for that special case.
this - a pointer to the target list header
Parameters
Name | Description |
---|---|
node | the node to insert |
listNode | the node after which to insert |
Returns
Your list is larger by one node.
Example
ListHead myList; ListNode* myNode,listNode; ... myList.addNodeHead( myNode, listNode );
Notes
This function does not arbitrate for access to the list. The calling task must be the owner of the involved list.
Bugs
none
See
initListHead(), addNode(), remNode(), addNodeHead(), remNodeHead(), addNodeTail(), remNodeTail(), addNodeSorted(), findNode()