#include <llmemorystream.h>
Public Member Functions | |
LLMemoryStreamBuf (const U8 *start, S32 length) | |
~LLMemoryStreamBuf () | |
void | reset (const U8 *start, S32 length) |
Protected Member Functions | |
int | underflow () |
This is a simple but effective optimization when you want to treat a chunk of memory as an istream. I wrote this to avoid turing a buffer into a string, and then throwing the string into an iostringstream just to parse it into another datatype, eg, LLSD.
The memory passed in is NOT owned by an instance. The caller must be careful to always pass in a valid memory location that exists for at least as long as this streambuf.
Definition at line 54 of file llmemorystream.h.
Definition at line 37 of file llmemorystream.cpp.
References reset().
LLMemoryStreamBuf::~LLMemoryStreamBuf | ( | ) |
Definition at line 42 of file llmemorystream.cpp.
Definition at line 46 of file llmemorystream.cpp.
Referenced by LLMemoryStreamBuf().
int LLMemoryStreamBuf::underflow | ( | ) | [protected] |