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 File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  doubly_linked_list_node
 
struct  DoublyLinkedList
 

Typedefs

typedef struct
doubly_linked_list_node 
DoublyLinkedListNode
 
typedef DoublyLinkedListNode *(* NodeMemoryAllocator )()
 
typedef void(* NodeMemoryDeallocator )(DoublyLinkedListNode **node)
 

Functions

void DoublyLinkedListDestroy (DoublyLinkedList *list)
 
void DoublyLinkedListInitialize (DoublyLinkedList *list, NodeMemoryAllocator allocator, NodeMemoryDeallocator deallocator)
 
void DoublyLinkedListInsertAfterNode (DoublyLinkedList *const list, DoublyLinkedListNode *node, void *data)
 
void DoublyLinkedListInsertAtHead (DoublyLinkedList *const list, void *data)
 
void DoublyLinkedListInsertAtTail (DoublyLinkedList *const list, const void *const data)
 
void DoublyLinkedListInsertBeforeNode (DoublyLinkedList *const list, DoublyLinkedListNode *node, void *data)
 
DoublyLinkedListNodeDoublyLinkedListNodeCreate (const void *const data, NodeMemoryAllocator allocator)
 
void DoublyLinkedListNodeDestroy (const DoublyLinkedList *const list, DoublyLinkedListNode **node)
 
void DoublyLinkedListRemoveNode (DoublyLinkedList *const list, DoublyLinkedListNode **pointer_to_node_pointer)
 

Detailed Description

The public interface for a reference type doubly linked list

Definition in file doublylinkedlist.h.

Typedef Documentation

Definition at line 16 of file doublylinkedlist.h.

typedef DoublyLinkedListNode*(* NodeMemoryAllocator)()

Definition at line 18 of file doublylinkedlist.h.

typedef void(* NodeMemoryDeallocator)(DoublyLinkedListNode **node)

Definition at line 21 of file doublylinkedlist.h.

Function Documentation

void DoublyLinkedListDestroy ( DoublyLinkedList list)

Definition at line 22 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedList::deallocator, DoublyLinkedListNodeDestroy(), DoublyLinkedList::first, DoublyLinkedList::last, and doubly_linked_list_node::next.

Here is the call graph for this function:

void DoublyLinkedListInitialize ( DoublyLinkedList list,
NodeMemoryAllocator  allocator,
NodeMemoryDeallocator  deallocator 
)

Definition at line 13 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedList::deallocator, DoublyLinkedList::first, and DoublyLinkedList::last.

Referenced by main().

Here is the caller graph for this function:

void DoublyLinkedListInsertAfterNode ( DoublyLinkedList *const  list,
DoublyLinkedListNode node,
void *  data 
)

Definition at line 97 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedListInsertAtTail(), DoublyLinkedListNodeCreate(), DoublyLinkedList::last, doubly_linked_list_node::next, OPENER_ASSERT, and doubly_linked_list_node::previous.

Here is the call graph for this function:

void DoublyLinkedListInsertAtHead ( DoublyLinkedList *const  list,
void *  data 
)

Definition at line 51 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedListNodeCreate(), DoublyLinkedList::first, DoublyLinkedList::last, doubly_linked_list_node::next, OPENER_ASSERT, and doubly_linked_list_node::previous.

Referenced by AddNewActiveConnection(), and DoublyLinkedListInsertBeforeNode().

Here is the call graph for this function:

Here is the caller graph for this function:

void DoublyLinkedListInsertAtTail ( DoublyLinkedList *const  list,
const void *const  data 
)

Definition at line 66 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedListNodeCreate(), DoublyLinkedList::first, DoublyLinkedList::last, doubly_linked_list_node::next, OPENER_ASSERT, and doubly_linked_list_node::previous.

Referenced by DoublyLinkedListInsertAfterNode().

Here is the call graph for this function:

Here is the caller graph for this function:

void DoublyLinkedListInsertBeforeNode ( DoublyLinkedList *const  list,
DoublyLinkedListNode node,
void *  data 
)

Definition at line 81 of file doublylinkedlist.c.

References DoublyLinkedList::allocator, DoublyLinkedListInsertAtHead(), DoublyLinkedListNodeCreate(), DoublyLinkedList::first, doubly_linked_list_node::next, OPENER_ASSERT, and doubly_linked_list_node::previous.

Here is the call graph for this function:

DoublyLinkedListNode* DoublyLinkedListNodeCreate ( const void *const  data,
NodeMemoryAllocator  allocator 
)

Definition at line 36 of file doublylinkedlist.c.

References doubly_linked_list_node::data.

Referenced by DoublyLinkedListInsertAfterNode(), DoublyLinkedListInsertAtHead(), DoublyLinkedListInsertAtTail(), and DoublyLinkedListInsertBeforeNode().

Here is the caller graph for this function:

void DoublyLinkedListNodeDestroy ( const DoublyLinkedList *const  list,
DoublyLinkedListNode **  node 
)

Definition at line 45 of file doublylinkedlist.c.

References DoublyLinkedList::deallocator, and OPENER_ASSERT.

Referenced by DoublyLinkedListDestroy(), and DoublyLinkedListRemoveNode().

Here is the caller graph for this function:

void DoublyLinkedListRemoveNode ( DoublyLinkedList *const  list,
DoublyLinkedListNode **  pointer_to_node_pointer 
)

Definition at line 113 of file doublylinkedlist.c.

References DoublyLinkedListNodeDestroy(), DoublyLinkedList::first, DoublyLinkedList::last, doubly_linked_list_node::next, and doubly_linked_list_node::previous.

Referenced by RemoveFromActiveConnections().

Here is the call graph for this function:

Here is the caller graph for this function: