MCPcopy Create free account
hub / github.com/apache/fory / OutputStream

Method OutputStream

cpp/fory/util/stream.cc:32–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace fory {
31
32OutputStream::OutputStream(uint32_t buffer_size)
33 : buffer_(std::make_unique<Buffer>()) {
34 const uint32_t actual_size = std::max<uint32_t>(buffer_size, 1U);
35 buffer_->reserve(actual_size);
36 buffer_->writer_index(0);
37 buffer_->reader_index(0);
38 buffer_->bind_output_stream(this);
39 active_buffer_ = buffer_.get();
40}
41
42OutputStream::~OutputStream() {
43 if (active_buffer_ != nullptr && active_buffer_ != buffer_.get()) {

Callers

nothing calls this directly

Calls 5

writer_indexMethod · 0.80
reader_indexMethod · 0.80
bind_output_streamMethod · 0.80
getMethod · 0.65
reserveMethod · 0.45

Tested by

no test coverage detected