00001 /* vpipe.h */ 00002 00003 #ifndef VPIPE_H 00004 #define VPIPE_H 00005 00006 #include <stdio.h> 00007 #include <fstream.h> 00008 00009 class vpipe { 00010 private: 00011 fstream fstr; 00012 int readpos; 00013 int writepos; 00014 public: 00015 vpipe(void); 00016 ~vpipe(void); 00017 00018 fstream& fout(void) { return fstr; } 00019 void clear(void); 00020 int size(void); 00021 int read(char *ptr, int size); // read from pipe, returns # of bytes 00022 }; 00023 #endif // VPIPE_H