summaryrefslogtreecommitdiff
path: root/src/stream.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-09-18 19:37:06 +0000
committerMike Buland <eichlan@xagasoft.com>2009-09-18 19:37:06 +0000
commitde3f8f4f6eab5d5c873c91cc93a01fe2e8a82363 (patch)
treebbc4c7fdce44cf40e071222837ccf195f067ab82 /src/stream.h
parentf27b485eaf1088fa4895d1af4aee9abc2b801872 (diff)
downloadlibbu++-de3f8f4f6eab5d5c873c91cc93a01fe2e8a82363.tar.gz
libbu++-de3f8f4f6eab5d5c873c91cc93a01fe2e8a82363.tar.bz2
libbu++-de3f8f4f6eab5d5c873c91cc93a01fe2e8a82363.tar.xz
libbu++-de3f8f4f6eab5d5c873c91cc93a01fe2e8a82363.zip
Added a handy readLine function, I've been meaning to do this for a while.
Diffstat (limited to 'src/stream.h')
-rw-r--r--src/stream.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stream.h b/src/stream.h
index f0f1af3..527dc20 100644
--- a/src/stream.h
+++ b/src/stream.h
@@ -46,6 +46,14 @@ namespace Bu
46 virtual size_t read( void *pBuf, size_t nBytes ) = 0; 46 virtual size_t read( void *pBuf, size_t nBytes ) = 0;
47 47
48 /** 48 /**
49 * Attempts to read a complete line from the stream. This will stop
50 * reading when it has reached the end of the stream, or runs out of
51 * data in a non-blocking stream.
52 *@returns The line read, not including newline character.
53 */
54 virtual Bu::FString readLine();
55
56 /**
49 * Write data to the stream. 57 * Write data to the stream.
50 *@param pBuf (const void *) The data to be written. 58 *@param pBuf (const void *) The data to be written.
51 *@param nBytes (size_t) Amount of data to write from pBuf. 59 *@param nBytes (size_t) Amount of data to write from pBuf.