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