Topic: HELP : Build grep facilities into istream


Author: danny@gftpd-mail.citicorp.com (Dhananjay Nene)
Date: 4 May 1994 21:09:01 GMT
Raw View
I have been wondering whether some sort of a grep facility could be
introuduced into a class derived from istream which could help in
meeting the requirements such as

Whenever cin (or another instance of istream ) is used :

Ignore all lines beginning with a '#' character
OR
Ignore all but those lines beginning with a 'DATA' string.

Can anybody help me out or provide some initial direction ?

Such a facility could be very helpful in using data files with
comments in them or very large files which contain only a small
area which contain the DATA.

Thanks

Danny

------------------------------------------------------------------------
    _/_/_/       _/      _/    _/  _/    _/ _/    _/
   _/   _/     _/_/     _/_/  _/  _/_/  _/  _/  _/
  _/    _/   _/  _/    _/ _/ _/  _/ _/ _/   _/_/
 _/   _/   _/_/_/_/   _/  _/_/  _/  _/_/    _/
_/_/_/   _/      _/  _/    _/  _/    _/    _/
------------------------------------------------------------------------
Dhananjay Nene -> danny@gftpd-mail.citicorp.com
------------------------------------------------------------------------