ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
      
      
        
          | Last change
 on this file since f23b685 was             f4e3419d, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago | 
        
          | 
restructure paper documents
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            425 bytes | 
      
      
| Line |  | 
|---|
| 1 | #pragma once | 
|---|
| 2 | #include "object.hpp" | 
|---|
| 3 |  | 
|---|
| 4 | class stack { | 
|---|
| 5 | struct node { | 
|---|
| 6 | ptr<object> value; | 
|---|
| 7 | node* next; | 
|---|
| 8 |  | 
|---|
| 9 | node( const object& v, node* n = nullptr ); | 
|---|
| 10 | }; | 
|---|
| 11 | node* head; | 
|---|
| 12 |  | 
|---|
| 13 | void copy(const stack& o); | 
|---|
| 14 | public: | 
|---|
| 15 | stack(); | 
|---|
| 16 | stack(const stack& o); | 
|---|
| 17 | stack(stack&& o); | 
|---|
| 18 | ~stack(); | 
|---|
| 19 | stack& operator= (const stack& o); | 
|---|
| 20 | stack& operator= (stack&& o); | 
|---|
| 21 |  | 
|---|
| 22 | void clear(); | 
|---|
| 23 | bool empty() const; | 
|---|
| 24 | void push(const object& value); | 
|---|
| 25 | ptr<object> pop(); | 
|---|
| 26 | }; | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.