JayBeams  0.1
Another project to have fun coding.
Static Public Member Functions | List of all members
jb::itch5::decoder< validate, T > Struct Template Reference

Define the interface to decode ITCH-5.0 messages and message fields. More...

#include <decoder.hpp>

Static Public Member Functions

static T r (std::size_t size, void const *msg, std::size_t offset)
 Read a single message or field. More...
 

Detailed Description

template<bool validate, typename T>
struct jb::itch5::decoder< validate, T >

Define the interface to decode ITCH-5.0 messages and message fields.

This class is specialized for every message type used to represent ITCH-5.0 messages and their fields.

Template Parameters
validateif true the fields and message lengths are validated. When false, the decoding is faster, but more likely to crash.
Tthe type of message or field to decode.

TODO(#19) all this code should be replaced with Boost.Endian.

Definition at line 24 of file decoder.hpp.

Member Function Documentation

◆ r()

template<bool validate, typename T >
static T jb::itch5::decoder< validate, T >::r ( std::size_t  size,
void const *  msg,
std::size_t  offset 
)
static

Read a single message or field.

Parameters
sizethe size of the message
msgthe contents of the message
offsetwhere in the message to start decoding
Returns
An object of type T representing the contents of the message.
Exceptions
std::runtime_errorif the message cannot be parsed.

Referenced by BOOST_AUTO_TEST_CASE(), jb::itch5::unknown_message::decode_header(), jb::itch5::mold_udp_channel::handle_received(), jb::itch5::process_buffer_mlist< message_handler, head_t, tail_t... >::process(), jb::itch5::process_iostream_mlist(), jb::itch5::decoder< V, order_delete_message >::r(), jb::itch5::decoder< V, order_cancel_message >::r(), jb::itch5::decoder< V, broken_trade_message >::r(), jb::itch5::decoder< validate, std::uint16_t >::r(), jb::itch5::decoder< V, order_executed_message >::r(), jb::itch5::decoder< V, order_replace_message >::r(), jb::itch5::decoder< V, cross_trade_message >::r(), jb::itch5::decoder< V, add_order_message >::r(), jb::itch5::decoder< V, trade_message >::r(), jb::itch5::decoder< V, mwcb_decline_level_message >::r(), jb::itch5::decoder< V, reg_sho_restriction_message >::r(), jb::itch5::decoder< V, mwcb_breach_message >::r(), jb::itch5::decoder< validate, std::uint32_t >::r(), jb::itch5::decoder< V, ipo_quoting_period_update_message >::r(), jb::itch5::decoder< V, stock_trading_action_message >::r(), jb::itch5::decoder< validate, system_event_message >::r(), jb::itch5::decoder< V, add_order_mpid_message >::r(), jb::itch5::decoder< validate, timestamp >::r(), jb::itch5::decoder< validate, std::uint64_t >::r(), jb::itch5::decoder< V, net_order_imbalance_indicator_message >::r(), jb::itch5::decoder< V, order_executed_price_message >::r(), jb::itch5::decoder< V, market_participant_position_message >::r(), jb::itch5::decoder< validate, message_header >::r(), jb::itch5::decoder< validate, seconds_field >::r(), jb::itch5::decoder< validate, char_list_field< V... > >::r(), and jb::itch5::decoder< V, stock_directory_message >::r().


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