CCAFFEINE
0.8.8
|
00001 #ifndef __STDREADER_H__ 00002 #define __STDREADER_H__ 00003 00004 // Depends on: 00005 /* #include <sys/time.h> */ 00006 /* //#include <error.h> */ 00007 /* #include <sys/types.h> */ 00008 /* #include <unistd.h> */ 00009 /* #include "jc++/jc++.h" */ 00010 /* #include "util/IO.h" */ 00011 00012 // from <errno.h>, without all the extra goop. 00013 //extern int errno; 00014 00015 namespace jcpp { 00016 00018 class StdReader : public Reader { 00019 00020 private: 00021 int numFDs; 00022 fd_set set; 00023 int fd; 00024 int debug; 00025 00026 public: 00028 StdReader(int fd); 00029 virtual void close(); 00030 virtual int read(); 00031 virtual int read(char* cbuf, int off, int length); 00032 virtual int read(char* cbuf, int length) { 00033 return read(cbuf, 0 , length); 00034 } 00035 virtual boolean ready(); 00036 virtual long skip(long length); 00037 }; 00038 00039 } ENDSEMI // jcpp 00040 00041 00042 #endif // __STDREADER_H__