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

nci/suif/suif2b/basesuif/suifkernel/char_source.h

Go to the documentation of this file.
00001 
00011 #ifndef SUIFKERNEL__CHARSOURCE_H
00012 #define SUIFKERNEL__CHARSOURCE_H
00013 
00014 #include <iostream.h>
00015 
00016 
00017 class CharSource {
00018  public:
00019   virtual int get(void) = 0;
00020   virtual int peek(void) = 0;
00021 };
00022 
00023 
00024 
00029 class StdCharSource : public CharSource {
00030  private:
00031   const char*   _prompt;
00032   bool          _isNewline;
00033   int           _cbuf;
00034   bool          _isBufFull;
00035  public:
00036   StdCharSource(const char* prompt = NULL);
00037   virtual int get(void);
00038   virtual int peek(void);
00039 };
00040 
00041 
00042 
00043 /*
00044  * An IstreamCharSource is a CharSource whose characters come
00045  * from an istream.
00046  */
00047 class IstreamCharSource : public CharSource {
00048  private:
00049   istream       *_istream;
00050  public:
00051   IstreamCharSource(istream*);
00052   virtual ~IstreamCharSource(void);
00053   virtual int get(void);
00054   virtual int peek(void);
00055 };
00056 
00057 
00058 #endif /* SUIFKERNEL__CHARSOURCE_H */

Generated at Mon Jul 31 13:41:32 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000