67 class ExternalBufferReader;
68 class ExternalBufferWriter;
79 void operator()(ExternalBufferReader* ptr)
const noexcept;
91 void operator()(ExternalBufferWriter* ptr)
const noexcept;
191 template<
typename In,
typename Out>
195 AttachIoIn(std::forward<In>(in));
196 AttachIoOut(std::forward<Out>(out));
205 template<
typename Out>
208 AttachIoOut(std::forward<Out>(out));
218 template<
typename In>
221 AttachIoIn(std::forward<In>(in));
256 void Close() noexcept;
262 bool EoF() const noexcept;
268 bool Failed() const noexcept;
274 bool InputIsIO() const noexcept;
284 bool InputPullBlocking() const noexcept;
318 void AttachNonIoIn(
ReadOnly& in) noexcept;
324 void AttachNonIoOut(
WriteOnly& out) noexcept;
332 void CacheReadTelemetry() noexcept;
340 void CacheWriteTelemetry() noexcept;
345 void ReleaseTips() noexcept;
351 bool SourceEoF() const noexcept;
367 IO::Result Push(
FIFO& src);
374 template<typename In>
375 STORMBYTE_FORCE_INLINE
void AttachIoIn(In&& in) noexcept {
378 std::forward<In>(in));
379 CacheReadTelemetry();
387 template<
typename Out>
390 std::forward<Out>(out));
391 CacheWriteTelemetry();
394 std::unique_ptr<ExternalBufferReader, ExternalReaderDeleter> m_ext_in;
395 std::unique_ptr<ExternalBufferWriter, ExternalWriterDeleter> m_ext_out;
400 bool m_io_in_blocking {
false};
401 enum State m_state {State::Open};
402 mutable std::mutex m_mutex;
Manual bridge between two StormByte-Buffer ends.
Definition bridge.hxx:156
STORMBYTE_FORCE_INLINE Bridge(ReadOnly &in, Out &&out) noexcept
Non-IO source, IO sink stolen.
Definition bridge.hxx:206
STORMBYTE_FORCE_INLINE Bridge(In &&in, WriteOnly &out) noexcept
IO source stolen, non-IO sink.
Definition bridge.hxx:219
STORMBYTE_FORCE_INLINE Bridge(In &&in, Out &&out) noexcept
Two IO leaves.
Definition bridge.hxx:192
Operation
Read-side wait policy for Passthrough.
Definition bridge.hxx:162
Bridge(const Bridge &)=delete
Bridge(Bridge &&other) noexcept
Move constructor.
State
Session lifetime.
Definition bridge.hxx:171
~Bridge() noexcept
Destructor.
Bridge(ReadOnly &in, WriteOnly &out) noexcept
Two non-IO tips.
Byte-oriented FIFO buffer with grow-on-demand and close/error support.
Definition fifo.hxx:78
Coordinated binary read source with optional prefetch and cache.
Definition buffered_reader.hxx:211
Coordinated binary write sink with optional chunked write-behind and a delayed-seek page map.
Definition buffered_writer.hxx:231
Buffer that can be read and not written.
Definition generic.hxx:228
Basic read counters.
Definition telemetry.hxx:141
Buffer that can be written and not read.
Definition generic.hxx:505
Basic write counters.
Definition telemetry.hxx:181
Root namespace of the StormByte C++ suite.
Destroys a non-IO read adapter in this module.
Definition bridge.hxx:74
void operator()(ExternalBufferReader *ptr) const noexcept
Destroy ptr.
Destroys a non-IO write adapter in this module.
Definition bridge.hxx:86
void operator()(ExternalBufferWriter *ptr) const noexcept
Destroy ptr.
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:54