drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
dyn0dyn.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free Software
7Foundation; version 2 of the License.
8
9This program is distributed in the hope that it will be useful, but WITHOUT
10ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License along with
14this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15St, Fifth Floor, Boston, MA 02110-1301 USA
16
17*****************************************************************************/
18
19/**************************************************/
25
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
38
39
42#define DYN_ARRAY_DATA_SIZE 512
43
44/*********************************************************************/
47UNIV_INLINE
50/*=============*/
51 dyn_array_t* arr);
53/************************************************************/
55UNIV_INLINE
56void
58/*===========*/
59 dyn_array_t* arr);
60/*********************************************************************/
65UNIV_INLINE
66byte*
68/*===========*/
69 dyn_array_t* arr,
70 ulint size);
72/*********************************************************************/
74UNIV_INLINE
75void
77/*============*/
78 dyn_array_t* arr,
79 byte* ptr);
80/*********************************************************************/
85UNIV_INLINE
86void*
88/*===========*/
89 dyn_array_t* arr,
90 ulint size);
91/************************************************************/
94UNIV_INLINE
95void*
97/*==================*/
98 dyn_array_t* arr,
99 ulint pos);
101/************************************************************/
104UNIV_INLINE
105ulint
107/*====================*/
108 dyn_array_t* arr);
109/************************************************************/
111UNIV_INLINE
114/*======================*/
115 dyn_array_t* arr);
116/************************************************************/
118UNIV_INLINE
121/*=====================*/
122 dyn_array_t* arr);
123/********************************************************************/
126UNIV_INLINE
129/*=====================*/
130 dyn_array_t* arr,
131 dyn_block_t* block);
132/********************************************************************/
135UNIV_INLINE
136ulint
138/*===============*/
139 dyn_block_t* block);
140/********************************************************************/
143UNIV_INLINE
144byte*
146/*===============*/
147 dyn_block_t* block);
148/********************************************************/
150UNIV_INLINE
151void
153/*============*/
154 dyn_array_t* arr,
155 const byte* str,
156 ulint len);
157
158/*#################################################################*/
159
164 mem_heap_t* heap;
166 ulint used;
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
#define DYN_ARRAY_DATA_SIZE
Definition dyn0dyn.h:42
UNIV_INLINE void dyn_array_close(dyn_array_t *arr, byte *ptr)
UNIV_INLINE dyn_array_t * dyn_array_create(dyn_array_t *arr)
UNIV_INLINE ulint dyn_array_get_data_size(dyn_array_t *arr)
UNIV_INLINE dyn_block_t * dyn_array_get_first_block(dyn_array_t *arr)
UNIV_INLINE void dyn_push_string(dyn_array_t *arr, const byte *str, ulint len)
UNIV_INLINE byte * dyn_block_get_data(dyn_block_t *block)
UNIV_INLINE byte * dyn_array_open(dyn_array_t *arr, ulint size)
struct dyn_block_struct dyn_block_t
Definition dyn0dyn.h:35
UNIV_INLINE dyn_block_t * dyn_array_get_next_block(dyn_array_t *arr, dyn_block_t *block)
UNIV_INLINE void dyn_array_free(dyn_array_t *arr)
UNIV_INLINE ulint dyn_block_get_used(dyn_block_t *block)
UNIV_INLINE void * dyn_array_get_element(dyn_array_t *arr, ulint pos)
dyn_block_t dyn_array_t
Definition dyn0dyn.h:37
UNIV_INLINE void * dyn_array_push(dyn_array_t *arr, ulint size)
UNIV_INLINE dyn_block_t * dyn_array_get_last_block(dyn_array_t *arr)
A block in a dynamically allocated array. NOTE! Do not access the fields of the struct directly: the ...
Definition dyn0dyn.h:163
UT_LIST_BASE_NODE_T(dyn_block_t) base
byte data[DYN_ARRAY_DATA_SIZE]
Definition dyn0dyn.h:169
mem_heap_t * heap
Definition dyn0dyn.h:164
UT_LIST_NODE_T(dyn_block_t) list