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.
int_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 INT_LINKED_LIST_H
27 #define INT_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 IntListNode
50 {
53 
55  int32 iln_value;
56 
57 } IntListNode;
58 
59 
69 
70 
77 GRASSROOTS_UTIL_API void FreeIntListNode (ListItem * const node_p);
78 
79 
80 
81 
89 
90 
91 
100 GRASSROOTS_UTIL_API bool AddIntegerToIntLinkedList (LinkedList *list_p, const int32 value);
101 
102 
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif /* #ifndef INT_LINKED_LIST_H */
109 
IntListNode::FreeIntListNode
void FreeIntListNode(ListItem *const node_p)
Free a IntListNode.
grassroots_util_library.h
IntListNode::iln_value
int32 iln_value
The integer value.
Definition: int_linked_list.h:55
typedefs.h
IntListNode::AllocateIntListNode
IntListNode * AllocateIntListNode(const int32 value)
Create a new IntListNode.
IntListNode::AllocateIntLinkedList
LinkedList * AllocateIntLinkedList(void)
Create a LinkedList designed to hold IntListNodes.
IntListNode::iln_node
ListItem iln_node
The ListNode.
Definition: int_linked_list.h:52
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
IntListNode
A ListNode for LinkedLists that also stores an integer value.
Definition: int_linked_list.h:49
IntListNode::AddIntegerToIntLinkedList
bool AddIntegerToIntLinkedList(LinkedList *list_p, const int32 value)
Create and add a new IntListNode to the tail of a LinkedList.
memory_allocations.h
linked_list.h
A doubly-linked list.
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