le_singlyLinkedList.h
Go to the documentation of this file.
8 * A singly linked list is a data structure consisting of a group of nodes linked together linearly.44 * requirement for nodes is that it must contain a le_sls_Link_t link member. The link member must98 * simply manages the links in the nodes. The node must first be removed from all lists before its174 //--------------------------------------------------------------------------------------------------176 * This link object must be included in each user node. The node's link object is used to add the177 * node to a list. A node may have multiple link objects which would allow the node to be part of183 //--------------------------------------------------------------------------------------------------191 //--------------------------------------------------------------------------------------------------198 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------208 * When a list is created, it must be initialized by assigning this macro to the list before the list211 //--------------------------------------------------------------------------------------------------215 //--------------------------------------------------------------------------------------------------217 * When a link is created, it must be initialized by assigning this macro to the link before it can220 //--------------------------------------------------------------------------------------------------224 //--------------------------------------------------------------------------------------------------228 //--------------------------------------------------------------------------------------------------236 //--------------------------------------------------------------------------------------------------240 //--------------------------------------------------------------------------------------------------248 //--------------------------------------------------------------------------------------------------253 //--------------------------------------------------------------------------------------------------262 //--------------------------------------------------------------------------------------------------264 * Removes the link found after currentLinkPtr. The user must ensure that currentLinkPtr is in the271 //--------------------------------------------------------------------------------------------------280 //--------------------------------------------------------------------------------------------------288 //--------------------------------------------------------------------------------------------------295 //--------------------------------------------------------------------------------------------------303 //--------------------------------------------------------------------------------------------------310 //------------------------------------------------------------------------------------------------------------318 //------------------------------------------------------------------------------------------------------------325 //--------------------------------------------------------------------------------------------------327 * Returns the link next to currentLinkPtr (i.e., the link beside currentLinkPtr that's closer to the336 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------351 //--------------------------------------------------------------------------------------------------353 (356 //--------------------------------------------------------------------------------------------------362 //--------------------------------------------------------------------------------------------------370 //--------------------------------------------------------------------------------------------------378 //--------------------------------------------------------------------------------------------------386 //--------------------------------------------------------------------------------------------------388 (397 //--------------------------------------------------------------------------------------------------405 //--------------------------------------------------------------------------------------------------407 (416 //--------------------------------------------------------------------------------------------------423 //--------------------------------------------------------------------------------------------------430 //--------------------------------------------------------------------------------------------------438 //--------------------------------------------------------------------------------------------------static bool le_sls_IsHead(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)Definition: le_singlyLinkedList.h:388void le_sls_Queue(le_sls_List_t *listPtr, le_sls_Link_t *newLinkPtr)static bool le_sls_IsEmpty(const le_sls_List_t *listPtr)Definition: le_singlyLinkedList.h:353bool le_sls_IsInList(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)Definition: le_singlyLinkedList.h:184static bool le_sls_IsTail(const le_sls_List_t *listPtr, const le_sls_Link_t *linkPtr)Definition: le_singlyLinkedList.h:407le_sls_Link_t * le_sls_RemoveAfter(le_sls_List_t *listPtr, le_sls_Link_t *currentLinkPtr)le_sls_Link_t * le_sls_PeekNext(const le_sls_List_t *listPtr, const le_sls_Link_t *currentLinkPtr)le_sls_Link_t * le_sls_Peek(const le_sls_List_t *listPtr)le_sls_Link_t * le_sls_Pop(le_sls_List_t *listPtr)void le_sls_AddAfter(le_sls_List_t *listPtr, le_sls_Link_t *currentLinkPtr, le_sls_Link_t *newLinkPtr)bool le_sls_IsListCorrupted(const le_sls_List_t *listPtr)struct le_sls_Link * nextPtrNext link pointer.Definition: le_singlyLinkedList.h:186le_sls_Link_t * tailLinkPtrTail link pointer.Definition: le_singlyLinkedList.h:201le_sls_Link_t * le_sls_PeekTail(const le_sls_List_t *listPtr)size_t le_sls_NumLinks(const le_sls_List_t *listPtr)Definition: le_singlyLinkedList.h:199void le_sls_Stack(le_sls_List_t *listPtr, le_sls_Link_t *newLinkPtr)