JayBeams  0.1
Another project to have fun coding.
order_cancel_message.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_order_cancel_message_hpp
2 #define jb_itch5_order_cancel_message_hpp
3 
5 
6 namespace jb {
7 namespace itch5 {
8 
9 /**
10  * Represent an 'Order Cancel' message in the ITCH-5.0 protocol.
11  */
13  constexpr static int message_type = u'X';
14 
16  std::uint64_t order_reference_number;
17  std::uint32_t canceled_shares;
18 };
19 
20 /// Specialize decoder for a jb::itch5::order_cancel_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);
29  decoder<V, std::uint64_t>::r(size, buf, off + 11);
30  x.canceled_shares = decoder<V, std::uint32_t>::r(size, buf, off + 19);
31  return x;
32  }
33 };
34 
35 /// Streaming operator for jb::itch5::order_cancel_message.
36 std::ostream& operator<<(std::ostream& os, order_cancel_message const& x);
37 
38 } // namespace itch5
39 } // namespace jb
40 
41 #endif // jb_itch5_order_cancel_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
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::itch5::add_order_message.
static order_cancel_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
Represent an &#39;Order Cancel&#39; message in the ITCH-5.0 protocol.