Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
slick::sim::md_feed::ReplayGateView Class Reference

A publisher channel's view of the gate: whether it may publish yet, for the md_queue frame it is working on. More...

#include <md_feed/replay_gate.hpp>

Collaboration diagram for slick::sim::md_feed::ReplayGateView:

Public Member Functions

void set (std::shared_ptr< ReplayGate > gate)
 Call before the channel is used. A channel with a gate publishes nothing until it opens.
bool gated () const noexcept
bool publishing () const noexcept
 False while a gate is closed (or not yet open for the frame being read).
void set_position (uint64_t index) noexcept
 The md_queue index of the next frame the publisher thread will read.
bool opened_now () noexcept
 True once, when the gate has opened for the frames now being read: the moment the channel starts publishing what it held back.

Detailed Description

A publisher channel's view of the gate: whether it may publish yet, for the md_queue frame it is working on.

Publisher thread only. Without a gate everything is published.

Definition at line 53 of file replay_gate.hpp.

Member Function Documentation

◆ gated()

bool slick::sim::md_feed::ReplayGateView::gated ( ) const
inlinenodiscardnoexcept

Definition at line 60 of file replay_gate.hpp.

◆ opened_now()

bool slick::sim::md_feed::ReplayGateView::opened_now ( )
inlinenodiscardnoexcept

True once, when the gate has opened for the frames now being read: the moment the channel starts publishing what it held back.

Definition at line 69 of file replay_gate.hpp.

◆ publishing()

bool slick::sim::md_feed::ReplayGateView::publishing ( ) const
inlinenodiscardnoexcept

False while a gate is closed (or not yet open for the frame being read).

Definition at line 62 of file replay_gate.hpp.

◆ set()

void slick::sim::md_feed::ReplayGateView::set ( std::shared_ptr< ReplayGate > gate)
inline

Call before the channel is used. A channel with a gate publishes nothing until it opens.

Definition at line 56 of file replay_gate.hpp.

◆ set_position()

void slick::sim::md_feed::ReplayGateView::set_position ( uint64_t index)
inlinenoexcept

The md_queue index of the next frame the publisher thread will read.

Definition at line 65 of file replay_gate.hpp.


The documentation for this class was generated from the following file: