Leka
A low-latency C++20 price-time-priority limit order book and matching engine
▶ Replay viewer
Loading...
Searching...
No Matches
lob::OrderId Class Reference

Type-safe identifier for an order; zero is reserved as invalid. More...

#include <order_id.hpp>

Public Member Functions

 OrderId ()
 Constructs an invalid, zero-valued identifier.
 OrderId (std::uint64_t id)
 Constructs an identifier from its numeric value.
std::uint64_t getId () const
 Returns the underlying numeric identifier.
bool operator== (const OrderId &other) const
bool isValid () const
 Returns whether the identifier is nonzero.

Detailed Description

Type-safe identifier for an order; zero is reserved as invalid.

Definition at line 10 of file order_id.hpp.

Constructor & Destructor Documentation

◆ OrderId() [1/2]

lob::OrderId::OrderId ( )
inline

Constructs an invalid, zero-valued identifier.

Definition at line 16 of file order_id.hpp.

◆ OrderId() [2/2]

lob::OrderId::OrderId ( std::uint64_t id)
inline

Constructs an identifier from its numeric value.

Definition at line 19 of file order_id.hpp.

Member Function Documentation

◆ getId()

std::uint64_t lob::OrderId::getId ( ) const
inline

Returns the underlying numeric identifier.

Definition at line 22 of file order_id.hpp.

◆ operator==()

bool lob::OrderId::operator== ( const OrderId & other) const
inline

Definition at line 25 of file order_id.hpp.

◆ isValid()

bool lob::OrderId::isValid ( ) const
inline

Returns whether the identifier is nonzero.

Definition at line 30 of file order_id.hpp.

Referenced by lob::MatchingEngine::processEvent().


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