Bienvenue sur le site de la LibLapin.
Jetez un coup d'oeil en bas de la page pour choisir votre niveau de documentation en fonction de votre niveau avec la LibLapin.
Pour l'instant, c'est réglé sur 'Manuel complet'. Si c'est votre première fois avec la LibLapin, il vaudrait mieux choisir 'Débutant'.
De même, n'oubliez pas de préciser une version de la bibliothèque.
Queue
The queue module header is lapin/container/queue.h.
typedef struct s_bunny_queue
{
 
const size_t length;
 
const void *
const *
const front;
}
t_bunny_queue;
Description
  This structure is the main data of the Queue container.
Attributes
-
const size_t length:
  The amount of elements in the Queue container.
-
const void * const * const * top:
  A pointer to the front data stored inside the queue.
It is NULL if there is none.
INDEX
Description
  Create an Queue.
Return value
-
The function returns the address of the created Queue.
Return NULL on error.
INDEX
Description
  Delete the sent queue. Do not delete elements that was stored.
Parameters
-
t_bunny_aqueue *queue:
  The queue to delete.
Return value
-
The function returns the amount of element that was stored inside it
before being destroyed.
Logs
Logs written by this function are tagged with the "container" label.
INDEX
Description
  Return the amount of elements inside the Queue container.
Return value
-
This function returns the amount of elements inside the Queue container.
INDEX
Description
  Return if the sent Queue container is empty.
Return value
-
This function returns true if the sent Queue is empty.
INDEX
Description
  Return the element that is at the front of the sent Queue.
Return value
-
This function returns the front element of the sent Queue or NULL if there
is none.
INDEX
Description
  Push at the end of the Queue the sent data.
Parameters
-
t_bunny_queue *queue:
  The Queue in which the data will be pushed.
-
data:
  A data of any type that will be pushed at the end of the Queue.
Return value
-
This function return true if the sent data was added inside
the queue.
Error values and logs
On error, bunny_errno is set to:
Logs written by this function are tagged with the "container" label.
INDEX
Description
  Remove the front element from the sent Queue.
Return value
-
This function return the popped value or NULL if there was none.
Error values and logs
On error, bunny_errno is set to:
Logs written by this function are tagged with the "container" label.
INDEX