Function LinkedList.LinkedListHead.addNodeHead
addNodeHead -- insert node at the head of a list
Add a node to the head of a doubly linked list. The code links the node after the HEAD node and in front of the existing nodes. There is always a TAIL node at least.
this - a pointer to the target list header
Parameters
Name | Description |
---|---|
node | the node to insert |
Returns
Your list is larger by one node.
Example
ListHead myList; ListNode* myNode; ... myList.addNodeHead( myNode );
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()