Changeset 4040425 for src/libcfa/iostream
- Timestamp:
- Mar 2, 2016, 6:15:02 PM (10 years ago)
- 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:
- 36ebd03, b63e376
- Parents:
- 8f610e85
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/iostream
r8f610e85 r4040425 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 1 6:44:32201613 // Update Count : 8 112 // Last Modified On : Wed Mar 2 18:05:27 2016 13 // Update Count : 85 14 14 // 15 15 … … 19 19 #include "iterator" 20 20 21 context ostream( dtype ostype ) {21 trait ostream( dtype ostype ) { 22 22 _Bool sepPrt( ostype * ); 23 23 void sepOn( ostype * ); … … 35 35 }; 36 36 37 context writeable(type T ) {37 trait writeable( otype T ) { 38 38 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T ); 39 39 }; … … 69 69 70 70 // writes the range [begin, end) to the given stream 71 forall( type elt_type | writeable( elt_type ),type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )71 forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) ) 72 72 void write( iterator_type begin, iterator_type end, os_type *os ); 73 73 74 forall( type elt_type | writeable( elt_type ),type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )74 forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) ) 75 75 void write_reverse( iterator_type begin, iterator_type end, os_type *os ); 76 76 77 77 //--------------------------------------- 78 78 79 context istream( dtype istype ) {79 trait istream( dtype istype ) { 80 80 int fail( istype * ); 81 81 int eof( istype * ); … … 87 87 }; 88 88 89 context readable(type T ) {89 trait readable( otype T ) { 90 90 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, T ); 91 91 };
Note:
See TracChangeset
for help on using the changeset viewer.