libjmmcg  build_2176
A C++ library containing an eclectic mix of useful, advanced components.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT > Class Template Reference

A simple, FIX-protocol exchange simulator. More...

#include <processing_rules.hpp>

Inheritance diagram for jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >:
[legend]
Collaboration diagram for jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >:
[legend]

Public Types

using base_t = exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
 
using msg_details_t = typename base_t::msg_details_t
 
using socket_t = typename base_t::socket_t
 
- Public Types inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
using base_t = message_responses< SrcMsgDetails, SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, typename SrcMsgDetails::client_to_exchange_messages_t, SktT >
 
using msg_details_t = typename base_t::src_msg_details_t
 
using socket_t = typename base_t::socket_t
 
using derived_t = typename base_t::derived_t
 
- Public Types inherited from jmmcg::exchanges::common::message_responses< SrcMsgDetails, SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SrcMsgDetails::client_to_exchange_messages_t, SktT >
using src_msg_details_t = SrcMsgDetails
 A type containing the details of the messages that will be received from the client. More...
 
using dest_msg_details_t = SrcMsgDetails
 A type containing the details of the messages that will be sent to the exchange. More...
 
using derived_t = simulator_responses< SrcMsgDetails, SktT >
 
using flow_msg_types = SrcMsgDetails::client_to_exchange_messages_t
 
using socket_t = SktT
 

Public Member Functions

template<class MsgT >
bool process (MsgT const &, socket_t &, socket_t &)
 Reject any message that has not been recognised. More...
 
bool process (typename msg_details_t::ClientHeartbeat const &msg, socket_t &, socket_t &client_skt)
 
- Public Member Functions inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
bool process_msg (Buff const &buff, socket_t &exchg_skt, socket_t &client_skt) FORCE_INLINE
 

Static Public Member Functions

static std::string to_string () noexcept(false)
 
- Static Public Member Functions inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
static std::string to_string () noexcept(false)
 

Static Public Attributes

static constexpr Reason_t logout_reason {'U', 's', 'e', 'r', ' ', 'l', 'o', 'g', 'o', 'u', 't', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd'}
 
static constexpr
msg_details_t::SecurityID_t 
instrumentID =1
 The only valid instrument, all others will be rejected. More...
 
static constexpr
msg_details_t::SecurityID_t 
invalidInstrumentID =2
 An invalid instrument, that will be rejected. More...
 
- Static Public Attributes inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
static constexpr
msg_details_t::UserName_t 
username
 The only valid username. More...
 
static constexpr
msg_details_t::Password_t 
password
 The only valid password. More...
 
static constexpr
msg_details_t::Password_t 
new_password
 The only valid new password. More...
 
static constexpr std::int32_t quantity_limit
 The magic quantity value. More...
 
static constexpr
msg_details_t::Price_t 
price
 For limit orders, this is the price at which the order will be traded, otherwise it will be left "on the market". More...
 
static constexpr
msg_details_t::Price_t 
scaled_price
 For limit orders, this is the native, scaled price at which the order will be traded, otherwise it will be left "on the market", which is used within the simulator. More...
 

Additional Inherited Members

- Protected Types inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
using order_book_t = std::map< typename msg_details_t::ClientOrderID_t, typename msg_details_t::NewOrder >
 
- Protected Member Functions inherited from jmmcg::exchanges::common::message_responses< SrcMsgDetails, SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SrcMsgDetails::client_to_exchange_messages_t, SktT >
bool create_response (Buff const &buff, socket_t &exchg_skt, socket_t &client_skt) FORCE_INLINE
 
- Protected Attributes inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
order_book_t order_book
 
int32_t sequenceNumber
 

Detailed Description

template<class SrcMsgDetails, class SktT>
class jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >

A simple, FIX-protocol exchange simulator.

The behaviour of this simulator is a simplification derived from the specification in [1].

Definition at line 99 of file processing_rules.hpp.

Member Typedef Documentation

template<class SrcMsgDetails , class SktT >
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::base_t = exchanges::common::simulator_responses<SrcMsgDetails, simulator_responses<SrcMsgDetails, SktT>, SktT>

Definition at line 101 of file processing_rules.hpp.

template<class SrcMsgDetails , class SktT >
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::msg_details_t = typename base_t::msg_details_t

Definition at line 102 of file processing_rules.hpp.

template<class SrcMsgDetails , class SktT >
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::socket_t = typename base_t::socket_t

Definition at line 103 of file processing_rules.hpp.

Member Function Documentation

template<class SrcMsgDetails , class SktT >
template<class MsgT >
bool jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::process ( MsgT const &  msg,
socket_t ,
socket_t client_skt 
)
inline

Reject any message that has not been recognised.

Returns
False to continue processing messages, true otherwise.

Definition at line 78 of file processing_rules_impl.hpp.

template<class SrcMsgDetails , class SktT >
bool jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::process ( typename msg_details_t::ClientHeartbeat const &  msg,
socket_t ,
socket_t client_skt 
)
inline

The response to a Heartbeat is nothing.

Returns
False to continue processing messages, true otherwise.

Definition at line 84 of file processing_rules_impl.hpp.

template<class SrcMsgDetails , class SktT >
std::string jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::to_string ( )
inlinestaticnoexcept

Definition at line 89 of file processing_rules_impl.hpp.

Member Data Documentation

template<class SrcMsgDetails , class SktT >
constexpr simulator_responses< SrcMsgDetails, SktT >::msg_details_t::SecurityID_t jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::instrumentID =1
static

The only valid instrument, all others will be rejected.

Definition at line 107 of file processing_rules.hpp.

template<class SrcMsgDetails , class SktT >
constexpr simulator_responses< SrcMsgDetails, SktT >::msg_details_t::SecurityID_t jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::invalidInstrumentID =2
static

An invalid instrument, that will be rejected.

Definition at line 109 of file processing_rules.hpp.

template<class SrcMsgDetails , class SktT >
constexpr Reason_t jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::logout_reason {'U', 's', 'e', 'r', ' ', 'l', 'o', 'g', 'o', 'u', 't', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd'}
static

Definition at line 105 of file processing_rules.hpp.


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