Slick OrderBook 1.1.0
High-Performance C++23 OrderBook Library
Loading...
Searching...
No Matches
slick::orderbook::detail::PriceLevelL3 Struct Reference

Price level for Level 3 orderbook (order-by-order) Maintains a queue of individual orders at this price level. More...

#include <price_level_l3.hpp>

Collaboration diagram for slick::orderbook::detail::PriceLevelL3:

Public Member Functions

 PriceLevelL3 (Price p) noexcept
 
Quantity getTotalQuantity () const noexcept
 Get total quantity at this level.
 
std::size_t orderCount () const noexcept
 Get number of orders at this level.
 
bool isEmpty () const noexcept
 Check if this level is empty.
 
Order * getBestOrder () noexcept
 Get best order (first in queue)
 
const Order * getBestOrder () const noexcept
 
void insertOrder (Order *order) noexcept
 Insert order maintaining priority order.
 
void removeOrder (Order *order) noexcept
 Remove order from the level.
 
void updateOrderQuantity (Quantity old_quantity, Quantity new_quantity) noexcept
 Update order quantity (for modify operations)
 
constexpr bool operator== (const PriceLevelL3 &other) const noexcept
 Comparison operators for sorting by price.
 
constexpr bool operator!= (const PriceLevelL3 &other) const noexcept
 
constexpr bool operator< (const PriceLevelL3 &other) const noexcept
 
constexpr bool operator> (const PriceLevelL3 &other) const noexcept
 

Public Attributes

Price price
 
IntrusiveList< Order > orders
 
Quantity total_quantity
 

Detailed Description

Price level for Level 3 orderbook (order-by-order) Maintains a queue of individual orders at this price level.

Definition at line 15 of file price_level_l3.hpp.

Constructor & Destructor Documentation

◆ PriceLevelL3()

slick::orderbook::detail::PriceLevelL3::PriceLevelL3 ( Price  p)
inlineexplicitnoexcept

Definition at line 20 of file price_level_l3.hpp.

Member Function Documentation

◆ getBestOrder() [1/2]

const Order * slick::orderbook::detail::PriceLevelL3::getBestOrder ( ) const
inlinenoexcept

◆ getBestOrder() [2/2]

Order * slick::orderbook::detail::PriceLevelL3::getBestOrder ( )
inlinenoexcept

◆ getTotalQuantity()

Quantity slick::orderbook::detail::PriceLevelL3::getTotalQuantity ( ) const
inlinenoexcept

Get total quantity at this level.

Definition at line 24 of file price_level_l3.hpp.

◆ insertOrder()

◆ isEmpty()

bool slick::orderbook::detail::PriceLevelL3::isEmpty ( ) const
inlinenoexcept

Check if this level is empty.

Definition at line 34 of file price_level_l3.hpp.

References slick::orderbook::detail::IntrusiveList< T, NextPtr, PrevPtr >::empty().

◆ operator!=()

constexpr bool slick::orderbook::detail::PriceLevelL3::operator!= ( const PriceLevelL3 &  other) const
inlineconstexprnoexcept

Definition at line 80 of file price_level_l3.hpp.

◆ operator<()

constexpr bool slick::orderbook::detail::PriceLevelL3::operator< ( const PriceLevelL3 &  other) const
inlineconstexprnoexcept

Definition at line 84 of file price_level_l3.hpp.

◆ operator==()

constexpr bool slick::orderbook::detail::PriceLevelL3::operator== ( const PriceLevelL3 &  other) const
inlineconstexprnoexcept

Comparison operators for sorting by price.

Definition at line 76 of file price_level_l3.hpp.

◆ operator>()

constexpr bool slick::orderbook::detail::PriceLevelL3::operator> ( const PriceLevelL3 &  other) const
inlineconstexprnoexcept

Definition at line 88 of file price_level_l3.hpp.

◆ orderCount()

std::size_t slick::orderbook::detail::PriceLevelL3::orderCount ( ) const
inlinenoexcept

Get number of orders at this level.

Definition at line 29 of file price_level_l3.hpp.

References slick::orderbook::detail::IntrusiveList< T, NextPtr, PrevPtr >::size().

◆ removeOrder()

void slick::orderbook::detail::PriceLevelL3::removeOrder ( Order *  order)
inlinenoexcept

Remove order from the level.

Definition at line 65 of file price_level_l3.hpp.

References slick::orderbook::detail::IntrusiveList< T, NextPtr, PrevPtr >::erase().

◆ updateOrderQuantity()

void slick::orderbook::detail::PriceLevelL3::updateOrderQuantity ( Quantity  old_quantity,
Quantity  new_quantity 
)
inlinenoexcept

Update order quantity (for modify operations)

Definition at line 71 of file price_level_l3.hpp.

Member Data Documentation

◆ orders

IntrusiveList<Order> slick::orderbook::detail::PriceLevelL3::orders

Definition at line 17 of file price_level_l3.hpp.

◆ price

Price slick::orderbook::detail::PriceLevelL3::price

Definition at line 16 of file price_level_l3.hpp.

◆ total_quantity

Quantity slick::orderbook::detail::PriceLevelL3::total_quantity

Definition at line 18 of file price_level_l3.hpp.


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