MCPcopy Create free account
hub / github.com/cvanaret/Uno / CStreamBuffer

Method CStreamBuffer

interfaces/C/Uno_C_API.cpp:387–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385class CStreamBuffer : public std::streambuf {
386public:
387 explicit CStreamBuffer(uno_logger_stream_callback logger_stream_callback, void* user_data, std::size_t buffer_size) :
388 logger_stream_callback(logger_stream_callback), user_data(user_data) {
389 // allocate output buffer and set stream buffer pointer
390 this->buffer = new char[buffer_size];
391 this->setp(this->buffer, this->buffer + buffer_size - 1);
392 }
393 ~CStreamBuffer() override {
394 // flush remaining data and release buffer memory
395 this->sync();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected