#include <stdlib.h>#include <stdio.h>#include "stack.h"Include dependency graph for stack.c:

Go to the source code of this file.
Functions | |
| Stack * | stCreate () |
| creates an empty stack return the stack created | |
| void | stDestroy (Stack **stackAddress, StDestroyMode mode) |
| destroys the stack, mode defines if objects will be destroyed too | |
| int | stPush (Stack *st, void *object) |
| inserts an element to the stack | |
| int | stPop (Stack *st, void **objectAddress) |
| fill object with the top of the stack, which is removed | |
| int | stGetTop (Stack *st, void **objectAddress) |
| get stack top, but does not remove it | |
| int | stNumElements (Stack *st) |
| returns the number of elements in the stack | |
| int | stRegisterDestroyFunction (Stack *st, StDestroyFunction *destroyFunction) |
| register functions | |
|
|
creates an empty stack return the stack created
Definition at line 5 of file stack.c. References _Stack_::destroyFunction, _Stack_::elements, and listCreate(). Referenced by trcCreateData(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
destroys the stack, mode defines if objects will be destroyed too
Definition at line 13 of file stack.c. References DBLIST_DM_KEEP, DBLIST_TM_FROM_HEAD, _Stack_::destroyFunction, _Stack_::elements, listDestroy(), listGetNext(), listPrepare(), and ST_DM_KEEP. Here is the call graph for this function: ![]() |
|
||||||||||||
|
get stack top, but does not remove it
Definition at line 42 of file stack.c. References _Stack_::elements, and listGetTail(). Here is the call graph for this function: ![]() |
|
|
returns the number of elements in the stack
Definition at line 46 of file stack.c. References _Stack_::elements, and _DbLkList::numElements. |
|
||||||||||||
|
fill object with the top of the stack, which is removed
Definition at line 38 of file stack.c. References _Stack_::elements, and listRemoveTail(). Referenced by instLeaveState(), and trcLeaveState(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
inserts an element to the stack
Definition at line 34 of file stack.c. References _Stack_::elements, and listInsertTail(). Referenced by instEnterState(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
register functions
Definition at line 50 of file stack.c. References _Stack_::destroyFunction. |
1.4.6