liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
que.h File Reference

basic queue library More...

#include "list.h"
Include dependency graph for que.h:

Go to the source code of this file.

Data Structures

struct  a_que
 instance structure for basic queue More...
 

Macros

#define A_QUE_FORE_(T, ctx)
 
#define A_QUE_BACK_(T, ctx)
 
#define A_QUE_FORE(T, ctx)
 
#define A_QUE_BACK(T, ctx)
 
#define A_QUE_AT(T, ctx, idx)
 
#define A_QUE_PUSH_SORT(T, ctx, key, cmp)
 
#define A_QUE_PUSH_FORE(T, ctx)
 
#define A_QUE_PUSH_BACK(T, ctx)
 
#define A_QUE_PULL_FORE(T, ctx)
 
#define A_QUE_PULL_BACK(T, ctx)
 
#define A_QUE_INSERT(T, ctx, idx)
 
#define A_QUE_REMOVE(T, ctx, idx)
 
#define a_que_foreach(T, P, it, ctx)
 iterate over a queue
 
#define a_que_foreach_reverse(T, P, it, ctx)
 iterate over a queue in reverse
 

Typedefs

typedef struct a_que a_que
 instance structure for basic queue
 

Functions

size_t a_que_siz (a_que const *ctx)
 access size of a element for a pointer to queue structure
 
size_t a_que_num (a_que const *ctx)
 access number of element for a pointer to queue structure
 
void * a_que_fore_ (a_que const *ctx)
 access foremost element for a pointer to queue structure
 
void * a_que_back_ (a_que const *ctx)
 access backmost element for a pointer to queue structure
 
void * a_que_fore (a_que const *ctx)
 access foremost element for a pointer to queue structure
 
void * a_que_back (a_que const *ctx)
 access backmost element for a pointer to queue structure
 
void a_que_swap_ (void *lhs, void *rhs)
 swap elements lhs and rhs for a pointer to queue structure
 
a_quea_que_new (size_t size)
 allocate a pointer to queue structure from memory
 
void a_que_die (a_que *ctx, void(*dtor)(void *))
 deallocate a pointer to queue structure
 
void a_que_ctor (a_que *ctx, size_t size)
 constructor for queue structure
 
void a_que_dtor (a_que *ctx, void(*dtor)(void *))
 destructor for queue structure
 
void a_que_move (a_que *ctx, a_que *obj)
 initialize a pointer to queue structure by moving
 
void * a_que_at (a_que const *ctx, ptrdiff_t idx)
 access specified element for a pointer to queue structure
 
int a_que_drop (a_que *ctx, void(*dtor)(void *))
 drop all the elements for a pointer to queue structure
 
int a_que_edit (a_que *ctx, size_t size, void(*dtor)(void *))
 edit size of a element for a pointer to queue structure
 
int a_que_swap (a_que const *ctx, size_t lhs, size_t rhs)
 swap elements lhs and rhs for a pointer to queue structure
 
void a_que_sort_fore (a_que const *ctx, int(*cmp)(void const *, void const *))
 insert sort foremost element for a pointer to queue structure
 
void a_que_sort_back (a_que const *ctx, int(*cmp)(void const *, void const *))
 insert sort backmost element for a pointer to queue structure
 
void * a_que_push_sort (a_que *ctx, void const *key, int(*cmp)(void const *, void const *))
 push an element into the queue and sort it
 
void * a_que_push_fore (a_que *ctx)
 push an element into the queue forward
 
void * a_que_push_back (a_que *ctx)
 push an element into the queue backward
 
void * a_que_pull_fore (a_que *ctx)
 pull an element from the queue forward
 
void * a_que_pull_back (a_que *ctx)
 pull an element from the queue backward
 
void * a_que_insert (a_que *ctx, size_t idx)
 insert an element into the queue
 
void * a_que_remove (a_que *ctx, size_t idx)
 remove an element from the queue
 

Detailed Description

basic queue library