Concord - C Discord API library
A Discord API wrapper library written in C
priority_queue.h File Reference
#include <stdlib.h>
Include dependency graph for priority_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRIORITY_QUEUE_H
 

Typedefs

typedef struct priority_queue priority_queue
 
typedef unsigned priority_queue_id
 

Enumerations

enum  priority_queue_flags { priority_queue_min = 0 , priority_queue_max = 1 }
 

Functions

priority_queuepriority_queue_create (size_t key_size, size_t val_size, int(*cmp)(const void *a, const void *b), priority_queue_flags flags)
 
void priority_queue_destroy (priority_queue *queue)
 
size_t priority_queue_length (priority_queue *queue)
 
void priority_queue_set_max_capacity (priority_queue *queue, size_t capacity)
 
priority_queue_id priority_queue_push (priority_queue *queue, void *key, void *val)
 
priority_queue_id priority_queue_peek (priority_queue *queue, void *key, void *val)
 
priority_queue_id priority_queue_pop (priority_queue *queue, void *key, void *val)
 
priority_queue_id priority_queue_get (priority_queue *queue, priority_queue_id id, void *key, void *val)
 
int priority_queue_del (priority_queue *queue, priority_queue_id id)
 
int priority_queue_update (priority_queue *queue, priority_queue_id id, void *key, void *val)
 

Macro Definition Documentation

◆ PRIORITY_QUEUE_H

#define PRIORITY_QUEUE_H

Typedef Documentation

◆ priority_queue

◆ priority_queue_id

typedef unsigned priority_queue_id

Enumeration Type Documentation

◆ priority_queue_flags

Enumerator
priority_queue_min 
priority_queue_max 

Function Documentation

◆ priority_queue_create()

priority_queue * priority_queue_create ( size_t  key_size,
size_t  val_size,
int(*)(const void *a, const void *b)  cmp,
priority_queue_flags  flags 
)

◆ priority_queue_destroy()

void priority_queue_destroy ( priority_queue queue)

◆ priority_queue_length()

size_t priority_queue_length ( priority_queue queue)

◆ priority_queue_set_max_capacity()

void priority_queue_set_max_capacity ( priority_queue queue,
size_t  capacity 
)

◆ priority_queue_push()

priority_queue_id priority_queue_push ( priority_queue queue,
void *  key,
void *  val 
)

◆ priority_queue_peek()

priority_queue_id priority_queue_peek ( priority_queue queue,
void *  key,
void *  val 
)

◆ priority_queue_pop()

priority_queue_id priority_queue_pop ( priority_queue queue,
void *  key,
void *  val 
)

◆ priority_queue_get()

priority_queue_id priority_queue_get ( priority_queue queue,
priority_queue_id  id,
void *  key,
void *  val 
)

◆ priority_queue_del()

int priority_queue_del ( priority_queue queue,
priority_queue_id  id 
)

◆ priority_queue_update()

int priority_queue_update ( priority_queue queue,
priority_queue_id  id,
void *  key,
void *  val 
)