#ifndef STACK_HPP
#define STACK_HPP 1 // // data structures // struct Stack_Element { double value; Stack_Element *last; }; struct Stack { Stack_Element *top; }; // // public constructors and destructor // void Stack_construct_default(Stack * const this_); void Stack_construct_copy(Stack * const this_, const Stack * const stack); void Stack_construct_swap(Stack * const this_, Stack * const stack); void Stack_destruct(Stack * const this_); // // public methods // bool Stack_isEmpty(const Stack * const this_); Stack * const Stack_assign(Stack * const this_, Stack * const stack); void Stack_push(Stack * const this_, double value); double Stack_pop(Stack * const this_); void Stack_print(Stack * const this_, const char *txt); // // private methods // void Stack_copy_elements_(Stack * const this_, const Stack_Element *element); void Stack_print_elements_(const Stack * const this_, const Stack_Element *element); #endif // STACK_HPP |