Drizzled Public API Documentation

ut0list.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 2006, 2009, Innobase Oy. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /*******************************************************************/
26 /*******************************************************************/
46 #pragma once
47 #ifndef IB_LIST_H
48 #define IB_LIST_H
49 
50 #include "mem0mem.h"
51 
52 typedef struct ib_list_struct ib_list_t;
53 typedef struct ib_list_node_struct ib_list_node_t;
55 
56 /****************************************************************/
60 UNIV_INTERN
61 ib_list_t*
62 ib_list_create(void);
63 /*=================*/
64 
65 
66 /****************************************************************/
70 UNIV_INTERN
71 ib_list_t*
73 /*================*/
74  mem_heap_t* heap);
76 /****************************************************************/
78 UNIV_INTERN
79 void
81 /*=========*/
82  ib_list_t* list);
84 /****************************************************************/
87 UNIV_INTERN
90 /*==============*/
91  ib_list_t* list,
92  void* data,
93  mem_heap_t* heap);
95 /****************************************************************/
98 UNIV_INTERN
101 /*=============*/
102  ib_list_t* list,
103  void* data,
104  mem_heap_t* heap);
106 /****************************************************************/
109 UNIV_INTERN
112 /*==============*/
113  ib_list_t* list,
114  ib_list_node_t* prev_node,
116  void* data,
117  mem_heap_t* heap);
119 /****************************************************************/
121 UNIV_INTERN
122 void
124 /*===========*/
125  ib_list_t* list,
126  ib_list_node_t* node);
128 /****************************************************************/
131 UNIV_INLINE
134 /*==============*/
135  ib_list_t* list);
137 /****************************************************************/
140 UNIV_INLINE
143 /*=============*/
144  ib_list_t* list);
146 /* List. */
150  ibool is_heap_list;
152 };
153 
154 /* A list node. */
158  void* data;
159 };
160 
161 /* Quite often, the only additional piece of data you need is the per-item
162 memory heap, so we have this generic struct available to use in those
163 cases. */
166  void* data;
167 };
168 
169 #ifndef UNIV_NONINL
170 #include "ut0list.ic"
171 #endif
172 
173 #endif
UNIV_INTERN ib_list_node_t * ib_list_add_last(ib_list_t *list, void *data, mem_heap_t *heap)
Definition: ut0list.cc:103
ibool is_heap_list
Definition: ut0list.h:150
ib_list_node_t * first
Definition: ut0list.h:148
UNIV_INTERN ib_list_node_t * ib_list_add_first(ib_list_t *list, void *data, mem_heap_t *heap)
Definition: ut0list.cc:89
ib_list_node_t * prev
Definition: ut0list.h:156
UNIV_INLINE ib_list_node_t * ib_list_get_first(ib_list_t *list)
ib_list_node_t * last
Definition: ut0list.h:149
UNIV_INTERN ib_list_node_t * ib_list_add_after(ib_list_t *list, ib_list_node_t *prev_node, void *data, mem_heap_t *heap)
Definition: ut0list.cc:117
UNIV_INTERN void ib_list_remove(ib_list_t *list, ib_list_node_t *node)
Definition: ut0list.cc:170
UNIV_INTERN ib_list_t * ib_list_create(void)
Definition: ut0list.cc:36
mem_heap_t * heap
Definition: ut0list.h:165
UNIV_INLINE ib_list_node_t * ib_list_get_last(ib_list_t *list)
UNIV_INTERN ib_list_t * ib_list_create_heap(mem_heap_t *heap)
Definition: ut0list.cc:54
ib_list_node_t * next
Definition: ut0list.h:157
UNIV_INTERN void ib_list_free(ib_list_t *list)
Definition: ut0list.cc:71