#include <dbLkList.h>Include dependency graph for stack.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | _Stack_ |
| this is the stack structure, its just a double linked list we insert tail and remove tail. More... | |
Typedefs | |
| typedef Stack * | StackP |
| function pointers | |
| typedef void() | StDestroyFunction (StackP st, void *object) |
| typedef _Stack_ | Stack |
| this is the stack structure, its just a double linked list we insert tail and remove tail. | |
Enumerations | |
| enum | StDestroyMode { ST_DM_KEEP = 0, ST_DM_FREE } |
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 | |
|
|
this is the stack structure, its just a double linked list we insert tail and remove tail.
|
|
|
function pointers
|
|
|
|
|
|
|
|
|
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