PA05 STUB Function creation

++ ArrayDataEngine.c
++ IteratorUtility.c
++ QueueUtility.c
++ StackUtility.c
+- Makefile for PA05
This commit is contained in:
Charles Descamps 2023-09-29 16:27:00 -07:00
parent 108632e832
commit e0aadd2db6
5 changed files with 641 additions and 16 deletions

95
PA05-1004/StackUtility.c Normal file
View file

@ -0,0 +1,95 @@
// header files
#include "StackUtility.h"
/* Data Structures
typedef struct StateArrayStruct
{
StateDataType *array;
int size, capacity;
} StackType; (aka StateArrayType)
Data Structures*/
// function implementations
/*
Name: clearStack
Process: clears StackType, returns NULL
Function input/parameters: pointer to stack type (StackType *)
Function output/parameters: none
Function output/returned: NULL
Device input/---: none
Device output/---: none
Dependencies: clearDataStructure
*/
StackType *clearStack( StackType *stackData )
{
// return NULL
return NULL;
}
/*
Name: createStack
Process: creates StackType, returns pointer to it
Function input/parameters: initial capacity (int)
Function output/parameters: none
Function output/returned: pointer to stack type (StackType *)
Device input/---: none
Device output/---: none
Dependencies: createDataStructure
*/
StackType *createStack( int initialCapacity )
{
// return StackType
return NULL;
}
/*
Name: peekTop
Process: captures value at top of stack, returns,
returns true if successful,
otherwise, sets return value to empty, returns false
Function input/parameters: pointer to stack type (StackType *)
Function output/parameters: pointer to return value (StateDataType *)
Function output/returned: Boolean result of operation (bool)
Device input/---: none
Device output/---: none
Dependencies: getItemAtIndex, getListSize
*/
bool peekTop( StateDataType *returnVal, const StackType stackData )
{
// return false (TEMP)
}
/*
Name: popStack
Process: captures value at top of stack, removes and returns,
returns true if successful,
otherwise, sets return value to empty, returns false
Function input/parameters: pointer to stack type (StackType *)
Function output/parameters: pointer to return value (StateDataType *)
Function output/returned: Boolean result of operation
Device input/---: none
Device output/---: none
Dependencies: removeItemAtIndex, getListSize
*/
bool popStack( StateDataType *returnVal, StackType *stackData )
{
// return false (TEMP)
}
/*
Name: pushStack
Process: sets value at top of stack,
returns true if successful, false otherwise
Function input/parameters: pointer to stack type (StackType *)
Function output/parameters: value to be pushed (const StateDataType)
Function output/returned: Boolean result of operation
Device input/---: none
Device output/---: none
Dependencies: insertItemAtIndex, getListSize
*/
bool pushStack( StackType *stackData, const StateDataType toBePushed )
{
// return false (TEMP)
}