Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

nocommentstream::NoCommentFilter Class Reference

Implements Filter interface for FilterStreambuf. More...

List of all members.

Public Methods

 NoCommentFilter (istream &is)
 ~NoCommentFilter ()
int put (int c)
int get ()
int sync ()
void close ()

Private Attributes

istreamis_
 Underlying istream from where the filter takes its input. More...


Detailed Description

Implements Filter interface for FilterStreambuf.

Definition at line 21 of file nocomment.h.


Constructor & Destructor Documentation

nocommentstream::NoCommentFilter::NoCommentFilter istream & is [inline]
 

Definition at line 23 of file nocomment.h.

00023 : is_(is) {}

nocommentstream::NoCommentFilter::~NoCommentFilter [inline]
 

Definition at line 24 of file nocomment.h.

00024 {}


Member Function Documentation

int nocommentstream::NoCommentFilter::put int c [inline]
 

Definition at line 25 of file nocomment.h.

00025 { return EOF; }

int nocommentstream::NoCommentFilter::get
 

Definition at line 9 of file nocomment.C.

00009                                     { 
00010 if (is_) {
00011   int c = is_.get();
00012   if (c=='#') {
00013     while ( (is_) && (c!='\n') && (c!=EOF) )
00014       c = is_.get();
00015     }
00016   if (!is_)
00017     c = EOF;
00018   return c;
00019   }
00020 else 
00021   return EOF;
00022 }

int nocommentstream::NoCommentFilter::sync [inline]
 

Definition at line 27 of file nocomment.h.

00027 { return -1; }

void nocommentstream::NoCommentFilter::close [inline]
 

Definition at line 28 of file nocomment.h.

00028 {}


Member Data Documentation

istream& nocommentstream::NoCommentFilter::is_ [private]
 

Underlying istream from where the filter takes its input.

Definition at line 31 of file nocomment.h.


The documentation for this class was generated from the following files:
FSM [ August, 2001]