JayBeams  0.1
Another project to have fun coding.
Classes | Namespaces
process_buffer_mlist.hpp File Reference
#include <jb/itch5/decoder.hpp>
#include <jb/itch5/unknown_message.hpp>
#include <cstddef>

Go to the source code of this file.

Classes

class  jb::itch5::process_buffer_mlist< message_handler, message_types >
 Process a buffer with a single message: parse it and call the handler. More...
 
class  jb::itch5::process_buffer_mlist< message_handler >
 Partial specialization for an empty list of messages. More...
 
class  jb::itch5::process_buffer_mlist< message_handler, head_t, tail_t... >
 Partial specialization for a list with at least one message. More...
 

Namespaces

 jb
 The top-level namespace for the JayBeams library.
 
 jb::itch5
 Contains classes and functions to parse NASDAQ ITCH-5.0 messages, more information about ITCH-5.0 can be found at: http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NQTVITCHSpecification.pdf.
 

Class Documentation

◆ jb::itch5::process_buffer_mlist

class jb::itch5::process_buffer_mlist

template<typename message_handler, typename... message_types>
class jb::itch5::process_buffer_mlist< message_handler, message_types >

Process a buffer with a single message: parse it and call the handler.

As messages are received and broken down by jb::itch5::process_iostream_mlist() they need to be parsed and then the right member function on the message handler must be invoked. Two partial specializations of this class implement this functionality. The fully generic version is, in fact, not implemented and this is intentional.

We use a class instead of a standalone function because partial template specialization for functions is not allowed in C++11, though it is trivially simulated, as show here.

Please see jb::itch5::message_handler_concept for a detailed description of the message_handler requirements.

Definition at line 30 of file process_buffer_mlist.hpp.