00001 //---------------------------------------------------------------------------- 00002 /** @file GtpInputStream.h */ 00003 //---------------------------------------------------------------------------- 00004 00005 #ifndef GTP_INPUTSTREAM_H 00006 #define GTP_INPUTSTREAM_H 00007 00008 #include <iostream> 00009 #include <string> 00010 00011 //---------------------------------------------------------------------------- 00012 00013 /** Base class for input streams used by GtpEngine. 00014 This implementation only forwards calls to std::istream. 00015 @todo Why does it need this class if users can write their own streams 00016 compatible with the standard library? See also 00017 https://sourceforge.net/apps/trac/fuego/ticket/66 */ 00018 class GtpInputStream 00019 { 00020 public: 00021 GtpInputStream(std::istream &in); 00022 00023 virtual ~GtpInputStream(); 00024 00025 virtual bool EndOfInput(); 00026 00027 virtual bool GetLine(std::string &line); 00028 00029 private: 00030 std::istream &m_in; 00031 }; 00032 00033 //---------------------------------------------------------------------------- 00034 00035 #endif // GTP_INPUTSTREAM_H