MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ut0vec.h File Reference
#include "univ.i"
#include "mem0mem.h"
#include "ut0vec.ic"
Include dependency graph for ut0vec.h:
This graph shows which files directly or indirectly include this file:

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

UNIV_INTERN ib_vector_tib_vector_create (ib_alloc_t *alloc, ulint sizeof_value, ulint size)
UNIV_INLINE void ib_vector_free (ib_vector_t *vec)
UNIV_INLINE void * ib_vector_push (ib_vector_t *vec, const void *elem)
UNIV_INLINE void * ib_vector_pop (ib_vector_t *vec)
UNIV_INLINE void * ib_vector_remove (ib_vector_t *vec, const void *elem)
UNIV_INLINE ulint ib_vector_size (const ib_vector_t *vec)
UNIV_INTERN void ib_vector_resize (ib_vector_t *vec)
UNIV_INLINE ibool ib_vector_is_empty (const ib_vector_t *vec)
UNIV_INLINE void * ib_vector_get (ib_vector_t *vec, ulint n)
UNIV_INLINE const void * ib_vector_get_const (const ib_vector_t *vec, ulint n)
UNIV_INLINE void * ib_vector_get_last (ib_vector_t *vec)
UNIV_INLINE void ib_vector_set (ib_vector_t *vec, ulint n, void *elem)
UNIV_INLINE void ib_vector_reset (ib_vector_t *vec)
UNIV_INLINE void * ib_vector_last (ib_vector_t *vec)
UNIV_INLINE const void * ib_vector_last_const (const ib_vector_t *vec)
UNIV_INLINE void ib_vector_sort (ib_vector_t *vec, ib_compare_t compare)
UNIV_INLINE void ib_heap_free (ib_alloc_t *allocator, void *ptr)
UNIV_INLINE void * ib_heap_malloc (ib_alloc_t *allocator, ulint size)
UNIV_INLINE void * ib_heap_resize (ib_alloc_t *allocator, void *old_ptr, ulint old_size, ulint new_size)
UNIV_INLINE ib_alloc_tib_heap_allocator_create (mem_heap_t *heap)
UNIV_INLINE void ib_heap_allocator_free (ib_alloc_t *ib_ut_alloc)
UNIV_INLINE void ib_ut_free (ib_alloc_t *allocator, void *ptr)
UNIV_INLINE void * ib_ut_malloc (ib_alloc_t *allocator, ulint size)
UNIV_INLINE void * ib_ut_resize (ib_alloc_t *allocator, void *old_ptr, ulint old_size, ulint new_size)
UNIV_INLINE ib_alloc_tib_ut_allocator_create (void)
UNIV_INLINE void ib_ut_allocator_free (ib_alloc_t *ib_ut_alloc)

Detailed Description

A vector of pointers to data items

Created 4/6/2006 Osku Salerma

Definition in file ut0vec.h.

Function Documentation

UNIV_INLINE void* ib_vector_get ( ib_vector_t vec,
ulint  n 
)

Get the n'th element.

Returns
n'th element in: element index to get
Parameters
vecin: vector

Here is the caller graph for this function:

UNIV_INLINE void* ib_vector_get_last ( ib_vector_t vec)

Get last element. The vector must not be empty.

Returns
last element in: vector

Here is the caller graph for this function:

UNIV_INLINE ibool ib_vector_is_empty ( const ib_vector_t vec)

in: vector

Here is the caller graph for this function:

UNIV_INLINE void* ib_vector_remove ( ib_vector_t vec,
const void *  elem 
)

Remove an element to the vector

Returns
pointer to the "removed" element in: value to remove
Parameters
vecin: vector

Here is the caller graph for this function:

UNIV_INLINE void ib_vector_set ( ib_vector_t vec,
ulint  n,
void *  elem 
)

Set the n'th element. in: data element

Parameters
vecin/out: vector
nin: element index to set

Here is the caller graph for this function: