Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Public Member Functions | List of all members
srfm::stream::TickSource Class Referenceabstract

Abstract source of raw OHLCVTick values. More...

#include <tick_source.hpp>

Inheritance diagram for srfm::stream::TickSource:
srfm::stream::PipeTickSource

Public Member Functions

virtual ~TickSource () noexcept=default
 
virtual std::optional< OHLCVTick > read () noexcept=0
 Read the next OHLCVTick from the source.
 
virtual bool is_open () const noexcept=0
 Whether the source is still usable.
 
virtual void close () noexcept=0
 Close the source and release any OS resources.
 

Detailed Description

Abstract source of raw OHLCVTick values.

TickIngester calls read() in its hot loop. Implementors must be thread-safe if called from the ingestion thread while other threads interact with the underlying resource (this is not required by the default implementations).

Definition at line 58 of file tick_source.hpp.

Constructor & Destructor Documentation

◆ ~TickSource()

virtual srfm::stream::TickSource::~TickSource ( )
virtualdefaultnoexcept

Member Function Documentation

◆ close()

virtual void srfm::stream::TickSource::close ( )
pure virtualnoexcept

Close the source and release any OS resources.

Safe to call multiple times.

Implemented in srfm::stream::PipeTickSource.

◆ is_open()

virtual bool srfm::stream::TickSource::is_open ( ) const
pure virtualnoexcept

Whether the source is still usable.

Returns false after a permanent error or after close() is called.

Implemented in srfm::stream::PipeTickSource.

◆ read()

virtual std::optional< OHLCVTick > srfm::stream::TickSource::read ( )
pure virtualnoexcept

Read the next OHLCVTick from the source.

Returns
std::optional<OHLCVTick>:
  • has_value() → a tick was read; it may or may not pass validation.
  • nullopt → no data available right now (transient) or source closed (permanent — caller checks is_open()).
Note
Implementations must not throw.

Implemented in srfm::stream::PipeTickSource.


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