ITCH 5.0 Market Data Handler 1.0.0
NASDAQ ITCH 5.0 Market Data Feed Handler
Loading...
Searching...
No Matches
b2bits::nasdaq::MessageHeader Class Reference

Base class for all NASDAQ protocol messages. More...

Detailed Description

Base class for all NASDAQ protocol messages.

Provides a common header structure with message type discrimination and type-safe casting capabilities. All NASDAQ protocol messages derive from this base class.

Note
Uses #pragma pack(1) for exact wire format layout

#include <nasdaq/common/Types.h>

Inheritance diagram for b2bits::nasdaq::MessageHeader:

Public Member Functions

Alpha get_type () const
 Get the message type.
void set_type (Alpha val)
 Set the message type.
template<class T>
const T * cast () const
 Cast to a specific message type (const).
template<class T>
T * cast ()
 Cast to a specific message type (non-const).

Member Function Documentation

◆ cast() [1/2]

template<class T>
T * b2bits::nasdaq::MessageHeader::cast ( )
inline

Cast to a specific message type (non-const).

Performs a static cast to the specified message type. The caller is responsible for ensuring the cast is valid based on get_type().

Template Parameters
TTarget message type
Returns
Pointer to the message as type T

◆ cast() [2/2]

template<class T>
const T * b2bits::nasdaq::MessageHeader::cast ( ) const
inline

Cast to a specific message type (const).

Performs a static cast to the specified message type. The caller is responsible for ensuring the cast is valid based on get_type().

Template Parameters
TTarget message type
Returns
Const pointer to the message as type T

◆ get_type()

Alpha b2bits::nasdaq::MessageHeader::get_type ( ) const
inline

◆ set_type()

void b2bits::nasdaq::MessageHeader::set_type ( Alpha val)
inline

Set the message type.

Parameters
valMessage type character to set

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