Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
stack.h
Go to the documentation of this file.
1#ifndef ARC_STD_STACK_H_
2#define ARC_STD_STACK_H_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9
10/**
11 * @brief a stack type
12 */
13typedef struct ARC_Stack ARC_Stack;
14
15/**
16 * @brief creates ARC_Stack type
17 *
18 * @param stack ARC_Stack to initialize
19 */
21
22/**
23 * @brief destroyes ARC_Stack type
24 */
26
27/**
28 * @brief pushes value on stack
29 *
30 * @param stack ARC_Stack to push to
31 * @param data data that is being pushed
32 */
33void ARC_Stack_Push(ARC_Stack *stack, void *data);
34
35/**
36 * @brief pops top off of ARC_Stack
37 *
38 * @param stack ARC_Stack to remove from
39 *
40 * @return the poped data from the stack as a void *
41 */
43
44/**
45 * @brief gets size of stack
46 *
47 * @param stack ARC_Stack to get size from
48 *
49 * @return the stacks size
50 */
51uint32_t ARC_Stack_Size(ARC_Stack *stack);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif //ARC_STD_STACK_H_
uint32_t ARC_Stack_Size(ARC_Stack *stack)
gets size of stack
void ARC_Stack_Create(ARC_Stack **stack)
creates ARC_Stack type
void ARC_Stack_Push(ARC_Stack *stack, void *data)
pushes value on stack
struct ARC_Stack ARC_Stack
a stack type
Definition stack.h:13
void * ARC_Stack_Pop(ARC_Stack *stack)
pops top off of ARC_Stack
void ARC_Stack_Destroy(ARC_Stack *stack)
destroyes ARC_Stack type