|
liba 0.1.15
An algorithm library based on C/C++
|
basic buffer library More...
#include "a.h"Go to the source code of this file.
Data Structures | |
| struct | a_buf |
| instance structure for basic buffer More... | |
Macros | |
| #define | A_BUF_DEF a_size num_, mem_, siz_ |
| #define | a_buf_(_, x) |
| cast a buffer pointer from another type pointer | |
| #define | A_BUF_PTR(T, ctx) |
| #define | A_BUF_AT_(T, ctx, idx) |
| #define | A_BUF_AT(T, ctx, idx) |
| #define | A_BUF_OF(T, ctx, idx) |
| #define | A_BUF_TOP_(T, ctx) |
| #define | A_BUF_TOP(T, ctx) |
| #define | A_BUF_END(T, ctx) |
| #define | A_BUF_PUSH_SORT(T, ctx, key, cmp) |
| #define | A_BUF_SEARCH(T, ctx, obj, cmp) |
| #define | A_BUF_INSERT(T, ctx, idx) |
| #define | A_BUF_REMOVE(T, ctx, idx) |
| #define | A_BUF_PUSH_FORE(T, ctx) |
| #define | A_BUF_PUSH_BACK(T, ctx) |
| #define | A_BUF_PULL_FORE(T, ctx) |
| #define | A_BUF_PULL_BACK(T, ctx) |
| #define | A_BUF_PUSH(T, ctx) |
| #define | A_BUF_PULL(T, ctx) |
| #define | a_buf_forenum(i, ctx) |
| iterate over a buffer | |
| #define | A_BUF_FORENUM(I, i, ctx) |
| #define | a_buf_forenum_reverse(i, ctx) |
| iterate over a buffer in reverse | |
| #define | A_BUF_FORENUM_REVERSE(I, i, ctx) |
| #define | a_buf_foreach(T, S, it, ctx) |
| iterate over a buffer | |
| #define | A_BUF_FOREACH(T, it, at, ctx) |
| #define | a_buf_foreach_reverse(T, S, it, ctx) |
| iterate over a buffer in reverse | |
| #define | A_BUF_FOREACH_REVERSE(T, it, at, ctx) |
Typedefs | |
| typedef struct a_buf | a_buf |
| instance structure for basic buffer | |
Functions | |
| a_size | a_buf_num (void const *ctx) |
| access number of element for a pointer to buffer structure | |
| a_size | a_buf_mem (void const *ctx) |
| access memory of element for a pointer to buffer structure | |
| a_size | a_buf_siz (void const *ctx) |
| access size of a element for a pointer to buffer structure | |
| void * | a_buf_ptr (void const *ctx) |
| access address of buffer for a pointer to buffer structure | |
| void * | a_buf_at_ (void const *ctx, a_size idx) |
| access specified element for a pointer to buffer structure | |
| void * | a_buf_at (void const *ctx, a_size idx) |
| access specified element for a pointer to buffer structure | |
| void * | a_buf_of (void const *ctx, a_diff idx) |
| access specified element for a pointer to buffer structure | |
| void * | a_buf_top_ (void const *ctx) |
| access top element for a pointer to buffer structure | |
| void * | a_buf_top (void const *ctx) |
| access top element for a pointer to buffer structure | |
| void * | a_buf_end (void const *ctx) |
| access end pointer for a pointer to buffer structure | |
| a_buf * | a_buf_new (a_size siz, a_size num) |
| allocate a pointer to buffer structure from memory | |
| void | a_buf_die (a_buf *ctx, void(*dtor)(void *)) |
| deallocate a pointer to buffer structure | |
| void | a_buf_ctor (void *ctx, a_size siz, a_size num) |
| constructor for buffer structure | |
| void | a_buf_dtor (void *ctx, void(*dtor)(void *)) |
| destructor for buffer structure | |
| a_buf * | a_buf_setm (a_buf *ctx, a_size mem) |
| set memory of element for a pointer to buffer structure | |
| void | a_buf_setn (void *ctx, a_size num, void(*dtor)(void *)) |
| set number of element for a pointer to buffer structure | |
| void | a_buf_setz (void *ctx, a_size siz, void(*dtor)(void *)) |
| set size of a element for a pointer to buffer structure | |
| void | a_buf_sort (void const *ctx, int(*cmp)(void const *, void const *)) |
| sort all elements for a pointer to buffer structure | |
| void | a_buf_sort_fore (void const *ctx, int(*cmp)(void const *, void const *)) |
| insert sort foremost element for a pointer to buffer structure | |
| void | a_buf_sort_back (void const *ctx, int(*cmp)(void const *, void const *)) |
| insert sort backmost element for a pointer to buffer structure | |
| void * | a_buf_push_sort (void *ctx, void const *key, int(*cmp)(void const *, void const *)) |
| push an element into the buffer and sort it | |
| void * | a_buf_search (void const *ctx, void const *obj, int(*cmp)(void const *, void const *)) |
| search the given element in this buffer | |
| void * | a_buf_insert (void *ctx, a_size idx) |
| insert an element into the buffer | |
| void * | a_buf_remove (void *ctx, a_size idx) |
| remove an element from the buffer | |
| void * | a_buf_push_fore (void *ctx) |
| push an element into the buffer forward | |
| void * | a_buf_push_back (void *ctx) |
| push an element into the buffer backward | |
| void * | a_buf_pull_fore (void *ctx) |
| pull an element from the buffer forward | |
| void * | a_buf_pull_back (void *ctx) |
| pull an element from the buffer backward | |
| int | a_buf_store (void *ctx, a_size idx, void *ptr, a_size num, int(*copy)(void *, void const *)) |
| store elements into the buffer | |
| int | a_buf_erase (void *ctx, a_size idx, a_size num, void(*dtor)(void *)) |
| erase elements from the buffer | |
| void * | a_buf_push (void *ctx) |
| push an element into the buffer | |
| void * | a_buf_pull (void *ctx) |
| pull an element from the buffer | |
basic buffer library