From: Christian P. <cp...@us...> - 2005-01-03 13:50:56
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19210/include/pclasses/System Modified Files: File.h Pipe.h ProcessIO.h Log Message: Added IOFilter support to IODevice. Updated classes that inherit from IODevice. Fixed some minor bugs in ProcessIO class. Index: Pipe.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Pipe.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Pipe.h 1 Jan 2005 19:00:08 -0000 1.7 +++ Pipe.h 3 Jan 2005 13:50:44 -0000 1.8 @@ -41,15 +41,16 @@ static Pair create() throw(IO::IOError); - void close() throw(IO::IOError); + Pipe& operator=(const Pipe& f) throw(IO::IOError); - size_t read(char* buffer, size_t count) throw(IO::IOError); + protected: + void _close() throw(IO::IOError); - size_t write(const char* buffer, size_t count) throw(IO::IOError); + size_t _read(char* buffer, size_t count) throw(IO::IOError); - void sync() const throw(IO::IOError); + size_t _write(const char* buffer, size_t count) throw(IO::IOError); - Pipe& operator=(const Pipe& f) throw(IO::IOError); + void _sync() const throw(IO::IOError); private: unsigned long _handle; Index: File.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/File.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- File.h 1 Jan 2005 19:00:08 -0000 1.8 +++ File.h 3 Jan 2005 13:50:44 -0000 1.9 @@ -56,16 +56,31 @@ OpenMode omode = OpenCreate, ShareMode smode = AllowNone) throw(IO::IOError); + void resize(size_t sz) throw(IO::IOError); + + /** + Copies f. + + @fixme: what are the semantics for copying the + read/write mode? Does copying a file this way + really make sense? If f is locked then this ctor + cannot succeed, right? + */ + File& operator=(const File& f) throw(IO::IOError); + + static FileInfo stat(const Unicode::String& path) throw(IO::IOError); + + protected: /** Frees any resources associated with this object, like filehandles. */ - void close() throw(IO::IOError); + void _close() throw(IO::IOError); /** Reads up to count bytes and stores them in buffer. Returns the number of bytes read. */ - size_t read(char* buffer, size_t count) throw(IO::IOError); + size_t _read(char* buffer, size_t count) throw(IO::IOError); /** Tries to extract up to count bytes from this object @@ -73,50 +88,36 @@ buffer, and the number of bytes read is returned. */ - size_t peek(char* buffer, size_t count) throw(IO::IOError); + size_t _peek(char* buffer, size_t count) throw(IO::IOError); /** Writes count bytes from buffer to this object's internal representation. */ - size_t write(const char* buffer, size_t count) throw(IO::IOError); + size_t _write(const char* buffer, size_t count) throw(IO::IOError); /** Tries to move the current read position to the given offset. SeekMode determines the relative starting point of offset. */ - offset_t seek(offset_t offset, SeekMode mode) throw(IO::IOError); + offset_t _seek(offset_t offset, SeekMode mode) throw(IO::IOError); /** Returns true if seek() is supported. */ - bool isSeekable() const throw(); + bool _isSeekable() const throw(); /** @fixme: Same as conventional sync() functions??? */ - void sync() const throw(IO::IOError); + void _sync() const throw(IO::IOError); /** Returns the size of this File on disk. */ - offset_t size() const throw(IO::IOError); - - void resize(size_t sz) throw(IO::IOError); - - /** - Copies f. - - @fixme: what are the semantics for copying the - read/write mode? Does copying a file this way - really make sense? If f is locked then this ctor - cannot succeed, right? - */ - File& operator=(const File& f) throw(IO::IOError); - - static FileInfo stat(const Unicode::String& path) throw(IO::IOError); + offset_t _size() const throw(IO::IOError); private: unsigned long _handle; Index: ProcessIO.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/ProcessIO.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ProcessIO.h 31 Dec 2004 03:22:58 -0000 1.1 +++ ProcessIO.h 3 Jan 2005 13:50:44 -0000 1.2 @@ -37,21 +37,22 @@ ProcessIO(const Pipe& in, const Pipe& out, const Pipe& err) throw(IO::IOError); ~ProcessIO() throw(); - //! Close pipe's to child process - void close() throw(IO::IOError); - void closeWrite() throw(IO::IOError); void closeRead() throw(IO::IOError); void closeErr() throw(IO::IOError); + //! Read from process stderr + size_t readErr(char* buffer, size_t count) throw(IO::IOError); + + protected: + //! Close pipe's to child process + void _close() throw(IO::IOError); + //! Write to process stdin - size_t write(const char* buffer, size_t count) throw(IO::IOError); + size_t _write(const char* buffer, size_t count) throw(IO::IOError); //! Read from process stdout - size_t read(char* buffer, size_t count) throw(IO::IOError); - - //! Read from process stderr - size_t readErr(char* buffer, size_t count) throw(IO::IOError); + size_t _read(char* buffer, size_t count) throw(IO::IOError); private: Pipe _in, _out, _err; |