A simple streambuf with fixed size buffer. More...
#include <FixedStream.h>
Public Member Functions | |
FixedStreamBuf (char *buf, size_t len) | |
Constructor. More... | |
FixedStreamBuf (const char *buf, const char *next, const char *end) | |
Constructor. More... | |
String | str () |
Returns a String object from the output buffer. More... | |
A simple streambuf with fixed size buffer.
Convenient for limitting size of output; faster than ostringstream and friends, which require heap allocations
Definition at line 45 of file FixedStream.h.
|
inline |
Constructor.
Constructs a new FixedStreamBuf object backed by a memory buffer provided by the caller. All objects "streamed" into this class will be stored in this memory buffer.
buf | Pointer to the memory buffer |
len | Size of that memory buffer |
Definition at line 56 of file FixedStream.h.
|
inline |
Constructor.
Constructs a new FixedStreamBuf object backed by a memory buffer provided by the caller. All objects are "streamed" from this memory buffer.
Definition at line 63 of file FixedStream.h.
|
inline |
Returns a String object from the output buffer.
Definition at line 68 of file FixedStream.h.