Go to the source code of this file.
Classes | |
struct | ib_vector_struct |
Typedefs | |
typedef struct ib_vector_struct | ib_vector_t |
Functions | |
UNIV_INTERN ib_vector_t * | ib_vector_create (mem_heap_t *heap, ulint size) |
UNIV_INTERN void | ib_vector_push (ib_vector_t *vec, void *elem) |
UNIV_INLINE ulint | ib_vector_size (const 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 void * | ib_vector_pop (ib_vector_t *vec) |
UNIV_INLINE void | ib_vector_free (ib_vector_t *vec) |
typedef struct ib_vector_struct ib_vector_t |
UNIV_INTERN ib_vector_t* ib_vector_create | ( | mem_heap_t * | heap, |
ulint | size | ||
) |
Create a new vector with the given initial size.
Create a new vector with the given initial size.
heap | in: heap |
size | in: initial size |
Definition at line 37 of file ut0vec.cc.
References ib_vector_struct::data, ib_vector_struct::heap, ib_vector_create(), mem_heap_alloc(), ib_vector_struct::total, ib_vector_struct::used, and ut_a.
Referenced by ib_vector_create(), pars_info_add_function(), pars_info_add_id(), pars_info_add_literal(), and trx_create().
UNIV_INLINE void ib_vector_free | ( | ib_vector_t * | vec) |
Free the underlying heap of the vector. Note that vec is invalid after this call. in,own: vector
Referenced by trx_free().
UNIV_INLINE void* ib_vector_get | ( | ib_vector_t * | vec, |
ulint | n | ||
) |
Get the n'th element.
vec | in: vector |
Referenced by pars_info_get_bound_id(), pars_info_get_bound_lit(), and pars_info_get_user_func().
UNIV_INLINE ibool ib_vector_is_empty | ( | const ib_vector_t * | vec) |
Test whether a vector is empty or not.
Referenced by lock_release_autoinc_locks(), lock_trx_holds_autoinc_locks(), and trx_free().
UNIV_INLINE void* ib_vector_pop | ( | ib_vector_t * | vec) |
Remove the last element from the vector. in: vector
UNIV_INTERN void ib_vector_push | ( | ib_vector_t * | vec, |
void * | elem | ||
) |
Push a new element to the vector, increasing its size if necessary. in: data element
Push a new element to the vector, increasing its size if necessary.
vec | in: vector |
elem | in: data element |
Definition at line 58 of file ut0vec.cc.
References ib_vector_struct::data, ib_vector_struct::heap, ib_vector_push(), mem_heap_alloc(), ib_vector_struct::total, and ib_vector_struct::used.
Referenced by ib_vector_push(), pars_info_add_function(), pars_info_add_id(), and pars_info_add_literal().
UNIV_INLINE ulint ib_vector_size | ( | const ib_vector_t * | vec) |
Get the number of elements in the vector.
Referenced by lock_release_off_kernel(), pars_info_get_bound_id(), pars_info_get_bound_lit(), and pars_info_get_user_func().