Changes in libcfa/src/iostream.hfa [9d362a0:58b6d1b]
- File:
-
- 1 edited
-
libcfa/src/iostream.hfa (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
r9d362a0 r58b6d1b 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 24 18:33:40201813 // Update Count : 22012 // Last Modified On : Sun Jul 1 12:12:22 2018 13 // Update Count : 155 14 14 // 15 15 … … 20 20 trait ostream( dtype ostype ) { 21 21 // private 22 bool sepPrt( ostype & ); // getseparator state (on/off)22 _Bool sepPrt( ostype & ); // return separator state (on/off) 23 23 void sepReset( ostype & ); // set separator state to default state 24 void sepReset( ostype &, bool ); // set separator and default state24 void sepReset( ostype &, _Bool ); // set separator and default state 25 25 const char * sepGetCur( ostype & ); // get current separator string 26 26 void sepSetCur( ostype &, const char * ); // set current separator string 27 bool getNL( ostype & ); // check newline 28 void setNL( ostype &, bool ); // saw newline 29 bool getANL( ostype & ); // get auto newline (on/off) 30 bool getPrt( ostype & ); // get fmt called in output cascade 31 void setPrt( ostype &, bool ); // set fmt called in output cascade 27 _Bool getNL( ostype & ); // check newline 28 void setNL( ostype &, _Bool ); // saw newline 32 29 // public 33 30 void sepOn( ostype & ); // turn separator state on 34 31 void sepOff( ostype & ); // turn separator state off 35 bool sepDisable( ostype & ); // set default state to off, and return previous state 36 bool sepEnable( ostype & ); // set default state to on, and return previous state 37 void nlOn( ostype & ); // turn auto-newline state on 38 void nlOff( ostype & ); // turn auto-newline state off 32 _Bool sepDisable( ostype & ); // set default state to off, and return previous state 33 _Bool sepEnable( ostype & ); // set default state to on, and return previous state 39 34 40 35 const char * sepGet( ostype & ); // get separator string … … 48 43 void close( ostype & os ); 49 44 ostype & write( ostype &, const char *, size_t ); 50 int fmt( ostype &, const char f ormat[], ... );45 int fmt( ostype &, const char fmt[], ... ); 51 46 }; // ostream 52 47 … … 62 57 63 58 forall( dtype ostype | ostream( ostype ) ) { 64 ostype & ?|?( ostype &, bool ); 65 void ?|?( ostype &, bool ); 59 ostype & ?|?( ostype &, _Bool ); 66 60 67 61 ostype & ?|?( ostype &, char ); 68 void ?|?( ostype &, char );69 62 ostype & ?|?( ostype &, signed char ); 70 void ?|?( ostype &, signed char );71 63 ostype & ?|?( ostype &, unsigned char ); 72 void ?|?( ostype &, unsigned char );73 64 74 65 ostype & ?|?( ostype &, short int ); 75 void ?|?( ostype &, short int );76 66 ostype & ?|?( ostype &, unsigned short int ); 77 void ?|?( ostype &, unsigned short int );78 67 ostype & ?|?( ostype &, int ); 79 void ?|?( ostype &, int );80 68 ostype & ?|?( ostype &, unsigned int ); 81 void ?|?( ostype &, unsigned int );82 69 ostype & ?|?( ostype &, long int ); 83 void ?|?( ostype &, long int );84 70 ostype & ?|?( ostype &, long long int ); 85 void ?|?( ostype &, long long int );86 71 ostype & ?|?( ostype &, unsigned long int ); 87 void ?|?( ostype &, unsigned long int );88 72 ostype & ?|?( ostype &, unsigned long long int ); 89 void ?|?( ostype &, unsigned long long int );90 73 91 74 ostype & ?|?( ostype &, float ); // FIX ME: should not be required 92 void ?|?( ostype &, float ); // FIX ME: should not be required93 75 ostype & ?|?( ostype &, double ); 94 void ?|?( ostype &, double );95 76 ostype & ?|?( ostype &, long double ); 96 void ?|?( ostype &, long double );97 77 98 78 ostype & ?|?( ostype &, float _Complex ); 99 void ?|?( ostype &, float _Complex );100 79 ostype & ?|?( ostype &, double _Complex ); 101 void ?|?( ostype &, double _Complex );102 80 ostype & ?|?( ostype &, long double _Complex ); 103 void ?|?( ostype &, long double _Complex );104 81 105 82 ostype & ?|?( ostype &, const char * ); 106 void ?|?( ostype &, const char * );107 83 // ostype & ?|?( ostype &, const char16_t * ); 108 84 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous … … 111 87 // ostype & ?|?( ostype &, const wchar_t * ); 112 88 ostype & ?|?( ostype &, const void * ); 113 void ?|?( ostype &, const void * );114 89 115 90 // manipulators 116 91 ostype & ?|?( ostype &, ostype & (*)( ostype & ) ); 117 void ?|?( ostype &, ostype & (*)( ostype & ) ); 118 ostype & nl( ostype & ); 119 void nl( ostype & ); 120 ostype & nonl( ostype & ); 92 ostype & endl( ostype & ); 121 93 ostype & sep( ostype & ); 122 94 ostype & sepTuple( ostype & ); … … 125 97 ostype & sepDisable( ostype & ); 126 98 ostype & sepEnable( ostype & ); 127 ostype & nlOn( ostype & );128 ostype & nlOff( ostype & );129 99 } // distribution 130 100 131 101 // tuples 132 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) { 133 ostype & ?|?( ostype & os, T arg, Params rest ); 134 void ?|?( ostype & os, T arg, Params rest ); 135 } // distribution 102 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) 103 ostype & ?|?( ostype & os, T arg, Params rest ); 136 104 137 105 // writes the range [begin, end) to the given stream 138 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) { 139 void write( iterator_type begin, iterator_type end, ostype & os ); 140 void write_reverse( iterator_type begin, iterator_type end, ostype & os ); 141 } // distribution 106 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 107 void write( iterator_type begin, iterator_type end, ostype & os ); 108 109 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) 110 void write_reverse( iterator_type begin, iterator_type end, ostype & os ); 142 111 143 112 //--------------------------------------- … … 150 119 istype & read( istype &, char *, size_t ); 151 120 istype & ungetc( istype &, char ); 152 int fmt( istype &, const char f ormat[], ... );121 int fmt( istype &, const char fmt[], ... ); 153 122 }; // istream 154 123 … … 158 127 159 128 forall( dtype istype | istream( istype ) ) { 160 istype & ?|?( istype &, bool & );129 istype & ?|?( istype &, _Bool & ); 161 130 162 131 istype & ?|?( istype &, char & ); … … 183 152 // manipulators 184 153 istype & ?|?( istype &, istype & (*)( istype & ) ); 185 istype & nl( istype & is );154 istype & endl( istype & is ); 186 155 } // distribution 187 156 … … 195 164 196 165 197 #include <time_t.hfa> // Duration (constructors) / Time (constructors)166 #include <time_t.hfa> // Duration (constructors) / Time (constructors) 198 167 199 forall( dtype ostype | ostream( ostype ) ) { 200 ostype & ?|?( ostype & os, Duration dur ); 201 void ?|?( ostype & os, Duration dur ); 202 ostype & ?|?( ostype & os, Time time ); 203 void ?|?( ostype & os, Time time ); 204 } // distribution 168 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Duration dur ); 169 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype & os, Time time ); 170 205 171 206 172 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.