libamxc  1.10.3
C Generic Data Containers
amxc_lstack.h File Reference

Ambiorix linked stack API header file. More...

#include <amxc/amxc_common.h>
#include <amxc/amxc_llist.h>

Go to the source code of this file.

Typedefs

typedef amxc_llist_t amxc_lstack_t
 The linked stack structure. More...
 
typedef amxc_llist_it_t amxc_lstack_it_t
 The linked stack iterator structure. More...
 
typedef amxc_llist_it_delete_t amxc_lstack_it_delete_t
 Definition of the item delete function. More...
 

Functions

AMXC_INLINE int amxc_lstack_new (amxc_lstack_t **lstack)
 Allocates a linked stack. More...
 
AMXC_INLINE void amxc_lstack_delete (amxc_lstack_t **lstack, amxc_lstack_it_delete_t func)
 Frees the previously allocated linked stack. More...
 
AMXC_INLINE int amxc_lstack_init (amxc_lstack_t *const lstack)
 Initializes a linked stack. More...
 
AMXC_INLINE void amxc_lstack_clean (amxc_lstack_t *const lstack, amxc_lstack_it_delete_t func)
 Removes all items from the linked stack. More...
 
AMXC_INLINE int amxc_lstack_push (amxc_lstack_t *const lstack, amxc_lstack_it_t *const it)
 Adds an item to the linked stack. More...
 
AMXC_INLINE amxc_lstack_it_tamxc_lstack_pop (amxc_lstack_t *const lstack)
 Removes the last added item from the stack. More...
 
AMXC_INLINE amxc_lstack_it_tamxc_lstack_peek (amxc_lstack_t *const lstack)
 Peeks the top of the stack, without removing. More...
 
AMXC_INLINE size_t amxc_lstack_size (const amxc_lstack_t *const lstack)
 Calculates the size of the stack, expressed in number of items. More...
 
AMXC_INLINE bool amxc_lstack_is_empty (const amxc_lstack_t *const lstack)
 Checks if the linked stack is empty. More...
 
AMXC_INLINE int amxc_lstack_it_init (amxc_lstack_it_t *const it)
 Initializes a linked stack iterator. More...
 

Detailed Description

Ambiorix linked stack API header file.

Definition in file amxc_lstack.h.