FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::store::Backend Class Referenceabstract

#include <fastmm/store/backend.hpp>

Public Member Functions

 Backend ()=default
 
virtual ~Backend ()=default
 
 Backend (const Backend &)=delete
 
Backend & operator= (const Backend &)=delete
 
virtual std::string_view name () const noexcept=0
 
virtual Result< void, std::string > open (const BackendOptions &opts)=0
 Opens or creates the store and brings its schema up to date.
 
virtual Result< void, std::string > session_open (const SessionOpen &s)=0
 
virtual Result< void, std::string > instruments (std::uint64_t session_id, std::span< const Instrument > table)=0
 The instrument table of this session, by dense id.
 
virtual void begin ()=0
 One batch. StoreThread calls begin(), then zero or more records, then commit().
 
virtual void fill (const FillRecord &r)=0
 
virtual void order (const OrderRecord &r)=0
 
virtual void position (const PositionRecord &r)=0
 
virtual void kill (const KillRecord &r)=0
 
virtual void funding (const FundingRecord &)
 A funding payment.
 
virtual void replayed (const ReplayedRecord &)
 A venue's execution replay ended complete.
 
virtual void param (const ParamRecord &)
 A strategy parameter update the engine applied. The default drops it.
 
virtual void reject (const RejectRecord &)
 An order refused by the pre-trade checks or by its venue. The default drops it.
 
virtual void commit ()=0
 
virtual Result< void, std::string > session_close (const SessionClose &s)=0
 
virtual void close ()=0
 
virtual std::uint64_t rows () const noexcept=0
 
virtual std::uint64_t errors () const noexcept=0
 
virtual std::string last_error () const =0
 

Constructor & Destructor Documentation

◆ Backend() [1/2]

fastmm::store::Backend::Backend ( )
default

◆ ~Backend()

virtual fastmm::store::Backend::~Backend ( )
virtualdefault

◆ Backend() [2/2]

fastmm::store::Backend::Backend ( const Backend &  )
delete

Member Function Documentation

◆ operator=()

Backend & fastmm::store::Backend::operator= ( const Backend &  )
delete

◆ name()

virtual std::string_view fastmm::store::Backend::name ( ) const
pure virtualnoexcept

◆ open()

virtual Result< void, std::string > fastmm::store::Backend::open ( const BackendOptions &  opts)
pure virtual

Opens or creates the store and brings its schema up to date.

A failure here stops the session from starting: an operator who does not want a store sets backend = "none".

◆ session_open()

virtual Result< void, std::string > fastmm::store::Backend::session_open ( const SessionOpen &  s)
pure virtual

◆ instruments()

virtual Result< void, std::string > fastmm::store::Backend::instruments ( std::uint64_t  session_id,
std::span< const Instrument >  table 
)
pure virtual

The instrument table of this session, by dense id.

◆ begin()

virtual void fastmm::store::Backend::begin ( )
pure virtual

One batch. StoreThread calls begin(), then zero or more records, then commit().

◆ fill()

virtual void fastmm::store::Backend::fill ( const FillRecord &  r)
pure virtual

◆ order()

virtual void fastmm::store::Backend::order ( const OrderRecord &  r)
pure virtual

◆ position()

virtual void fastmm::store::Backend::position ( const PositionRecord &  r)
pure virtual

◆ kill()

virtual void fastmm::store::Backend::kill ( const KillRecord &  r)
pure virtual

◆ funding()

virtual void fastmm::store::Backend::funding ( const FundingRecord &  )
inlinevirtual

A funding payment.

The default drops it: a backend written before funding was booked keeps building (its positions still carry funding inside realized).

◆ replayed()

virtual void fastmm::store::Backend::replayed ( const ReplayedRecord &  )
inlinevirtual

A venue's execution replay ended complete.

The default drops it: a restart from such a store judges a session by whether it placed an order on the venue or shut down (Recovery).

◆ param()

virtual void fastmm::store::Backend::param ( const ParamRecord &  )
inlinevirtual

A strategy parameter update the engine applied. The default drops it.

◆ reject()

virtual void fastmm::store::Backend::reject ( const RejectRecord &  )
inlinevirtual

An order refused by the pre-trade checks or by its venue. The default drops it.

◆ commit()

virtual void fastmm::store::Backend::commit ( )
pure virtual

◆ session_close()

virtual Result< void, std::string > fastmm::store::Backend::session_close ( const SessionClose &  s)
pure virtual

◆ close()

virtual void fastmm::store::Backend::close ( )
pure virtual

◆ rows()

virtual std::uint64_t fastmm::store::Backend::rows ( ) const
pure virtualnoexcept

◆ errors()

virtual std::uint64_t fastmm::store::Backend::errors ( ) const
pure virtualnoexcept

◆ last_error()

virtual std::string fastmm::store::Backend::last_error ( ) const
pure virtual