|
C_Algorithms 2.0.0
Documentation
|

Go to the source code of this file.
Functions | |
| mystack_t * | CreateStack (uint32_t capacity) |
| Create a Stack object. | |
| mystack_t * | FreeStack (mystack_t *stack) |
| Free the memory of a given Stack object. | |
| bool | StackIsEmpty (mystack_t *stack) |
| Check if the Stack object is empty. | |
| bool | StackIsFull (mystack_t *stack) |
| Check if the Stack object is full. | |
| void | PushStack (mystack_t *stack, stack_value_t value) |
| Push a new object to the stack. | |
| stack_value_t | PopStack (mystack_t *stack) |
| Pop the object on top of the stack. | |
| stack_value_t | TopStack (mystack_t *stack) |
| Return the top object of the stack. | |
| void | PrintStack (mystack_t *stack) |
| Print the whole stack. | |
| void | Stack () |
| mystack_t * CreateStack | ( | uint32_t | capacity | ) |
Create a Stack object.
| capacity |
Definition at line 14 of file stack.c.
References stack::capacity, stack::data, and stack::size.
Referenced by Stack().

Free the memory of a given Stack object.
| stack |
Definition at line 43 of file stack.c.
References stack::data.
Referenced by Stack().

| stack_value_t PopStack | ( | mystack_t * | stack | ) |
Pop the object on top of the stack.
| stack |
Definition at line 102 of file stack.c.
References stack::data, stack::size, STACK_NO_VALUE, and StackIsEmpty().

| void PrintStack | ( | mystack_t * | stack | ) |
Print the whole stack.
| stack |
Definition at line 129 of file stack.c.
References stack::capacity, stack::data, and stack::size.
Referenced by Stack().

| void PushStack | ( | mystack_t * | stack, |
| stack_value_t | value ) |
Push a new object to the stack.
| stack |
Definition at line 85 of file stack.c.
References stack::data, stack::size, and StackIsFull().
Referenced by Stack().


| void Stack | ( | ) |
Definition at line 148 of file stack.c.
References CreateStack(), FreeStack(), PrintStack(), and PushStack().
Referenced by FunctionCall().


| bool StackIsEmpty | ( | mystack_t * | stack | ) |
Check if the Stack object is empty.
| stack |
Definition at line 63 of file stack.c.
References stack::size.
Referenced by PopStack(), and TopStack().

| bool StackIsFull | ( | mystack_t * | stack | ) |
Check if the Stack object is full.
| stack |
Definition at line 75 of file stack.c.
References stack::capacity, and stack::size.
Referenced by PushStack().

| stack_value_t TopStack | ( | mystack_t * | stack | ) |
Return the top object of the stack.
| stack |
Definition at line 117 of file stack.c.
References stack::data, stack::size, STACK_NO_VALUE, and StackIsEmpty().
