ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch::overlay Namespace Reference

Namespaces

namespace  detail
 

Classes

class  AddOrderView
 Lazy view of an Add Order (A) message. More...
 
class  MessageView
 A zero-copy typed view over one raw ITCH frame. More...
 
class  NonCrossTradeView
 Lazy view of a Trade (P, non-cross) message. More...
 
class  OrderCancelView
 Lazy view of an Order Cancel (X) message. More...
 
class  OrderDeleteView
 Lazy view of an Order Delete (D) message. More...
 
class  OrderExecutedView
 Lazy view of an Order Executed (E) message. More...
 
class  OrderExecutedWithPriceView
 Lazy view of an Order Executed With Price (C) message. More...
 
class  OrderReplaceView
 Lazy view of an Order Replace (U) message. More...
 

Typedefs

using ViewCallback = std::function< void(const MessageView &)>
 The signature for the overlay framing callback.
 

Functions

consteval auto build_size_table () -> std::array< std::uint16_t, 256 >
 Builds the per-type expected wire-size table at compile time, mirroring the eager parser's so the overlay validates frame lengths identically.
 
auto for_each_message (std::span< const std::byte > data, const ViewCallback &callback) -> std::uint64_t
 Frames a buffer and invokes callback with a zero-copy MessageView for each well-formed message.
 

Variables

constexpr auto SIZE_TABLE = build_size_table()
 

Typedef Documentation

◆ ViewCallback

using itch::overlay::ViewCallback = typedef std::function<void(const MessageView&)>

The signature for the overlay framing callback.

Definition at line 329 of file overlay.hpp.

Function Documentation

◆ build_size_table()

consteval auto itch::overlay::build_size_table ( ) -> std::array<std::uint16_t, 256>

Builds the per-type expected wire-size table at compile time, mirroring the eager parser's so the overlay validates frame lengths identically.

Returns
An array indexed by message-type byte, holding the expected wire size for each known message type (zero for unknown types).

Definition at line 336 of file overlay.hpp.

References itch::detail::for_each_message_type().

◆ for_each_message()

auto itch::overlay::for_each_message ( std::span< const std::byte >  data,
const ViewCallback callback 
) -> std::uint64_t
inline

Frames a buffer and invokes callback with a zero-copy MessageView for each well-formed message.

Framing and length validation match Parser: the 2-byte length prefix is honoured, unknown type bytes and undersized frames are skipped. Unlike the eager parser, no fields are decoded; the callback receives a view it can inspect lazily.

Parameters
dataThe raw buffer containing one or more length-prefixed ITCH frames.
callbackInvoked with a MessageView for each well-formed frame found.
Returns
The number of views delivered to callback.

Definition at line 359 of file overlay.hpp.

References message_type, and SIZE_TABLE.

Variable Documentation

◆ SIZE_TABLE

constexpr auto itch::overlay::SIZE_TABLE = build_size_table()
inlineconstexpr

Definition at line 346 of file overlay.hpp.

Referenced by for_each_message().