1 #ifndef ISIMUD_EXCHANGES_conversions_fix_to_mit_conversions_hpp 
    2 #define ISIMUD_EXCHANGES_conversions_fix_to_mit_conversions_hpp 
   22 #include "../../exchanges/FIX/v5.0sp2/messages.hpp" 
   23 #include "../../exchanges/FIX/common/conversions.hpp" 
   25 #include "../../exchanges/MIT/BIT/messages.hpp" 
   26 #include "../../exchanges/MIT/JSE/messages.hpp" 
   27 #include "../../exchanges/MIT/LSE/messages.hpp" 
   28 #include "../../exchanges/MIT/OSLO/messages.hpp" 
   29 #include "../../exchanges/MIT/TRQ/messages.hpp" 
   31 #include "core/memops.hpp" 
   37 template<
class Ret> Ret
 
   44 convert<OrderType>(
FIX::
common::field_str_const_range_t 
const &a) {
 
   45    assert((a.second-a.first)==1);
 
   48       return OrderType::Market;
 
   50       return OrderType::Limit;
 
   52       return OrderType::Stop;
 
   54       return OrderType::StopLimit;
 
   56       return static_cast<OrderType>(0);
 
   63 template<> 
inline constexpr TIF 
   64 convert<TIF>(
FIX::
common::field_str_const_range_t 
const &a) {
 
   65    assert((a.second-a.first)==1);
 
   80       return static_cast<TIF>(0);
 
   87 template<> 
constexpr inline Side 
   88 convert<Side>(
FIX::
common::field_str_const_range_t 
const &a) {
 
   89    assert((a.second-a.first)==1);
 
   96       return static_cast<Side>(0);
 
  103 template<
class MsgT, 
class RefData> 
constexpr inline SecurityID_t
 
  106    assert((isin_ptrs.second-isin_ptrs.first)==
sizeof(
typename RefData::lookup_instrument_id_t::key_type));
 
  107    const typename RefData::lookup_instrument_id_t::key_type::element_type isin(
reinterpret_cast<
typename RefData::lookup_instrument_id_t::key_type::element_type::block_t 
const &>(*isin_ptrs.first));
 
  108    const typename RefData::lookup_instrument_id_t::key_type key(isin);
 
  109    auto const &i=ref_data.lookup_instrument_id().find(key);
 
  110    assert(i!=ref_data.lookup_instrument_id().end());
 
  114 template<> 
inline Price_t
 
  115 convert<Price_t>(
FIX::
common::field_str_const_range_t 
const &a) {
 
  116    assert((a.second-a.first)>0);
 
  117    return static_cast<Price_t>(libjmmcg::fromstring<
double>(a.first, a.second-a.first)*implied_decimal_places);
 
  120 template<> 
inline __stdcall 
  130 template<> 
inline __stdcall constexpr 
  136 template<> 
inline __stdcall constexpr 
  146 template<> 
inline __stdcall 
  161 template<> 
inline __stdcall 
  172 template<> 
inline __stdcall 
  190 template<> 
inline __stdcall 
  200 template<> 
inline __stdcall 
  215 template<> 
inline __stdcall 
  225 template<> 
inline __stdcall 
  243 template<> 
inline __stdcall 
  258 template<> 
inline __stdcall 
  269 template<> 
inline __stdcall 
  287 template<> 
inline __stdcall 
  302 template<> 
inline __stdcall 
  313 template<> 
inline __stdcall 
  331 template<> 
inline __stdcall 
  346 template<> 
inline __stdcall 
  357 template<> 
inline __stdcall