162 template<
typename In,
typename Out>
166 AttachIoIn(std::forward<In>(in));
167 AttachIoOut(std::forward<Out>(out));
176 template<
typename Out>
179 AttachIoOut(std::forward<Out>(out));
189 template<
typename In>
192 AttachIoIn(std::forward<In>(in));
227 void Close() noexcept;
233 bool EoF() const noexcept;
239 bool Failed() const noexcept;
245 bool InputIsIO() const noexcept;
255 bool InputPullBlocking() const noexcept;
289 void AttachNonIoIn(
ReadOnly& in) noexcept;
295 void AttachNonIoOut(
WriteOnly& out) noexcept;
303 void CacheReadTelemetry() noexcept;
311 void CacheWriteTelemetry() noexcept;
316 void ReleaseTips() noexcept;
322 bool SourceEoF() const noexcept;
338 IO::Result Push(
FIFO& src);
345 template<typename In>
346 STORMBYTE_FORCE_INLINE
void AttachIoIn(In&& in) noexcept {
349 std::forward<In>(in));
350 CacheReadTelemetry();
358 template<
typename Out>
361 std::forward<Out>(out));
362 CacheWriteTelemetry();
365 ReadOnly* m_ext_in {
nullptr};
366 WriteOnly* m_ext_out {
nullptr};
371 bool m_io_in_blocking {
false};
372 enum State m_state {State::Open};
373 mutable std::mutex m_mutex;
Manual bridge between two StormByte-Buffer ends.
Definition bridge.hxx:127
STORMBYTE_FORCE_INLINE Bridge(ReadOnly &in, Out &&out) noexcept
Non-IO source, IO sink stolen.
Definition bridge.hxx:177
STORMBYTE_FORCE_INLINE Bridge(In &&in, WriteOnly &out) noexcept
IO source stolen, non-IO sink.
Definition bridge.hxx:190
STORMBYTE_FORCE_INLINE Bridge(In &&in, Out &&out) noexcept
Two IO leaves.
Definition bridge.hxx:163
Operation
Read-side wait policy for Passthrough.
Definition bridge.hxx:133
Bridge(const Bridge &)=delete
Bridge(Bridge &&other) noexcept
Move constructor.
State
Session lifetime.
Definition bridge.hxx:142
~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:203
Buffer that can be written and not read.
Definition generic.hxx:505
Basic write counters.
Definition telemetry.hxx:243
State
Session state of a coordinated reader or writer.
Definition typedefs.hxx:86
Root namespace of the StormByte C++ suite.
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:54