FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::venues::SymbolTable Class Reference

#include <fastmm/venues/symbology.hpp>

Public Member Functions

 SymbolTable () noexcept
 
void clear () noexcept
 
bool build (const InstrumentTable &instruments) noexcept
 Registers every instrument of the table.
 
bool add (InstrumentId id, VenueId venue, std::string_view symbol) noexcept
 
InstrumentId find (VenueId venue, std::string_view symbol) const noexcept
 Case-insensitive lookup; invalid id when unknown. Hot path: no allocation.
 
std::string_view venue_symbol (InstrumentId id) const noexcept
 Canonical (uppercase) venue symbol, e.g. "BTCUSDT"; empty if unknown.
 
std::string_view lower_symbol (InstrumentId id) const noexcept
 Lowercase form used by Binance stream names ("btcusdt\@depth\@100ms").
 
VenueId venue_of (InstrumentId id) const noexcept
 
bool contains (InstrumentId id) const noexcept
 
std::size_t size () const noexcept
 

Static Public Attributes

static constexpr std::size_t kSlots = 1024
 >= 4 * kMaxInstruments: load factor <= 0.25
 

Constructor & Destructor Documentation

◆ SymbolTable()

fastmm::venues::SymbolTable::SymbolTable ( )
inlinenoexcept

Member Function Documentation

◆ clear()

void fastmm::venues::SymbolTable::clear ( )
inlinenoexcept

◆ build()

bool fastmm::venues::SymbolTable::build ( const InstrumentTable &  instruments)
inlinenoexcept

Registers every instrument of the table.

Returns false on a duplicate (venue, symbol) pair or if the symbol is empty; the table is then partially filled and must be cleared.

◆ add()

bool fastmm::venues::SymbolTable::add ( InstrumentId  id,
VenueId  venue,
std::string_view  symbol 
)
inlinenoexcept

◆ find()

InstrumentId fastmm::venues::SymbolTable::find ( VenueId  venue,
std::string_view  symbol 
) const
inlinenoexcept

Case-insensitive lookup; invalid id when unknown. Hot path: no allocation.

◆ venue_symbol()

std::string_view fastmm::venues::SymbolTable::venue_symbol ( InstrumentId  id) const
inlinenoexcept

Canonical (uppercase) venue symbol, e.g. "BTCUSDT"; empty if unknown.

◆ lower_symbol()

std::string_view fastmm::venues::SymbolTable::lower_symbol ( InstrumentId  id) const
inlinenoexcept

Lowercase form used by Binance stream names ("btcusdt\@depth\@100ms").

◆ venue_of()

VenueId fastmm::venues::SymbolTable::venue_of ( InstrumentId  id) const
inlinenoexcept

◆ contains()

bool fastmm::venues::SymbolTable::contains ( InstrumentId  id) const
inlinenoexcept

◆ size()

std::size_t fastmm::venues::SymbolTable::size ( ) const
inlinenoexcept

Member Data Documentation

◆ kSlots

constexpr std::size_t fastmm::venues::SymbolTable::kSlots = 1024
staticconstexpr

>= 4 * kMaxInstruments: load factor <= 0.25