JayBeams  0.1
Another project to have fun coding.
broken_trade_message.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_broken_trade_message_hpp
2 #define jb_itch5_broken_trade_message_hpp
3 
5 
6 namespace jb {
7 namespace itch5 {
8 
9 /**
10  * Represent an 'Broken Trade / Order Execution' message in the
11  * ITCH-5.0 protocol.
12  */
14  constexpr static int message_type = u'B';
15 
17  std::uint64_t match_number;
18 };
19 
20 /// Specialize decoder for a jb::itch5::broken_trade_message
21 template <bool V>
23  /// Please see the generic documentation for jb::itch5::decoder<>::r()
25  r(std::size_t size, void const* buf, std::size_t off) {
27  x.header = decoder<V, message_header>::r(size, buf, off + 0);
28  x.match_number = decoder<V, std::uint64_t>::r(size, buf, off + 11);
29  return x;
30  }
31 };
32 
33 /// Streaming operator for jb::itch5::broken_trade_message.
34 std::ostream& operator<<(std::ostream& os, broken_trade_message const& x);
35 
36 } // namespace itch5
37 } // namespace jb
38 
39 #endif // jb_itch5_broken_trade_message_hpp
Define the header common to all ITCH 5.0 messages.
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
Define the interface to decode ITCH-5.0 messages and message fields.
Definition: decoder.hpp:24
Represent an &#39;Broken Trade / Order Execution&#39; message in the ITCH-5.0 protocol.
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::itch5::add_order_message.
static broken_trade_message r(std::size_t size, void const *buf, std::size_t off)
Please see the generic documentation for jb::itch5::decoder<>::r()
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7