#include <Stack.h>
Related Functions | |
(Note that these are not member functions.) | |
| Stack_ptr | Stack_copy (Stack_ptr self) |
| Creates a copy of a given stack. | |
| Stack_ptr | Stack_create (void) |
| Creates an instance of a Stack. | |
| Stack_ptr | Stack_create_with_param (int size) |
| Creates an instance of a Stack. | |
| void | Stack_destroy (Stack_ptr self) |
| Destroys a stack instance. | |
| size_t | Stack_get_size (Stack_ptr self) |
| Returns the size of the stack. | |
| boolean | Stack_is_empty (Stack_ptr self) |
| Returns true iff the stack is empty. | |
| void * | Stack_pop (Stack_ptr self) |
| Removes the element at the top of the stack. | |
| void | Stack_push (Stack_ptr self, void *element) |
| Pushes an element at the top of the stack. | |
| void * | Stack_top (Stack_ptr self) |
| Returns the element at the top of the stack. | |
| Stack_ptr Stack_copy | ( | Stack_ptr | self | ) | [related] |
Creates a copy of a given stack.
| Stack_ptr Stack_create | ( | void | ) | [related] |
Creates an instance of a Stack.
| Stack_ptr Stack_create_with_param | ( | int | size | ) | [related] |
Creates an instance of a Stack.
Allow the user to define the initial size
| void Stack_destroy | ( | Stack_ptr | self | ) | [related] |
Destroys a stack instance.
The memory used by the Stack will be freed. Note: memory occupied by the elements is not freed! It is the user responsibility.
| size_t Stack_get_size | ( | Stack_ptr | self | ) | [related] |
Returns the size of the stack.
| boolean Stack_is_empty | ( | Stack_ptr | self | ) | [related] |
Returns true iff the stack is empty.
| void * Stack_pop | ( | Stack_ptr | self | ) | [related] |
| void Stack_push | ( | Stack_ptr | self, | |
| void * | element | |||
| ) | [related] |
Pushes an element at the top of the stack.
| void * Stack_top | ( | Stack_ptr | self | ) | [related] |
Returns the element at the top of the stack.
1.6.1