Changes in libcfa/src/iostream.hfa [f842032:0d49efb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iostream.hfa
rf842032 r0d49efb 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Oct 18 21:21:20202313 // Update Count : 5 8312 // Last Modified On : Sun Oct 8 12:02:55 2023 13 // Update Count : 568 14 14 // 15 15 … … 306 306 // *********************************** istream *********************************** 307 307 308 #define ISTYPE_VOID( T ) void ?|?( istype &, T ) 309 #define ISTYPE_VOID_IMPL( T ) \ 310 void ?|?( istype & is, T t ) { \ 311 (istype &)(is | t); ends( is ); \ 312 } // ?|? 313 308 314 forall( istype & ) 309 315 trait basic_istream { … … 314 320 void nlOn( istype & ); // read newline 315 321 void nlOff( istype & ); // scan newline 322 void ends( istype & os ); // end of output statement 316 323 int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) )); 317 324 istype & ungetc( istype &, char ); 318 325 bool eof( istype & ); 319 void clear( istype & );320 326 }; // basic_istream 321 327 … … 323 329 trait istream { 324 330 bool fail( istype & ); 325 void open( istype & is, const char name[], const char mode[]);331 void clear( istype & ); 326 332 void open( istype & is, const char name[] ); 327 333 void close( istype & is ); … … 336 342 forall( istype & | basic_istream( istype ) ) { 337 343 istype & ?|?( istype &, bool & ); 344 ISTYPE_VOID( bool & ); 338 345 339 346 istype & ?|?( istype &, char & ); 347 ISTYPE_VOID( char & ); 340 348 istype & ?|?( istype &, signed char & ); 349 ISTYPE_VOID( signed char & ); 341 350 istype & ?|?( istype &, unsigned char & ); 351 ISTYPE_VOID( unsigned char & ); 342 352 343 353 istype & ?|?( istype &, short int & ); 354 ISTYPE_VOID( short int & ); 344 355 istype & ?|?( istype &, unsigned short int & ); 356 ISTYPE_VOID( unsigned short int & ); 345 357 istype & ?|?( istype &, int & ); 358 ISTYPE_VOID( int & ); 346 359 istype & ?|?( istype &, unsigned int & ); 360 ISTYPE_VOID( unsigned int & ); 347 361 istype & ?|?( istype &, long int & ); 362 ISTYPE_VOID( long int & ); 348 363 istype & ?|?( istype &, unsigned long int & ); 364 ISTYPE_VOID( unsigned long int & ); 349 365 istype & ?|?( istype &, long long int & ); 366 ISTYPE_VOID( long long int & ); 350 367 istype & ?|?( istype &, unsigned long long int & ); 368 ISTYPE_VOID( unsigned long long int & ); 351 369 #if defined( __SIZEOF_INT128__ ) 352 370 istype & ?|?( istype &, int128 & ); 371 ISTYPE_VOID( int128 & ); 353 372 istype & ?|?( istype &, unsigned int128 & ); 373 ISTYPE_VOID( unsigned int128 & ); 354 374 #endif // __SIZEOF_INT128__ 355 375 356 376 istype & ?|?( istype &, float & ); 377 ISTYPE_VOID( float & ); 357 378 istype & ?|?( istype &, double & ); 379 ISTYPE_VOID( double & ); 358 380 istype & ?|?( istype &, long double & ); 381 ISTYPE_VOID( long double & ); 359 382 360 383 istype & ?|?( istype &, float _Complex & ); 384 ISTYPE_VOID( float _Complex & ); 361 385 istype & ?|?( istype &, double _Complex & ); 386 ISTYPE_VOID( double _Complex & ); 362 387 istype & ?|?( istype &, long double _Complex & ); 388 ISTYPE_VOID( long double _Complex & ); 363 389 364 390 istype & ?|?( istype &, const char [] ); 391 ISTYPE_VOID( const char [] ); 365 392 366 393 // manipulators 367 394 istype & ?|?( istype &, istype & (*)( istype & ) ); 395 ISTYPE_VOID( istype & (*)( istype & ) ); 368 396 istype & nl( istype & is ); 369 397 istype & nlOn( istype & ); … … 374 402 375 403 ExceptionDecl( cstring_length ); 376 ExceptionDecl( missing_data );377 404 378 405 // *********************************** manipulators *********************************** 379 406 380 // skip does not compose with other C string manipulators.381 407 struct _Istream_Cskip { 382 408 const char * scanset; … … 390 416 forall( istype & | basic_istream( istype ) ) { 391 417 istype & ?|?( istype & is, _Istream_Cskip f ); 418 ISTYPE_VOID( _Istream_Cskip ); 392 419 } 393 420 … … 431 458 forall( istype & | basic_istream( istype ) ) { 432 459 istype & ?|?( istype & is, _Istream_Cstr f ); 460 ISTYPE_VOID( _Istream_Cstr ); 433 461 } 434 462 … … 443 471 forall( istype & | basic_istream( istype ) ) { 444 472 istype & ?|?( istype & is, _Istream_Char f ); 473 ISTYPE_VOID( _Istream_Char ); 445 474 } 446 475 … … 461 490 forall( istype & | basic_istream( istype ) ) { \ 462 491 istype & ?|?( istype & is, _Istream_Manip(T) f ); \ 492 ISTYPE_VOID( _Istream_Manip(T) ); \ 463 493 } // ?|? 464 494
Note: See TracChangeset
for help on using the changeset viewer.