From: stephan b. <sg...@us...> - 2005-01-01 19:40:25
|
Update of /cvsroot/pclasses/pclasses/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10117 Modified Files: piodevice.h piorequest.h Log Message: added std::string form of read/receive() Index: piodevice.h =================================================================== RCS file: /cvsroot/pclasses/pclasses/include/pclasses/piodevice.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- piodevice.h 10 Mar 2004 19:35:01 -0000 1.12 +++ piodevice.h 1 Jan 2005 19:40:09 -0000 1.13 @@ -20,6 +20,8 @@ #ifndef _piodevice_h_ #define _piodevice_h_ +#include <string> + #include <pclasses/pconfig.h> #include <pclasses/pexport.h> #include <pclasses/pexception.h> @@ -99,6 +101,8 @@ //! Read from device virtual size_t read(char* buffer, size_t count) throw(IOError); + //! Same as read(char*,size_t) but writes to the given std::string + size_t read( std::string & buffer, size_t count ) throw(IOError); //! Peek incoming data on device /*! Index: piorequest.h =================================================================== RCS file: /cvsroot/pclasses/pclasses/include/pclasses/piorequest.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- piorequest.h 3 Mar 2004 09:20:17 -0000 1.2 +++ piorequest.h 1 Jan 2005 19:40:09 -0000 1.3 @@ -147,6 +147,9 @@ less than requested. */ virtual size_t receive(char* buff, size_t count) = 0; + //! Same as receive(char*,size_t) but writes to the given std::string + size_t receive( std::string & buffer, size_t count ); + }; //! Network I/O Put-request |