Lines Matching full:stack
20 * \brief Stack container interface.
27 /// A stack
28 typedef struct Stack Stack; typedef
30 /// Create stack
33 Size of stack element
34 \param[out] stack
35 Stack context to be created
37 \returns true is operation succeed, false if stack were failed to allocate
41 bool CreateStack(size_t element_size, Stack** stack);
43 /// Push multiple elements to the stack
45 \param[in,out] stack
46 Stack context
48 Number of elements to push to the stack
50 Array of elements to push to the stack. Can be NULL
52 \returns A pointer to an array of new elements in the stack or NULL if
53 stack is empty or push operation were failed.
57 void* StackPushN(Stack* stack, size_t n, void* elements);
59 /// Pop multiple elements from the stack
61 \param[in,out] stack
62 Stack context
64 Number of elements to pop from the stack
66 Pointer to a buffer to store elements removed from the stack
72 bool StackPopN(Stack* stack, size_t n, void* elements);
74 /// Get number of elements in the stack
76 \param[in] stack
77 Stack context
79 \returns Number of elements in the stack or 0 if stack is NULL
83 size_t StackGetSize(Stack const* stack);
85 /// Get number of elements in the stack
87 \param[in] stack
88 Stack context
90 \returns Pointer to the buffer, returns NULL if stack is NULL
94 void* StackGetBuf(Stack const* stack);
96 /// Deallocates memory used for the stack.
98 \param[in,out] stack
99 Stack context
103 void DeleteStack(Stack** stack);