JayBeams  0.1
Another project to have fun coding.
reduce_size_message.hpp
Go to the documentation of this file.
1 #ifndef jb_pitch2_reduce_size_message_hpp
2 #define jb_pitch2_reduce_size_message_hpp
3 
4 #include <boost/endian/buffers.hpp>
5 
6 #include <iosfwd>
7 
8 namespace jb {
9 namespace pitch2 {
10 
11 /**
12  * Represent the 'Reduce Size' messages in the PITCH-2.X protocol.
13  *
14  * A full description of the fields can be found in the BATS PITCH-2.X
15  * specification:
16  * https://www.batstrading.com/resources/membership/BATS_MC_PITCH_Specification.pdf
17  *
18  * @tparam quantity_t the type used for the canceled_quantity field.
19  */
20 template <typename quantity_t>
22  /// Capture the quantity_t template parameter as a trait
23  using quantity_type = quantity_t;
24 
25  boost::endian::little_uint8_buf_t length;
26  boost::endian::little_uint8_buf_t message_type;
27  boost::endian::little_uint32_buf_t time_offset;
28  boost::endian::little_uint64_buf_t order_id;
30 };
31 
32 /**
33  * Represent the 'Reduce Size (long)' messages in the PITCH-2.X protocol.
34  *
35  * A full description of the fields can be found in the BATS PITCH-2.X
36  * specification:
37  * https://www.batstrading.com/resources/membership/BATS_MC_PITCH_Specification.pdf
38  */
40  : public reduce_size_message<boost::endian::little_uint32_buf_t> {
41  /// Define the messsage type
42  constexpr static int type = 0x25;
43 };
44 
45 /// Streaming operator for jb::pitch2::reduce_size_message.
46 std::ostream& operator<<(std::ostream& os, reduce_size_long_message const& x);
47 
48 /**
49  * Represent the 'Reduce Size (short)' messages in the PITCH-2.X protocol.
50  *
51  * A full description of the fields can be found in the BATS PITCH-2.X
52  * specification:
53  * https://www.batstrading.com/resources/membership/BATS_MC_PITCH_Specification.pdf
54  */
56  : public reduce_size_message<boost::endian::little_uint16_buf_t> {
57  /// Define the messsage type
58  constexpr static int type = 0x26;
59 };
60 
61 /// Streaming operator for jb::pitch2::reduce_size_message.
62 std::ostream& operator<<(std::ostream& os, reduce_size_short_message const& x);
63 
64 } // namespace pitch2
65 } // namespace jb
66 
67 #endif // jb_pitch2_reduce_size_message_hpp
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::pitch2::add_order_message.
boost::endian::little_uint64_buf_t order_id
boost::endian::little_uint16_buf_t quantity_type
Capture the quantity_t template parameter as a trait.
boost::endian::little_uint8_buf_t length
Represent the &#39;Reduce Size (long)&#39; messages in the PITCH-2.X protocol.
Represent the &#39;Reduce Size (short)&#39; messages in the PITCH-2.X protocol.
Represent the &#39;Reduce Size&#39; messages in the PITCH-2.X protocol.
boost::endian::little_uint8_buf_t message_type
boost::endian::little_uint32_buf_t time_offset
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7