diff options
author | Chris Wilson <chris+github@qwirx.com> | 2009-01-03 08:57:53 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2009-01-03 08:57:53 +0000 |
commit | 2b1c6f82d57d187a20e4a7ebb34f3abbc22bac71 (patch) | |
tree | a926a76654ad2f3c4b30f2e7fe95905e1fc9d807 | |
parent | 6f7cb222fbd287fd4f6b65e5c6b64f9ecfea1721 (diff) |
Add a method to write a C style string directly to an IOStream.
-rw-r--r-- | lib/common/IOStream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/common/IOStream.h b/lib/common/IOStream.h index fc9f8a97..82d5bfc1 100644 --- a/lib/common/IOStream.h +++ b/lib/common/IOStream.h @@ -44,6 +44,10 @@ public: virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite) = 0; virtual pos_type BytesLeftToRead(); // may return IOStream::SizeOfStreamUnknown (and will for most stream types) virtual void Write(const void *pBuffer, int NBytes) = 0; + virtual void Write(const char *pBuffer) + { + Write(pBuffer, strlen(pBuffer)); + } virtual void WriteAllBuffered(); virtual pos_type GetPosition() const; virtual void Seek(pos_type Offset, int SeekType); |