#include <pstreams.h> class outmemory: outstm { outmemory(int limit = -1); string get_strdata(); }
Use outmemory to write data to a dynamic memory buffer by means of the streaming interface. Outmemory is derived from outstm.
outmemory::outmemory(int limit = -1) creates an outmemory object. The memory buffer grows as data is written to the stream. You can optionally limit the size of the memory buffer to limit (-1 means unlimited).
string outmemory::get_strdata() returns data written to the stream as a dynamic string and closes the stream.