Ignore:
Timestamp:
Feb 17, 2016, 2:22:22 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
658f6de0
Parents:
52f85e0
Message:

major rewrite of I/O library and update example programs to use new I/O

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/iostream

    r52f85e0 r6ba0659  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jan 29 15:50:36 2016
    13 // Update Count     : 29
     12// Last Modified On : Wed Feb 17 14:04:24 2016
     13// Update Count     : 32
    1414//
    1515
     
    2222
    2323context ostream( dtype ostype ) {
    24         ostype *write( ostype *, const char *, streamsize_type );
    2524        int fail( ostype * );
     25        int flush( ostype * );
     26        ostype * write( ostype *, const char *, streamsize_type );
    2627};
    27 
    2828context writeable( type T ) {
    2929        forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
     
    5252
    5353// writes the range [begin, end) to the given stream
    54 forall( type elt_type | writeable( elt_type ),
    55                 type iterator_type | iterator( iterator_type, elt_type ),
    56                 dtype os_type | ostream( os_type ) )
     54forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
    5755void write( iterator_type begin, iterator_type end, os_type *os );
    5856
    59 forall( type elt_type | writeable( elt_type ),
    60                 type iterator_type | iterator( iterator_type, elt_type ),
    61                 dtype os_type | ostream( os_type ) )
     57forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
    6258void write_reverse( iterator_type begin, iterator_type end, os_type *os );
    6359
    64 //******************************************************************************
     60//---------------------------------------
    6561
    6662context istream( dtype istype ) {
    67         istype *read( istype *, char *, streamsize_type );
    68         istype *unread( istype *, char );
    6963        int fail( istype * );
    7064        int eof( istype * );
     65        istype * get( istype *, int * );
     66        istype * read( istype *, char *, streamsize_type );
     67        istype * ungetc( istype *, char );
    7168};
    7269
Note: See TracChangeset for help on using the changeset viewer.