From 1edb424b734ea3e4f2128e1cbc77a22bd001f8d5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 29 Apr 2014 19:22:54 +0000 Subject: 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. --- lib/common/FileStream.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/common/FileStream.h') diff --git a/lib/common/FileStream.h b/lib/common/FileStream.h index 9101a968..8489188c 100644 --- a/lib/common/FileStream.h +++ b/lib/common/FileStream.h @@ -49,6 +49,10 @@ public: virtual bool StreamClosed(); bool CompareWith(IOStream& rOther, int Timeout = IOStream::TimeOutInfinite); + std::string ToString() const + { + return std::string("local file ") + mFileName; + } private: tOSFileHandle mOSFileHandle; -- cgit v1.2.3