OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
doublylinkedlist.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2017, Rockwell Automation, Inc.
3  * All rights reserved.
4  *
5  ******************************************************************************/
6 
7 #ifndef SRC_UTILS_DOUBLYLINKEDLIST_H_
8 #define SRC_UTILS_DOUBLYLINKEDLIST_H_
9 
17 
18 typedef DoublyLinkedListNode * (*NodeMemoryAllocator)(
19  );
20 
22 
23 typedef struct doubly_linked_list_node {
26  void *data;
28 
29 typedef struct {
32 
35 
37 
39  NodeMemoryAllocator allocator,
40  NodeMemoryDeallocator deallocator);
41 
43 
44 DoublyLinkedListNode *DoublyLinkedListNodeCreate(const void *const data,
45  NodeMemoryAllocator allocator);
46 
47 void DoublyLinkedListNodeDestroy(const DoublyLinkedList *const list,
48  DoublyLinkedListNode **node);
49 
51  void *data);
52 
54  const void *const data);
55 
58  void *data);
59 
62  void *data);
63 
65  DoublyLinkedListNode **pointer_to_node_pointer);
66 
67 #endif /* SRC_UTILS_DOUBLYLINKEDLIST_H_ */
void DoublyLinkedListDestroy(DoublyLinkedList *list)
void DoublyLinkedListInsertAfterNode(DoublyLinkedList *const list, DoublyLinkedListNode *node, void *data)
void DoublyLinkedListInitialize(DoublyLinkedList *list, NodeMemoryAllocator allocator, NodeMemoryDeallocator deallocator)
DoublyLinkedListNode * first
DoublyLinkedListNode * previous
NodeMemoryAllocator allocator
void DoublyLinkedListRemoveNode(DoublyLinkedList *const list, DoublyLinkedListNode **pointer_to_node_pointer)
DoublyLinkedListNode * DoublyLinkedListNodeCreate(const void *const data, NodeMemoryAllocator allocator)
DoublyLinkedListNode * next
void DoublyLinkedListNodeDestroy(const DoublyLinkedList *const list, DoublyLinkedListNode **node)
void(* NodeMemoryDeallocator)(DoublyLinkedListNode **node)
void DoublyLinkedListInsertAtHead(DoublyLinkedList *const list, void *data)
NodeMemoryDeallocator deallocator
DoublyLinkedListNode *(* NodeMemoryAllocator)()
void DoublyLinkedListInsertAtTail(DoublyLinkedList *const list, const void *const data)
struct doubly_linked_list_node DoublyLinkedListNode
void DoublyLinkedListInsertBeforeNode(DoublyLinkedList *const list, DoublyLinkedListNode *node, void *data)
DoublyLinkedListNode * last