MySQL 8.0.40
Source Code Documentation
|
A vector of pointers to data items. More...
Go to the source code of this file.
Classes | |
struct | ib_alloc_t |
struct | ib_vector_t |
Macros | |
#define | ib_vector_getp(v, n) (*(void **)ib_vector_get(v, n)) |
#define | ib_vector_getp_const(v, n) (*(void **)ib_vector_get_const(v, n)) |
#define | ib_vector_allocator(v) (v->allocator) |
Typedefs | |
typedef void *(* | ib_mem_alloc_t) (ib_alloc_t *allocator, ulint size) |
typedef void(* | ib_mem_free_t) (ib_alloc_t *allocator, void *ptr) |
typedef void *(* | ib_mem_resize_t) (ib_alloc_t *allocator, void *ptr, ulint old_size, ulint new_size) |
typedef int(* | ib_compare_t) (const void *, const void *) |
Functions | |
ib_vector_t * | ib_vector_create (ib_alloc_t *alloc, ulint sizeof_value, ulint size) |
static void | ib_vector_free (ib_vector_t *vec) |
static void * | ib_vector_push (ib_vector_t *vec, const void *elem) |
static void * | ib_vector_pop (ib_vector_t *vec) |
static void * | ib_vector_remove (ib_vector_t *vec, const void *elem) |
Remove an element to the vector. More... | |
static ulint | ib_vector_size (const ib_vector_t *vec) |
void | ib_vector_resize (ib_vector_t *vec) |
static bool | ib_vector_is_empty (const ib_vector_t *vec) |
in: vector More... | |
static void * | ib_vector_get (ib_vector_t *vec, ulint n) |
Get the n'th element. More... | |
static const void * | ib_vector_get_const (const ib_vector_t *vec, ulint n) |
static void * | ib_vector_get_last (ib_vector_t *vec) |
Get last element. More... | |
static void | ib_vector_set (ib_vector_t *vec, ulint n, void *elem) |
Set the n'th element. More... | |
static void | ib_vector_reset (ib_vector_t *vec) |
static void * | ib_vector_last (ib_vector_t *vec) |
static const void * | ib_vector_last_const (const ib_vector_t *vec) |
static void | ib_vector_sort (ib_vector_t *vec, ib_compare_t compare) |
static void | ib_heap_free (ib_alloc_t *allocator, void *ptr) |
static void * | ib_heap_malloc (ib_alloc_t *allocator, ulint size) |
static void * | ib_heap_resize (ib_alloc_t *allocator, void *old_ptr, ulint old_size, ulint new_size) |
static ib_alloc_t * | ib_heap_allocator_create (mem_heap_t *heap) |
static void | ib_heap_allocator_free (ib_alloc_t *ib_ut_alloc) |
A vector of pointers to data items.
Created 4/6/2006 Osku Salerma
#define ib_vector_allocator | ( | v | ) | (v->allocator) |
#define ib_vector_getp | ( | v, | |
n | |||
) | (*(void **)ib_vector_get(v, n)) |
#define ib_vector_getp_const | ( | v, | |
n | |||
) | (*(void **)ib_vector_get_const(v, n)) |
typedef int(* ib_compare_t) (const void *, const void *) |
typedef void *(* ib_mem_alloc_t) ( ib_alloc_t *allocator, ulint size) |
typedef void(* ib_mem_free_t) (ib_alloc_t *allocator, void *ptr) |
typedef void *(* ib_mem_resize_t) ( ib_alloc_t *allocator, void *ptr, ulint old_size, ulint new_size) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
ib_vector_t * ib_vector_create | ( | ib_alloc_t * | alloc, |
ulint | sizeof_value, | ||
ulint | size | ||
) |
|
inlinestatic |
|
inlinestatic |
Get the n'th element.
[in] | vec | vector |
[in] | n | element index to get |
|
inlinestatic |
|
inlinestatic |
Get last element.
The vector must not be empty.
|
inlinestatic |
in: vector
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Remove an element to the vector.
[in] | vec | vector |
[in] | elem | value to remove |
|
inlinestatic |
void ib_vector_resize | ( | ib_vector_t * | vec | ) |
|
inlinestatic |
Set the n'th element.
[in] | vec | vector |
[in] | n | element index to set |
[in] | elem | data element |
|
inlinestatic |
|
inlinestatic |