Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
double_linked_list.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
26 #ifndef DOUBLE_LINKED_LIST_H
27 #define DOUBLE_LINKED_LIST_H
28 
29 
31 #include "linked_list.h"
32 #include "memory_allocations.h"
33 #include "typedefs.h"
34 
35 
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 
49 typedef struct DoubleListNode
50 {
53 
55  double64 dln_value;
56 
58 
59 
69 
70 
77 GRASSROOTS_UTIL_API void FreeDoubleListNode (ListItem * const node_p);
78 
79 
80 
81 
89 
90 
91 
100 GRASSROOTS_UTIL_API bool AddDoubleToDoubleLinkedList (LinkedList *list_p, const double64 value);
101 
102 
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* #ifndef INT_LINKED_LIST_H */
109 
DoubleListNode::FreeDoubleListNode
void FreeDoubleListNode(ListItem *const node_p)
Free a DoubleListNode.
grassroots_util_library.h
DoubleListNode
A ListNode for LinkedLists that also stores an double value.
Definition: double_linked_list.h:49
DoubleListNode::AllocateDoubleListNode
DoubleListNode * AllocateDoubleListNode(const double64 value)
Create a new DoubleListNode.
DoubleListNode::dln_value
double64 dln_value
The double value.
Definition: double_linked_list.h:55
typedefs.h
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
DoubleListNode::AddDoubleToDoubleLinkedList
bool AddDoubleToDoubleLinkedList(LinkedList *list_p, const double64 value)
Create and add a new DoubleListNode to the tail of a LinkedList.
DoubleListNode::dln_node
ListItem dln_node
The ListNode.
Definition: double_linked_list.h:52
memory_allocations.h
linked_list.h
A doubly-linked list.
DoubleListNode::AllocateDoubleLinkedList
LinkedList * AllocateDoubleLinkedList(void)
Create a LinkedList designed to hold DoubleListNodes.
GRASSROOTS_UTIL_API
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
ListItem
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43