ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since ff178ee was
b276be5,
checked in by Aaron Moss <a3moss@…>, 7 years ago
|
Further updates to benchmarks (new C++ virtual benchmark still slightly broken)
|
-
Property mode set to
100644
|
File size:
503 bytes
|
Rev | Line | |
---|
[b276be5] | 1 | #pragma once |
---|
| 2 | |
---|
| 3 | #include "object.hpp" |
---|
| 4 | |
---|
| 5 | class stack { |
---|
| 6 | struct node { |
---|
| 7 | std::unique_ptr<object> value; |
---|
| 8 | node* next; |
---|
| 9 | |
---|
| 10 | node( const object& v ); |
---|
| 11 | |
---|
| 12 | node( std::unique_ptr<object>&& v, node* n ); |
---|
| 13 | }; |
---|
| 14 | |
---|
| 15 | node* head; |
---|
| 16 | |
---|
| 17 | void copy(const stack& o); |
---|
| 18 | |
---|
| 19 | public: |
---|
| 20 | void clear(); |
---|
| 21 | |
---|
| 22 | stack(); |
---|
| 23 | |
---|
| 24 | stack(const stack& o); |
---|
| 25 | |
---|
| 26 | stack(stack&& o); |
---|
| 27 | |
---|
| 28 | ~stack(); |
---|
| 29 | |
---|
| 30 | stack& operator= (const stack& o); |
---|
| 31 | |
---|
| 32 | stack& operator= (stack&& o); |
---|
| 33 | |
---|
| 34 | bool empty() const; |
---|
| 35 | |
---|
| 36 | void push(std::unique_ptr<object>&& value); |
---|
| 37 | |
---|
| 38 | std::unique_ptr<object> pop(); |
---|
| 39 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.