Changeset 85d8153 for libcfa/src/iostream.hfa
- Timestamp:
- Apr 24, 2021, 11:27:45 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b431515
- Parents:
- e638266
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
re638266 r85d8153 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 20 19:09:44202113 // Update Count : 3 8512 // Last Modified On : Sat Apr 24 09:28:56 2021 13 // Update Count : 393 14 14 // 15 15 … … 22 22 23 23 24 trait ostream( ostype & ) {24 trait basic_ostream( ostype & ) { 25 25 // private 26 26 bool sepPrt$( ostype & ); // get separator state (on/off) … … 47 47 void sepSetTuple( ostype &, const char [] ); // set tuple separator to string (15 character maximum) 48 48 49 void ends( ostype & os );// end of output statement50 int f ail( ostype &);49 void ends( ostype & ); // end of output statement 50 int fmt( ostype &, const char format[], ... ) __attribute__(( format(printf, 2, 3) )); 51 51 int flush( ostype & ); 52 void open( ostype & os, const char name[], const char mode[] ); 53 void close( ostype & os ); 52 }; // basic_ostream 53 54 trait ostream( ostype & | basic_ostream( ostype ) ) { 55 bool fail( ostype & ); // operation failed? 56 void open( ostype &, const char name[], const char mode[] ); 57 void close( ostype & ); 54 58 ostype & write( ostype &, const char [], size_t ); 55 int fmt( ostype &, const char format[], ... ) __attribute__(( format(printf, 2, 3) )); 56 void acquire( ostype & ); 59 void acquire( ostype & ); // concurrent access 57 60 }; // ostream 58 61 … … 67 70 // implement writable for intrinsic types 68 71 69 forall( ostype & | ostream( ostype ) ) {72 forall( ostype & | basic_ostream( ostype ) ) { 70 73 ostype & ?|?( ostype &, bool ); 71 74 void ?|?( ostype &, bool ); … … 138 141 ostype & nlOn( ostype & ); 139 142 ostype & nlOff( ostype & ); 143 } // distribution 144 145 forall( ostype & | ostream( ostype ) ) { 140 146 ostype & acquire( ostype & ); 141 147 } // distribution … … 196 202 _Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \ 197 203 } /* distribution */ \ 198 forall( ostype & | ostream( ostype ) ) { \204 forall( ostype & | basic_ostream( ostype ) ) { \ 199 205 ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \ 200 206 void ?|?( ostype & os, _Ostream_Manip(T) f ); \ … … 241 247 _Ostream_Manip(T) & unit( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \ 242 248 } /* distribution */ \ 243 forall( ostype & | ostream( ostype ) ) { \249 forall( ostype & | basic_ostream( ostype ) ) { \ 244 250 ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \ 245 251 void ?|?( ostype & os, _Ostream_Manip(T) f ); \ … … 261 267 _Ostream_Manip(char) & nobase( _Ostream_Manip(char) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 262 268 } // distribution 263 forall( ostype & | ostream( ostype ) ) {269 forall( ostype & | basic_ostream( ostype ) ) { 264 270 ostype & ?|?( ostype & os, _Ostream_Manip(char) f ); 265 271 void ?|?( ostype & os, _Ostream_Manip(char) f ); … … 279 285 _Ostream_Manip(const char *) & nobase( _Ostream_Manip(const char *) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 280 286 } // distribution 281 forall( ostype & | ostream( ostype ) ) {287 forall( ostype & | basic_ostream( ostype ) ) { 282 288 ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f ); 283 289 void ?|?( ostype & os, _Ostream_Manip(const char *) f ); … … 294 300 295 301 void ends( istype & os ); // end of output statement 296 intfail( istype & );302 bool fail( istype & ); 297 303 int eof( istype & ); 298 304 void open( istype & is, const char name[] );
Note: See TracChangeset
for help on using the changeset viewer.