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.
Stack
The stack module header is lapin/container/stack.h.
Description
  This structure is the main data of the Stack container.
  This type cannot be declared on stack. It must be created by a call
to
bunny_new_stack.
Attributes
-
const size_t length:
  The amount of elements in the Stack container.
-
const void * const * const * top:
  A pointer to a node containing the first element of the Stack container,
and the address of its following element if there is one.
This attribute is NULL if there is no element inside the Stack.
INDEX
Description
  This structure is the node in which every single data is referenced
inside the stack.
Attributes
-
void *data:
  A pointer to a stored data.
-
struct s_bunny_stack_node *next:
  The node following the current one or NULL if there is none.
This type is an inside type of the Stack module and should not be created by you.
INDEX
Description
  Create an Stack.
Return value
-
The function returns the address of the created Stack or NULL
if an error occured.
INDEX
Description
  Delete the sent stack. Do not delete elements that was stored.
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 Stack container.
Return value
-
This function returns the amount of elements inside the Stack container.
INDEX
Description
  Return if the sent Stack container is empty.
Return value
-
This function returns true if the sent Stack is empty.
INDEX
Description
  Return the element that is on top of the sent Stack.
Return value
-
This function returns the top element of the sent Stack or NULL if there
is none.
INDEX
Description
  Push at the top of the Stack the sent data.
Parameters
-
t_bunny_stack *stack:
  The Stack in which the data will be pushed.
-
data:
  A data of any type that will be pushed at the top of the Stack.
Return value
-
This function return true if the sent data was added inside
the stack.
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 top element from the sent Stack.
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