ADT
        ast-experimental
        pthread-emulation
      
      
        
          | Last change
 on this file since c702d21 was             4c80a75, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago | 
        
          | 
update evaluation programs
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            382 bytes | 
      
      
| Line |  | 
|---|
| 1 | #pragma once | 
|---|
| 2 | #include "object.hpp" | 
|---|
| 3 |  | 
|---|
| 4 | struct stack { | 
|---|
| 5 | struct node { | 
|---|
| 6 | ptr<object> value; | 
|---|
| 7 | node * next; | 
|---|
| 8 | node( const object & v, node * n = nullptr ); | 
|---|
| 9 | }; | 
|---|
| 10 | node * head; | 
|---|
| 11 |  | 
|---|
| 12 | void copy( const stack & o ); | 
|---|
| 13 | void clear(); | 
|---|
| 14 |  | 
|---|
| 15 | stack(); | 
|---|
| 16 | stack( const stack & o ); | 
|---|
| 17 | ~stack(); | 
|---|
| 18 | stack & operator=( const stack& o ); | 
|---|
| 19 | bool empty() const; | 
|---|
| 20 | void push( const object & value ); | 
|---|
| 21 | ptr<object> pop(); | 
|---|
| 22 | }; | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.