source:
doc/papers/general/evaluation/cpp-vstack.hpp
@
8b001bd
Last change on this file since 8b001bd was 8b001bd, checked in by , 5 years ago | |
---|---|
|
|
File size: 437 bytes |
Rev | Line | |
---|---|---|
[604e76d] | 1 | #pragma once |
2 | #include "object.hpp" | |
3 | ||
[81e8ab0] | 4 | struct stack { |
[604e76d] | 5 | struct node { |
6 | ptr<object> value; | |
[81e8ab0] | 7 | node * next; |
8 | node( const object & v, node * n = nullptr ); | |
[604e76d] | 9 | }; |
[81e8ab0] | 10 | node * head; |
11 | ||
[8b001bd] | 12 | void clear(); |
[81e8ab0] | 13 | void copy( const stack & o ); |
[604e76d] | 14 | |
15 | stack(); | |
[81e8ab0] | 16 | stack( const stack & o ); |
17 | stack( stack && o ); | |
[604e76d] | 18 | ~stack(); |
[81e8ab0] | 19 | stack& operator=( const stack& o ); |
20 | stack& operator=( stack && o ); | |
[604e76d] | 21 | |
22 | bool empty() const; | |
[81e8ab0] | 23 | void push( const object & value ); |
[604e76d] | 24 | ptr<object> pop(); |
25 | }; |
Note: See TracBrowser
for help on using the repository browser.