Loading...
Searching...
No Matches
stack.h
Go to the documentation of this file.
#ifndef ARC_STD_STACK_H_
#define ARC_STD_STACK_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/**
* @brief a stack type
*/
typedef struct ARC_Stack ARC_Stack;
/**
* @brief creates ARC_Stack type
*
* @param stack ARC_Stack to initialize
*/
void ARC_Stack_Create(ARC_Stack **stack);
/**
* @brief destroyes ARC_Stack type
*/
void ARC_Stack_Destroy(ARC_Stack *stack);
/**
* @brief pushes value on stack
*
* @param stack ARC_Stack to push to
* @param data data that is being pushed
*/
void ARC_Stack_Push(ARC_Stack *stack, void *data);
/**
* @brief pops top off of ARC_Stack
*
* @param stack ARC_Stack to remove from
*
* @return the poped data from the stack as a void *
*/
void *ARC_Stack_Pop(ARC_Stack *stack);
/**
* @brief gets size of stack
*
* @param stack ARC_Stack to get size from
*
* @return the stacks size
*/
uint32_t ARC_Stack_Size(ARC_Stack *stack);
#ifdef __cplusplus
}
#endif
#endif //ARC_STD_STACK_H_
ARC_Stack_Size
uint32_t ARC_Stack_Size(ARC_Stack *stack)
gets size of stack
ARC_Stack_Create
void ARC_Stack_Create(ARC_Stack **stack)
creates ARC_Stack type
ARC_Stack_Push
void ARC_Stack_Push(ARC_Stack *stack, void *data)
pushes value on stack
ARC_Stack
struct ARC_Stack ARC_Stack
a stack type
Definition stack.h:13
ARC_Stack_Pop
void * ARC_Stack_Pop(ARC_Stack *stack)
pops top off of ARC_Stack
ARC_Stack_Destroy
void ARC_Stack_Destroy(ARC_Stack *stack)
destroyes ARC_Stack type