Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dyn0dyn.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Copyright (C) 1996, 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
#pragma once
27
#ifndef dyn0dyn_h
28
#define dyn0dyn_h
29
30
#include "univ.i"
31
#include "
ut0lst.h
"
32
#include "
mem0mem.h
"
33
35
typedef
struct
dyn_block_struct
dyn_block_t
;
37
typedef
dyn_block_t
dyn_array_t
;
38
39
42
#define DYN_ARRAY_DATA_SIZE 512
43
44
/*********************************************************************/
47
UNIV_INLINE
48
dyn_array_t
*
49
dyn_array_create
(
50
/*=============*/
51
dyn_array_t
* arr);
53
/************************************************************/
55
UNIV_INLINE
56
void
57
dyn_array_free
(
58
/*===========*/
59
dyn_array_t
* arr);
60
/*********************************************************************/
65
UNIV_INLINE
66
byte*
67
dyn_array_open
(
68
/*===========*/
69
dyn_array_t
* arr,
70
ulint size);
72
/*********************************************************************/
74
UNIV_INLINE
75
void
76
dyn_array_close
(
77
/*============*/
78
dyn_array_t
* arr,
79
byte* ptr);
80
/*********************************************************************/
85
UNIV_INLINE
86
void
*
87
dyn_array_push
(
88
/*===========*/
89
dyn_array_t
* arr,
90
ulint size);
91
/************************************************************/
94
UNIV_INLINE
95
void
*
96
dyn_array_get_element
(
97
/*==================*/
98
dyn_array_t
* arr,
99
ulint pos);
101
/************************************************************/
104
UNIV_INLINE
105
ulint
106
dyn_array_get_data_size
(
107
/*====================*/
108
dyn_array_t
* arr);
109
/************************************************************/
111
UNIV_INLINE
112
dyn_block_t
*
113
dyn_array_get_first_block
(
114
/*======================*/
115
dyn_array_t
* arr);
116
/************************************************************/
118
UNIV_INLINE
119
dyn_block_t
*
120
dyn_array_get_last_block
(
121
/*=====================*/
122
dyn_array_t
* arr);
123
/********************************************************************/
126
UNIV_INLINE
127
dyn_block_t
*
128
dyn_array_get_next_block
(
129
/*=====================*/
130
dyn_array_t
* arr,
131
dyn_block_t
* block);
132
/********************************************************************/
135
UNIV_INLINE
136
ulint
137
dyn_block_get_used
(
138
/*===============*/
139
dyn_block_t
* block);
140
/********************************************************************/
143
UNIV_INLINE
144
byte*
145
dyn_block_get_data
(
146
/*===============*/
147
dyn_block_t
* block);
148
/********************************************************/
150
UNIV_INLINE
151
void
152
dyn_push_string
(
153
/*============*/
154
dyn_array_t
* arr,
155
const
byte* str,
156
ulint len);
158
/*#################################################################*/
159
163
struct
dyn_block_struct
{
164
mem_heap_t
*
heap
;
166
ulint
used
;
169
byte
data
[
DYN_ARRAY_DATA_SIZE
];
171
UT_LIST_BASE_NODE_T
(
dyn_block_t
) base;
174
UT_LIST_NODE_T
(
dyn_block_t
) list;
176
#ifdef UNIV_DEBUG
177
ulint buf_end;
180
ulint magic_n;
181
#endif
182
};
183
184
185
#ifndef UNIV_NONINL
186
#include "dyn0dyn.ic"
187
#endif
188
189
#endif
plugin
innobase
include
dyn0dyn.h
Generated on Thu Aug 29 2013 10:00:32 for drizzle by
1.8.4