annotate paper/src/singleLinkedStackInterface.cbc @ 19:046b2b20d6c7 default tip

fix
author ryokka
date Mon, 09 Mar 2020 11:25:49 +0900
parents c7acb9211784
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
1 Stack* createSingleLinkedStack(struct Context* context) {
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
2 struct Stack* stack = new Stack();
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
3 struct SingleLinkedStack* singleLinkedStack = new SingleLinkedStack();
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
4 stack->stack = (union Data*)singleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
5 singleLinkedStack->top = NULL;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
6 stack->push = C_pushSingleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
7 stack->pop = C_popSingleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
8 stack->get = C_getSingleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
9 stack->isEmpty = C_isEmptySingleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
10 stack->clear = C_clearSingleLinkedStack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
11 return stack;
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
12 }