schroqueue

schroqueue

Synopsis

struct              SchroQueue;
struct              SchroQueueElement;
void                (*SchroQueueFreeFunc)               (void *data,
                                                         SchroPictureNumber number);
void                schro_queue_add                     (SchroQueue *queue,
                                                         void *element,
                                                         SchroPictureNumber picture_number);
void                schro_queue_clear                   (SchroQueue *queue);
void                schro_queue_delete                  (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);
void *              schro_queue_find                    (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);
void                schro_queue_free                    (SchroQueue *queue);
int                 schro_queue_is_empty                (SchroQueue *queue);
int                 schro_queue_is_full                 (SchroQueue *queue);
SchroQueue *        schro_queue_new                     (int size,
                                                         SchroQueueFreeFunc func);
void                schro_queue_pop                     (SchroQueue *queue);
void *              schro_queue_pull                    (SchroQueue *queue);
void *              schro_queue_remove                  (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);

Description

Details

struct SchroQueue

struct SchroQueue {
  int size;
  int n;

  SchroQueueElement *elements;
  SchroQueueFreeFunc free;
};


struct SchroQueueElement

struct SchroQueueElement {
  void *data;
  SchroPictureNumber picture_number;
};


SchroQueueFreeFunc ()

void                (*SchroQueueFreeFunc)               (void *data,
                                                         SchroPictureNumber number);


schro_queue_add ()

void                schro_queue_add                     (SchroQueue *queue,
                                                         void *element,
                                                         SchroPictureNumber picture_number);


schro_queue_clear ()

void                schro_queue_clear                   (SchroQueue *queue);


schro_queue_delete ()

void                schro_queue_delete                  (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);


schro_queue_find ()

void *              schro_queue_find                    (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);


schro_queue_free ()

void                schro_queue_free                    (SchroQueue *queue);


schro_queue_is_empty ()

int                 schro_queue_is_empty                (SchroQueue *queue);


schro_queue_is_full ()

int                 schro_queue_is_full                 (SchroQueue *queue);


schro_queue_new ()

SchroQueue *        schro_queue_new                     (int size,
                                                         SchroQueueFreeFunc func);


schro_queue_pop ()

void                schro_queue_pop                     (SchroQueue *queue);


schro_queue_pull ()

void *              schro_queue_pull                    (SchroQueue *queue);


schro_queue_remove ()

void *              schro_queue_remove                  (SchroQueue *queue,
                                                         SchroPictureNumber picture_number);