ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        ctor
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        gc_noraii
        jacob/cs343-translation
        jenkins-sandbox
        memory
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        string
        with_gc
      
      
        
          | 
            Last change
 on this file since fe3b61b was             134b86a, checked in by Peter A. Buhr <pabuhr@…>, 11 years ago           | 
        
        
          | 
             
add compiler flag to driver, update examples, fix unnamed bit fields 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.1 KB
           | 
        
      
      
| Rev | Line |   | 
|---|
| [51b73452] | 1 | #ifndef IOSTREAM_H
 | 
|---|
 | 2 | #define IOSTREAM_H
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | typedef unsigned long streamsize_type;
 | 
|---|
 | 5 | 
 | 
|---|
| [134b86a] | 6 | context ostream( dtype ostype ) {
 | 
|---|
 | 7 |     ostype *write( ostype *, const char *, streamsize_type );
 | 
|---|
 | 8 |     int fail( ostype * );
 | 
|---|
| [51b73452] | 9 | };
 | 
|---|
 | 10 | 
 | 
|---|
| [134b86a] | 11 | context writeable( type T ) {
 | 
|---|
 | 12 |     forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, T );
 | 
|---|
| [51b73452] | 13 | };
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 | // implement writable for some intrinsic types
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, char );
 | 
|---|
 | 18 | forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, int );
 | 
|---|
| [134b86a] | 19 | forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, double );
 | 
|---|
| [51b73452] | 20 | forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, const char * );
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | 
 | 
|---|
| [134b86a] | 23 | context istream( dtype istype ) {
 | 
|---|
 | 24 |     istype *read( istype *, char *, streamsize_type );
 | 
|---|
 | 25 |     istype *unread( istype *, char );
 | 
|---|
 | 26 |     int fail( istype * );
 | 
|---|
 | 27 |     int eof( istype * );
 | 
|---|
| [51b73452] | 28 | };
 | 
|---|
 | 29 | 
 | 
|---|
| [134b86a] | 30 | context readable( type T ) {
 | 
|---|
 | 31 |     forall( dtype istype | istream( istype ) ) istype * ?<<?( istype *, T );
 | 
|---|
| [51b73452] | 32 | };
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 | forall( dtype istype | istream( istype ) )
 | 
|---|
| [134b86a] | 35 | istype * ?>>?( istype *, char * );
 | 
|---|
| [51b73452] | 36 | 
 | 
|---|
 | 37 | forall( dtype istype | istream( istype ) )
 | 
|---|
| [134b86a] | 38 | istype * ?>>?( istype *, int * );
 | 
|---|
| [51b73452] | 39 | 
 | 
|---|
| [134b86a] | 40 | #endif // IOSTREAM_H
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.