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

Functions

template<typename Visitor >
constexpr auto for_each_message_type (Visitor &&visitor) -> void
 Invokes visitor.template operator()<MsgType>(type_byte) once for each ITCH 5.0 message type, in a fixed order.
 

Variables

constexpr std::size_t TIMESTAMP_STRUCT_PADDING = sizeof(std::uint64_t) - 6
 The on-wire ITCH timestamp is 48 bits (6 bytes), but every message struct stores it in a 64-bit field, so each struct is exactly two bytes wider than its encoding.
 
template<typename MsgType >
constexpr std::size_t WIRE_SIZE = sizeof(MsgType) - TIMESTAMP_STRUCT_PADDING
 The exact on-wire size, in bytes, of a fully formed message of type T.
 

Function Documentation

◆ for_each_message_type()

template<typename Visitor >
constexpr auto itch::detail::for_each_message_type ( Visitor &&  visitor) -> void
constexpr

Invokes visitor.template operator()<MsgType>(type_byte) once for each ITCH 5.0 message type, in a fixed order.

This is the canonical registry of message types. Both the parser's dispatch table and any other component that needs to enumerate the message set build on it, so the set is defined exactly once.

Template Parameters
VisitorCallable type providing a templated operator()<MsgType>(char).
Parameters
visitorThe visitor invoked once per registered message type.

Definition at line 48 of file wire.hpp.

Referenced by itch::overlay::build_size_table(), and itch::venue::Nasdaq50::for_each_message_type().

Variable Documentation

◆ TIMESTAMP_STRUCT_PADDING

constexpr std::size_t itch::detail::TIMESTAMP_STRUCT_PADDING = sizeof(std::uint64_t) - 6
constexpr

The on-wire ITCH timestamp is 48 bits (6 bytes), but every message struct stores it in a 64-bit field, so each struct is exactly two bytes wider than its encoding.

The timestamp is the only field whose storage width differs from its wire width.

Definition at line 24 of file wire.hpp.

◆ WIRE_SIZE

template<typename MsgType >
constexpr std::size_t itch::detail::WIRE_SIZE = sizeof(MsgType) - TIMESTAMP_STRUCT_PADDING
constexpr

The exact on-wire size, in bytes, of a fully formed message of type T.

Definition at line 28 of file wire.hpp.