JayBeams  0.1
Another project to have fun coding.
order_executed_price_message.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_order_executed_price_message_hpp
2 #define jb_itch5_order_executed_price_message_hpp
3 
7 
8 namespace jb {
9 namespace itch5 {
10 
11 /**
12  * @typedef printable_t
13  *
14  * Represent the 'Printable' field on a 'Order Executed with Price'
15  * message.
16  */
18 
19 /**
20  * Represent an 'Order Executed with Price' message in the ITCH-5.0 protocol.
21  */
23  constexpr static int message_type = u'C';
24 
25  printable_t printable;
27 
29  order_executed_message const& base, printable_t const& p,
30  price4_t const& px)
32  , printable(p)
33  , execution_price(px) {
34  }
35 
36  order_executed_price_message() = default;
40  operator=(order_executed_price_message const&) = default;
43 
45  static_cast<order_executed_message*>(this)->operator=(rhs);
46  return *this;
47  }
49  static_cast<order_executed_message*>(this)->operator=(rhs);
50  return *this;
51  }
52 };
53 
54 /// Specialize decoder for a jb::itch5::order_executed_price_message
55 template <bool V>
57  /// Please see the generic documentation for jb::itch5::decoder<>::r()
59  r(std::size_t size, void const* buf, std::size_t off) {
61  x = decoder<V, order_executed_message>::r(size, buf, off + 0);
62  x.printable = decoder<V, printable_t>::r(size, buf, off + 31);
63  x.execution_price = decoder<V, price4_t>::r(size, buf, off + 32);
64  return x;
65  }
66 };
67 
68 /// Streaming operator for jb::itch5::order_executed_price_message.
69 std::ostream&
70 operator<<(std::ostream& os, order_executed_price_message const& x);
71 
72 } // namespace itch5
73 } // namespace jb
74 
75 #endif // jb_itch5_order_executed_price_message_hpp
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
Represent an &#39;Order Executed&#39; message in the ITCH-5.0 protocol.
order_executed_price_message & operator=(order_executed_message &&rhs)
char_list_field< u 'Y', u 'N'> printable_t
Represent the &#39;Printable&#39; field on a &#39;Order Executed with Price&#39; message.
order_executed_price_message & operator=(order_executed_price_message const &)=default
Represent an &#39;Order Executed with Price&#39; message in the ITCH-5.0 protocol.
Define the interface to decode ITCH-5.0 messages and message fields.
Definition: decoder.hpp:24
order_executed_price_message(order_executed_message const &base, printable_t const &p, price4_t const &px)
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::itch5::add_order_message.
order_executed_price_message & operator=(order_executed_message const &rhs)
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7
static order_executed_price_message r(std::size_t size, void const *buf, std::size_t off)
Please see the generic documentation for jb::itch5::decoder<>::r()