diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-04-29 19:22:54 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-04-29 19:22:54 +0000 |
commit | 1edb424b734ea3e4f2128e1cbc77a22bd001f8d5 (patch) | |
tree | da3e95edf1ab1a1808ac6673811f76610f9dfce2 /lib/common/BufferedStream.h | |
parent | 1ce71f487e6cd6514198c3769cd0a337395c1f8e (diff) |
Add a ToString method to IOStream and some subclasses.
Useful to help debug problems such as invalid file headers when the source
of the stream might not be too obvious.
Diffstat (limited to 'lib/common/BufferedStream.h')
-rw-r--r-- | lib/common/BufferedStream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/common/BufferedStream.h b/lib/common/BufferedStream.h index 079c482a..4987e37b 100644 --- a/lib/common/BufferedStream.h +++ b/lib/common/BufferedStream.h @@ -33,6 +33,10 @@ public: virtual bool StreamDataLeft(); virtual bool StreamClosed(); + virtual std::string ToString() const + { + return std::string("Buffered ") + mrSource.ToString(); + } private: BufferedStream(const BufferedStream &rToCopy) : mrSource(rToCopy.mrSource) { /* do not call */ } |