Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
;
54
typedef
struct
ib_list_helper_struct
ib_list_helper_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
*
72
ib_list_create_heap
(
73
/*================*/
74
mem_heap_t
*
heap
);
76
/****************************************************************/
78
UNIV_INTERN
79
void
80
ib_list_free
(
81
/*=========*/
82
ib_list_t
* list);
84
/****************************************************************/
87
UNIV_INTERN
88
ib_list_node_t
*
89
ib_list_add_first
(
90
/*==============*/
91
ib_list_t
* list,
92
void
*
data
,
93
mem_heap_t
*
heap
);
95
/****************************************************************/
98
UNIV_INTERN
99
ib_list_node_t
*
100
ib_list_add_last
(
101
/*=============*/
102
ib_list_t
* list,
103
void
*
data
,
104
mem_heap_t
*
heap
);
106
/****************************************************************/
109
UNIV_INTERN
110
ib_list_node_t
*
111
ib_list_add_after
(
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
123
ib_list_remove
(
124
/*===========*/
125
ib_list_t
* list,
126
ib_list_node_t
* node);
128
/****************************************************************/
131
UNIV_INLINE
132
ib_list_node_t
*
133
ib_list_get_first
(
134
/*==============*/
135
ib_list_t
* list);
137
/****************************************************************/
140
UNIV_INLINE
141
ib_list_node_t
*
142
ib_list_get_last
(
143
/*=============*/
144
ib_list_t
* list);
146
/* List. */
147
struct
ib_list_struct
{
148
ib_list_node_t
*
first
;
149
ib_list_node_t
*
last
;
150
ibool
is_heap_list
;
152
};
153
154
/* A list node. */
155
struct
ib_list_node_struct
{
156
ib_list_node_t
*
prev
;
157
ib_list_node_t
*
next
;
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. */
164
struct
ib_list_helper_struct
{
165
mem_heap_t
*
heap
;
166
void
*
data
;
167
};
168
169
#ifndef UNIV_NONINL
170
#include "ut0list.ic"
171
#endif
172
173
#endif
plugin
innobase
include
ut0list.h
Generated on Wed Aug 21 2013 20:36:50 for drizzle by
1.8.4