1 #ifndef ISIMUD_EXCHANGES_FIX_common_MESSAGES_HPP
2 #define ISIMUD_EXCHANGES_FIX_common_MESSAGES_HPP
23 #include "core/memops.hpp"
24 #include "core/ttypes.hpp"
26 #include <boost/mpl/assert.hpp>
27 #include <boost/date_time/posix_time/posix_time.hpp>
45 using msg_version_t=MsgVer;
46 using element_type=
char;
47 using pointer=element_type *;
48 using const_pointer=element_type
const *;
49 using size_type=
std::size_t;
65 constexpr __stdcall Header()
noexcept(
true);
75 constexpr size_type
length()
const noexcept(
true);
82 template<FieldsFast field>
83 constexpr field_str_range_t
__fastcall find()
noexcept(
true);
89 template<FieldsFast field>
90 constexpr field_str_const_range_t
__fastcall find()
const noexcept(
true);
92 constexpr field_str_const_range_t
__fastcall find_ExDestination()
const noexcept(
true);
93 constexpr ExDestination_t
__fastcall find_MIC()
const noexcept(
true);
95 MsgTypes
type()
const noexcept(
true)
__attribute__((pure));
101 constexpr bool is_valid()
const noexcept(
true);
117 constexpr bool is_checksum_valid(size_type body_len, const_pointer start_of_checksum_value)
const noexcept(
true);
139 }
__attribute__((packed));
150 using msg_version_t=
typename Header_t::msg_version_t;
151 using element_type=
typename Header_t::element_type;
152 using pointer=
typename Header_t::pointer;
153 using const_pointer=
typename Header_t::const_pointer;
154 using size_type=
typename Header_t::size_type;
155 using RejectCode_t=
int;
157 static inline constexpr MsgTypes
static_type=msg_version_t::msg_type::tag;
164 explicit constexpr __stdcall Message()
noexcept(
true);
167 explicit constexpr __stdcall Message(RejectCode_t
const &)
noexcept(
true);
169 __stdcall Message(SeqNum_t seqNum, ClientOrderID_t
const &clID, OrderType
const oT, TIF
const t, Side
const s, SecurityID_t instID, Quantity_t ordQty, Price_t p, ExDestination_t mic)
noexcept(
true);
171 __stdcall Message(SeqNum_t seqNum, ClientOrderID_t
const &clID, ExecType eT, Price_t
const price, SecurityID_t instID, Side s, Quantity_t execdQty, Quantity_t leavesQty, ExDestination_t mic)
noexcept(
true);
197 Message(SrcMsg
const &msg, RefData
const &ref_data)=
delete;
206 Message(RefData
const &ref_data, Fields ... fields);
216 constexpr size_type
__fastcall size()
const noexcept(
true);
223 template<FieldsFast field>
224 constexpr bool __fastcall search()
const noexcept(
true);
230 constexpr bool is_valid()
const noexcept(
true);
234 constexpr ClientOrderID_t
clientOrderID()
const noexcept(
true);
235 constexpr Side
side()
const noexcept(
true);
236 constexpr Price_t
limitPrice()
const noexcept(
true);
237 constexpr Quantity_t
orderQty()
const noexcept(
true);
238 constexpr void orderQty(Quantity_t q)
noexcept(
true);
239 constexpr SecurityID_t
instrumentID()
const noexcept(
true);
241 template<
class OutIter>
242 OutIter
write_ClOrdID(ClientOrderID_t
const &clID, OutIter data)
noexcept(
true);
243 template<
class OutIter>
245 template<
class OutIter>
246 OutIter
write_ExDest(ExDestination_t mic, OutIter data)
noexcept(
true);
248 template<FieldsFast field>
254 }
__attribute__((packed));
256 template<
class MsgVer>
std::ostream &
257 operator<<(
std::ostream &os,
Message<MsgVer>
const &m);