libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
isimud::exchanges::FIX::common::Message< MsgVer > Class Template Reference

The basic, underlying type used to implement FIX message reading. More...

#include <messages.hpp>

Inheritance diagram for isimud::exchanges::FIX::common::Message< MsgVer >:
[legend]
Collaboration diagram for isimud::exchanges::FIX::common::Message< MsgVer >:
[legend]

Public Types

using Header_t = Header< MsgVer >
 
using msg_version_t = typename Header_t::msg_version_t
 
using element_type = typename Header_t::element_type
 
using pointer = typename Header_t::pointer
 
using const_pointer = typename Header_t::const_pointer
 
using size_type = typename Header_t::size_type
 
using RejectCode_t = int
 
- Public Types inherited from isimud::exchanges::FIX::common::Header< MsgVer >
enum  : bool { has_static_size =false }
 
enum  : std::size_t { header_t_size =msg_version_t::fix_template_body_length_offset+sizeof(JMMCG_FIX_MSG_BODY_LENGTH_NULL)+1 }
 
using msg_version_t = MsgVer
 
using element_type = char
 
using pointer = element_type *
 
using const_pointer = element_type const *
 
using size_type = std::size_t
 
using MsgTypes_t = common::MsgTypes_t
 

Public Member Functions

constexpr __stdcall Message () noexcept(true)
 Wrap a FIX message contained in an array of chars that has been written into from a socket or elsewhere. More...
 
constexpr __stdcall Message (logon_args_t const &) noexcept(true)
 
constexpr __stdcall Message (logoff_args_t const &) noexcept(true)
 
constexpr __stdcall Message (RejectCode_t const &) noexcept(true)
 
template<class SrcMsg >
__stdcall Message (SrcMsg const &msg)=delete
 Create a message from the source message, into the underlying buffer. More...
 
template<class SrcMsg , class RefData >
__stdcall Message (SrcMsg const &msg, RefData const &ref_data)=delete
 Create a message from the source message, into the underlying buffer. More...
 
template<class RefData , class ... Fields>
 Message (RefData const &ref_data, Fields ... fields)
 
constexpr size_type __fastcall size () const noexcept(true)
 Determine the size of the referenced message. More...
 
template<FieldsFast field>
constexpr bool __fastcall search () const noexcept(true)
 Determine if the specified tag is in the referenced message. More...
 
constexpr bool is_valid () const noexcept(true)
 Verify that the referenced FIX message is valid. More...
 
std::string to_string () const noexcept(false)
 
template<>
 Message (exchanges::BATSBOE::common::OrderExecution const &msg)
 
template<>
 Message (exchanges::BATSBOE::common::OrderRejected const &msg)
 
template<>
 Message (exchanges::BATSBOE::common::CancelRejected const &msg)
 
template<>
 Message (exchanges::BATSBOE::common::UserModifyRejected const &msg)
 
template<>
 Message (exchanges::BATSBOE::common::OrderCancelled const &msg)
 
template<>
__stdcall Message (MIT::BIT::MsgTypes::ExecutionReport const &msg, MIT::BIT::MsgTypes::ref_data_t rd)
 
template<>
__stdcall Message (MIT::JSE::MsgTypes::ExecutionReport const &msg, MIT::JSE::MsgTypes::ref_data_t rd)
 
template<>
__stdcall Message (MIT::LSE::MsgTypes::ExecutionReport const &msg, MIT::LSE::MsgTypes::ref_data_t rd)
 
template<>
__stdcall Message (MIT::OSLO::MsgTypes::ExecutionReport const &msg, MIT::OSLO::MsgTypes::ref_data_t rd)
 
template<>
__stdcall Message (MIT::TRQ::MsgTypes::ExecutionReport const &msg, MIT::TRQ::MsgTypes::ref_data_t rd)
 
template<>
__stdcall Message (MIT::BIT::MsgTypes::ExecutionReport const &msg)
 
template<>
__stdcall Message (MIT::JSE::MsgTypes::ExecutionReport const &msg)
 
template<>
__stdcall Message (MIT::LSE::MsgTypes::ExecutionReport const &msg)
 
template<>
__stdcall Message (MIT::OSLO::MsgTypes::ExecutionReport const &msg)
 
template<>
__stdcall Message (MIT::TRQ::MsgTypes::ExecutionReport const &msg)
 
template<>
__stdcall Message (MIT::BIT::MsgTypes::OrderCancelReject const &msg)
 
template<>
__stdcall Message (MIT::JSE::MsgTypes::OrderCancelReject const &msg)
 
template<>
__stdcall Message (MIT::LSE::MsgTypes::OrderCancelReject const &msg)
 
template<>
__stdcall Message (MIT::OSLO::MsgTypes::OrderCancelReject const &msg)
 
template<>
__stdcall Message (MIT::TRQ::MsgTypes::OrderCancelReject const &msg)
 
template<>
__stdcall Message (MIT::BIT::MsgTypes::Reject const &msg)
 
template<>
__stdcall Message (MIT::JSE::MsgTypes::Reject const &msg)
 
template<>
__stdcall Message (MIT::LSE::MsgTypes::Reject const &msg)
 
template<>
__stdcall Message (MIT::OSLO::MsgTypes::Reject const &msg)
 
template<>
__stdcall Message (MIT::TRQ::MsgTypes::Reject const &msg)
 
template<>
__stdcall Message (MIT::BIT::MsgTypes::BusinessReject const &msg)
 
template<>
__stdcall Message (MIT::JSE::MsgTypes::BusinessReject const &msg)
 
template<>
__stdcall Message (MIT::LSE::MsgTypes::BusinessReject const &msg)
 
template<>
__stdcall Message (MIT::OSLO::MsgTypes::BusinessReject const &msg)
 
template<>
__stdcall Message (MIT::TRQ::MsgTypes::BusinessReject const &msg)
 
- Public Member Functions inherited from isimud::exchanges::FIX::common::Header< MsgVer >
constexpr __stdcall Header () noexcept(true)
 Create a FIX message from an array of chars read from a socket or elsewhere. More...
 
constexpr size_type length () const noexcept(true)
 Determine the total size of the referenced message. More...
 
template<FieldsFast field>
constexpr field_str_range_t __fastcall find () noexcept(true)
 Determine if the specified tag is in the referenced message. More...
 
template<FieldsFast field>
constexpr const field_str_range_t __fastcall find () const noexcept(true)
 Determine if the specified tag is in the referenced message. More...
 
MsgTypes type () const noexcept(true) __attribute__((pure))
 
constexpr bool is_valid () const noexcept(true)
 Verify that the referenced FIX message is valid. More...
 
checksum_t generate_checksum (size_type body_len) const noexcept(true)
 Generate the checksum for the referenced FIX message. More...
 
constexpr bool is_checksum_valid (size_type body_len, const_pointer start_of_checksum_value) const noexcept(true)
 Verify that the checksum of the referenced FIX message is valid. More...
 

Static Public Member Functions

template<FieldsFast field>
static constexpr underlying_fix_data_buffer::iterator add_field_tag (underlying_fix_data_buffer::iterator data) noexcept(true)
 

Static Public Attributes

static constexpr MsgTypes static_type =msg_version_t::msg_type::tag
 
static constexpr const RejectCode_t unknown_msg =1
 

Protected Member Functions

constexpr void finalise_msg (underlying_fix_data_buffer::iterator) noexcept(true)
 
- Protected Member Functions inherited from isimud::exchanges::FIX::common::Header< MsgVer >
template<MsgTypes MsgType>
constexpr underlying_fix_data_buffer::iterator set_header () noexcept(true)
 
template<MsgTypes MsgType, class SrcMsg >
constexpr underlying_fix_data_buffer::iterator set_sequence_num (SrcMsg const &msg) noexcept(true)
 

Additional Inherited Members

- Public Attributes inherited from isimud::exchanges::FIX::common::Header< MsgVer >
enum isimud::exchanges::FIX::common::Header:: { ... }  __attribute__
 
- Protected Attributes inherited from isimud::exchanges::FIX::common::Header< MsgVer >
ALIGN_TO_L1_CACHE char begin_string [sizeof(msg_version_t::MsgVer) -1]
 
jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::BodyLength >::element_type body_length_tag
 
char body_length_value [sizeof(JMMCG_FIX_MSG_BODY_LENGTH_NULL) -1]
 
jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::MsgType >::element_type msg_type_tag
 
underlying_fix_data_buffer data_
 

Detailed Description

template<class MsgVer>
class isimud::exchanges::FIX::common::Message< MsgVer >

The basic, underlying type used to implement FIX message reading.

Definition at line 204 of file messages.hpp.

Member Typedef Documentation

◆ const_pointer

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::const_pointer = typename Header_t::const_pointer

Definition at line 210 of file messages.hpp.

◆ element_type

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::element_type = typename Header_t::element_type

Definition at line 208 of file messages.hpp.

◆ Header_t

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::Header_t = Header<MsgVer>

Definition at line 206 of file messages.hpp.

◆ msg_version_t

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::msg_version_t = typename Header_t::msg_version_t

Definition at line 207 of file messages.hpp.

◆ pointer

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::pointer = typename Header_t::pointer

Definition at line 209 of file messages.hpp.

◆ RejectCode_t

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::RejectCode_t = int

Definition at line 212 of file messages.hpp.

◆ size_type

template<class MsgVer>
using isimud::exchanges::FIX::common::Message< MsgVer >::size_type = typename Header_t::size_type

Definition at line 211 of file messages.hpp.

Constructor & Destructor Documentation

◆ Message() [1/37]

template<class MsgVer >
constexpr __stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( )
inlineexplicitconstexprnoexcept

Wrap a FIX message contained in an array of chars that has been written into from a socket or elsewhere.

Parameters
bThe array of chars that must comprise a valid FIX message which is not automatically checked.

Definition at line 243 of file messages_impl.hpp.

◆ Message() [2/37]

template<class MsgVer >
constexpr __stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( logon_args_t const &  )
inlineexplicitconstexprnoexcept

Definition at line 248 of file messages_impl.hpp.

◆ Message() [3/37]

template<class MsgVer >
constexpr __stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( logoff_args_t const &  )
inlineexplicitconstexprnoexcept

Definition at line 253 of file messages_impl.hpp.

◆ Message() [4/37]

template<class MsgVer >
constexpr __stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( RejectCode_t const &  )
inlineexplicitconstexprnoexcept

Definition at line 258 of file messages_impl.hpp.

◆ Message() [5/37]

template<class MsgVer>
template<class SrcMsg >
__stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( SrcMsg const &  msg)
explicitdelete

Create a message from the source message, into the underlying buffer.

In debug builds the validity of the FIX message is checked.

If an error is generated, then this function will need to be specialised for the particular SrcMsg.

Parameters
msgThe source message from which the target message should be created.

◆ Message() [6/37]

template<class MsgVer>
template<class SrcMsg , class RefData >
__stdcall isimud::exchanges::FIX::common::Message< MsgVer >::Message ( SrcMsg const &  msg,
RefData const &  ref_data 
)
delete

Create a message from the source message, into the underlying buffer.

In debug builds the validity of the FIX message is checked.

If an error is generated, then this function will need to be specialised for the particular SrcMsg.

Parameters
msgThe source message from which the target message should be created.
ref_dataThe reference data to map from exchange-based instrument identifiers to client-based symbology.

◆ Message() [7/37]

template<class MsgVer>
template<class RefData , class ... Fields>
isimud::exchanges::FIX::common::Message< MsgVer >::Message ( RefData const &  ref_data,
Fields ...  fields 
)

◆ Message() [8/37]

◆ Message() [9/37]

◆ Message() [10/37]

◆ Message() [11/37]

◆ Message() [12/37]

◆ Message() [13/37]

◆ Message() [14/37]

◆ Message() [15/37]

◆ Message() [16/37]

◆ Message() [17/37]

◆ Message() [18/37]

◆ Message() [19/37]

◆ Message() [20/37]

◆ Message() [21/37]

◆ Message() [22/37]

◆ Message() [23/37]

◆ Message() [24/37]

◆ Message() [25/37]

◆ Message() [26/37]

◆ Message() [27/37]

◆ Message() [28/37]

◆ Message() [29/37]

◆ Message() [30/37]

◆ Message() [31/37]

◆ Message() [32/37]

◆ Message() [33/37]

◆ Message() [34/37]

◆ Message() [35/37]

◆ Message() [36/37]

◆ Message() [37/37]

Member Function Documentation

◆ add_field_tag()

template<class MsgVer >
template<FieldsFast field>
constexpr underlying_fix_data_buffer::iterator isimud::exchanges::FIX::common::Message< MsgVer >::add_field_tag ( underlying_fix_data_buffer::iterator  data)
inlinestaticconstexprnoexcept

Definition at line 290 of file messages_impl.hpp.

◆ finalise_msg()

template<class MsgVer >
constexpr void isimud::exchanges::FIX::common::Message< MsgVer >::finalise_msg ( underlying_fix_data_buffer::iterator  data)
inlineconstexprprotectednoexcept

Definition at line 311 of file messages_impl.hpp.

◆ is_valid()

template<class MsgVer >
constexpr bool isimud::exchanges::FIX::common::Message< MsgVer >::is_valid ( ) const
inlineconstexprnoexcept

Verify that the referenced FIX message is valid.

Returns
True is the referenced FIX message is valid, false otherwise.

Definition at line 283 of file messages_impl.hpp.

◆ search()

template<class MsgVer >
template<FieldsFast field>
constexpr bool __fastcall isimud::exchanges::FIX::common::Message< MsgVer >::search ( ) const
inlineconstexprnoexcept

Determine if the specified tag is in the referenced message.

Parameters
fieldThe field to be found. Note that the range must contain the field otherwise the behaviour shall be undefined.
Returns
True if the specified tag was found in the referenced message.

Definition at line 273 of file messages_impl.hpp.

◆ size()

template<class MsgVer >
constexpr Message< MsgVer >::size_type __fastcall isimud::exchanges::FIX::common::Message< MsgVer >::size ( void  ) const
inlineconstexprnoexcept

Determine the size of the referenced message.

The referenced message must be valid.

Returns
The size of the body of the message, excluding the version, size (itself) and checksum fields.
See also
length()

Definition at line 264 of file messages_impl.hpp.

◆ to_string()

template<class MsgVer >
std::string isimud::exchanges::FIX::common::Message< MsgVer >::to_string ( ) const
inlinenoexcept

Definition at line 299 of file messages_impl.hpp.

Member Data Documentation

◆ static_type

template<class MsgVer>
constexpr MsgTypes isimud::exchanges::FIX::common::Message< MsgVer >::static_type =msg_version_t::msg_type::tag
inlinestaticconstexpr

Definition at line 214 of file messages.hpp.

◆ unknown_msg

template<class MsgVer>
constexpr const RejectCode_t isimud::exchanges::FIX::common::Message< MsgVer >::unknown_msg =1
inlinestaticconstexpr

Definition at line 215 of file messages.hpp.


The documentation for this class was generated from the following files: