JayBeams  0.1
Another project to have fun coding.
add_order_mpid_message.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_add_order_mpid_message_hpp
2 #define jb_itch5_add_order_mpid_message_hpp
3 
6 
7 namespace jb {
8 namespace itch5 {
9 
10 /**
11  * Represent an 'Add Order with MPID' message in the ITCH-5.0 protocol.
12  */
14  constexpr static int message_type = u'F';
15 
17 
19  : add_order_message(base)
20  , attribution(a) {
21  }
22 
23  add_order_mpid_message() = default;
28 
30  static_cast<add_order_message*>(this)->operator=(rhs);
31  return *this;
32  }
34  static_cast<add_order_message*>(this)->operator=(rhs);
35  return *this;
36  }
37 };
38 
39 /// Specialize decoder for a jb::itch5::add_order_mpid_message
40 template <bool V>
42  /// Please see the generic documentation for jb::itch5::decoder<>::r()
44  r(std::size_t size, void const* buf, std::size_t off) {
46  x = decoder<V, add_order_message>::r(size, buf, off + 0);
47  x.attribution = decoder<V, mpid_t>::r(size, buf, off + 36);
48  return x;
49  }
50 };
51 
52 /// Streaming operator for jb::itch5::add_order_mpid_message.
53 std::ostream& operator<<(std::ostream& os, add_order_mpid_message const& x);
54 
55 } // namespace itch5
56 } // namespace jb
57 
58 #endif // jb_itch5_add_order_mpid_message_hpp
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
add_order_mpid_message & operator=(add_order_mpid_message const &)=default
add_order_mpid_message(add_order_message const &base, mpid_t const &a)
Represent an &#39;Add Order with MPID&#39; message in the ITCH-5.0 protocol.
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.
add_order_mpid_message & operator=(add_order_message &&rhs)
static add_order_mpid_message r(std::size_t size, void const *buf, std::size_t off)
Please see the generic documentation for jb::itch5::decoder<>::r()
add_order_mpid_message & operator=(add_order_message const &rhs)
Represent an &#39;Add Order&#39; message in the ITCH-5.0 protocol.
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7