diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-10-22 20:48:54 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-10-22 20:48:54 +0000 |
commit | 70d67a3983ca2577499255a919102d4b1ac639f3 (patch) | |
tree | b37b111fbe578181b96c0036fe1b7efae9e1d98a | |
parent | 6030a8d4efe3e3be17911ad8cbc400d88d9fa1fb (diff) |
Add helper methods to get read-only access to the buffer, and its size,
wrapped by a MemBlockStream.
-rw-r--r-- | lib/common/MemBlockStream.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/common/MemBlockStream.h b/lib/common/MemBlockStream.h index f78ff8e6..86c7739c 100644 --- a/lib/common/MemBlockStream.h +++ b/lib/common/MemBlockStream.h @@ -41,6 +41,8 @@ public: virtual void Seek(pos_type Offset, int SeekType); virtual bool StreamDataLeft(); virtual bool StreamClosed(); + virtual const void* GetBuffer() const { return mpBuffer; } + virtual int GetSize() const { return mBytesInBuffer; } private: const char *mpBuffer; |