root/isimud/exchanges/FIX/v5.0sp2/messages_impl.hpp

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. is_valid
  2. is_valid
  3. is_valid
  4. is_valid
  5. is_valid
  6. is_valid
  7. is_valid
  8. is_valid
  9. is_valid
  10. is_valid
  11. is_valid
  12. is_valid
  13. is_valid
  14. is_valid
  15. is_valid
  16. is_valid
  17. is_valid
  18. is_valid
  19. is_valid
  20. is_valid
  21. is_valid
  22. is_valid
  23. is_valid
  24. is_valid
  25. is_valid
  26. is_valid

   1 /******************************************************************************
   2 ** $Header: svn+ssh://jmmcg@svn.code.sf.net/p/libjmmcg/code/trunk/libjmmcg/isimud/exchanges/FIX/v5.0sp2/messages_impl.hpp 2330 2018-09-26 03:49:30Z jmmcg $
   3 **
   4 ** Copyright (c) 2015 by J.M.McGuiness, isimud@hussar.me.uk
   5 **
   6 ** This library is free software; you can redistribute it and/or
   7 ** modify it under the terms of the GNU Lesser General Public
   8 ** License as published by the Free Software Foundation; either
   9 ** version 2.1 of the License, or (at your option) any later version.
  10 **
  11 ** This library is distributed in the hope that it will be useful,
  12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14 ** Lesser General Public License for more details.
  15 **
  16 ** You should have received a copy of the GNU Lesser General Public
  17 ** License along with this library; if not, write to the Free Software
  18 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19 */
  20 
  21 namespace isimud { namespace exchanges { namespace FIX { namespace v5_0sp2 {
  22 
  23 template<class Msg>
  24 inline constexpr bool
  25 VersionSpecific::is_valid(Msg const &) noexcept(true) {
  26         return true;
  27 }
  28 
  29 template<class Msg>
  30 inline bool
  31 LogoutRequestSpecific::is_valid(Msg const &m) noexcept(true) {
  32         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  33         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  34         // TODO
  35         return has_MsgType;
  36 }
  37 
  38 template<class Msg>
  39 inline bool
  40 HeartbeatSpecific::is_valid(Msg const &m) noexcept(true) {
  41         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  42         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  43         return has_MsgType;
  44 }
  45 
  46 template<class Msg>
  47 inline bool
  48 LogonSpecific::is_valid(Msg const &m) noexcept(true) {
  49         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  50         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  51         const bool has_username=m.template search<common::FieldsFast::Username>();
  52         const bool has_password=m.template search<common::FieldsFast::Password>();
  53         return has_MsgType && has_username && has_password;
  54 }
  55 
  56 template<class Msg>
  57 inline bool
  58 NewOrderSingleSpecific::is_valid(Msg const &m) noexcept(true) {
  59         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  60         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  61         const bool has_ClOrdID=m.template search<common::FieldsFast::ClOrdID>();
  62         const bool has_Side=m.template search<common::FieldsFast::Side>();
  63         const bool has_TransactTime=m.template search<common::FieldsFast::TransactTime>();
  64         const bool has_OrderQty=m.template search<common::FieldsFast::OrderQty>();
  65         const bool has_OrdType=m.template search<common::FieldsFast::OrdType>();
  66         const bool has_SecurityIDSource=m.template search<common::FieldsFast::SecurityIDSource>();
  67         const bool is_ISIN=(has_SecurityIDSource && (m.template find<common::FieldsFast::SecurityIDSource>().first[0]==common::SecurityIDSource::ISIN));
  68         const bool has_ISIN=(is_ISIN && m.template search<common::FieldsFast::SecurityID>());
  69         return has_MsgType && has_ClOrdID && has_Side && has_TransactTime && has_OrderQty && has_OrdType && has_ISIN;
  70 }
  71 
  72 template<class Msg>
  73 inline bool
  74 OrderCancelRequestSpecific::is_valid(Msg const &m) noexcept(true) {
  75         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  76         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  77         const bool has_ClOrdID=m.template search<common::FieldsFast::ClOrdID>();
  78         const bool has_Symbol=m.template search<common::FieldsFast::Symbol>();
  79         const bool has_Side=m.template search<common::FieldsFast::Side>();
  80         const bool has_TransactTime=m.template search<common::FieldsFast::TransactTime>();
  81         const bool has_OrderQty=m.template search<common::FieldsFast::OrderQty>();
  82         return has_MsgType && has_ClOrdID && has_Symbol && has_Side && has_TransactTime && has_OrderQty;
  83 }
  84 
  85 template<class Msg>
  86 inline bool
  87 OrderCancelReplaceSpecific::is_valid(Msg const &m) noexcept(true) {
  88         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
  89         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
  90         const bool has_MsgSeqNum=m.template search<common::FieldsFast::MsgSeqNum>();
  91         const bool has_SenderCompID=m.template search<common::FieldsFast::SenderCompID>();
  92         const bool has_TargetCompID=m.template search<common::FieldsFast::TargetCompID>();
  93         const bool has_SendingTime=m.template search<common::FieldsFast::SendingTime>();
  94         const bool has_ClOrdID=m.template search<common::FieldsFast::ClOrdID>();
  95         const bool has_Symbol=m.template search<common::FieldsFast::Symbol>();
  96         const bool has_Side=m.template search<common::FieldsFast::Side>();
  97         const bool has_TransactTime=m.template search<common::FieldsFast::TransactTime>();
  98         const bool has_OrderQty=m.template search<common::FieldsFast::OrderQty>();
  99         const bool has_OrdType=m.template search<common::FieldsFast::OrdType>();
 100         return has_MsgType && has_MsgSeqNum && has_SenderCompID && has_TargetCompID && has_SendingTime && has_ClOrdID && has_Symbol && has_Side && has_TransactTime && has_OrderQty && has_OrdType;
 101 }
 102 
 103 template<class Msg>
 104 inline bool
 105 ExecutionReportSpecific::is_valid(Msg const &m) noexcept(true) {
 106         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 107         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 108         const bool has_MsgSeqNum=m.template search<common::FieldsFast::MsgSeqNum>();
 109         // TODO verify that the required fields are present.
 110         return has_MsgType && has_MsgSeqNum;
 111 }
 112 
 113 template<class Msg>
 114 inline bool
 115 LogonReplySpecific::is_valid(Msg const &m) noexcept(true) {
 116         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 117         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 118         // TODO verify that the required fields are present.
 119         return has_MsgType;
 120 }
 121 
 122 template<class Msg>
 123 inline bool
 124 LogoutSpecific::is_valid(Msg const &m) noexcept(true) {
 125         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 126         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 127         // TODO verify that the required fields are present.
 128         return has_MsgType;
 129 }
 130 
 131 template<class Msg>
 132 inline bool
 133 CancelOrderSpecific::is_valid(Msg const &m) noexcept(true) {
 134         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 135         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 136         // TODO verify that the required fields are present.
 137         return has_MsgType;
 138 }
 139 
 140 template<class Msg>
 141 inline bool
 142 BusinessMessageRejectSpecific::is_valid(Msg const &m) noexcept(true) {
 143         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 144         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 145         const bool has_RefSeqNum=m.template search<common::FieldsFast::RefSeqNum>();
 146         // TODO verify that the required fields are present.
 147         return has_MsgType && has_RefSeqNum;
 148 }
 149 
 150 template<class Msg>
 151 inline bool
 152 ModifyOrderSpecific::is_valid(Msg const &m) noexcept(true) {
 153         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 154         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 155         // TODO verify that the required fields are present.
 156         return has_MsgType;
 157 }
 158 
 159 template<class Msg>
 160 inline bool
 161 TradeCaptureReportSpecific::is_valid(Msg const &m) noexcept(true) {
 162         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 163         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 164         // TODO verify that the required fields are present.
 165         return has_MsgType;
 166 }
 167 
 168 template<class Msg>
 169 inline bool
 170 TradeCaptureReportRequestSpecific::is_valid(Msg const &m) noexcept(true) {
 171         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 172         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 173         // TODO verify that the required fields are present.
 174         return has_MsgType;
 175 }
 176 
 177 template<class Msg>
 178 inline bool
 179 OrderAcknowledgementSpecific::is_valid(Msg const &m) noexcept(true) {
 180         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 181         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 182         // TODO verify that the required fields are present.
 183         return has_MsgType;
 184 }
 185 
 186 template<class Msg>
 187 inline bool
 188 OrderRejectedSpecific::is_valid(Msg const &m) noexcept(true) {
 189         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 190         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 191         return has_MsgType;
 192 }
 193 
 194 template<class Msg>
 195 inline bool
 196 OrderModifiedSpecific::is_valid(Msg const &m) noexcept(true) {
 197         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 198         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 199         // TODO verify that the required fields are present.
 200         return has_MsgType;
 201 }
 202 
 203 template<class Msg>
 204 inline bool
 205 OrderRestatedSpecific::is_valid(Msg const &m) noexcept(true) {
 206         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 207         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 208         // TODO verify that the required fields are present.
 209         return has_MsgType;
 210 }
 211 
 212 template<class Msg>
 213 inline bool
 214 UserModifyRejectedSpecific::is_valid(Msg const &m) noexcept(true) {
 215         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 216         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 217         // TODO verify that the required fields are present.
 218         return has_MsgType;
 219 }
 220 
 221 template<class Msg>
 222 inline bool
 223 OrderCancelledSpecific::is_valid(Msg const &m) noexcept(true) {
 224         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 225         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 226         // TODO verify that the required fields are present.
 227         return has_MsgType;
 228 }
 229 
 230 template<class Msg>
 231 inline bool
 232 CancelRejectedSpecific::is_valid(Msg const &m) noexcept(true) {
 233         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 234         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 235         const bool has_MsgSeqNum=m.template search<common::FieldsFast::MsgSeqNum>();
 236         const bool has_ClOrdID=m.template search<common::FieldsFast::ClOrdID>();
 237         // TODO verify that the required fields are present.
 238         return has_MsgType && has_MsgSeqNum && has_ClOrdID;
 239 }
 240 
 241 template<class Msg>
 242 inline bool
 243 OrderExecutionSpecific::is_valid(Msg const &m) noexcept(true) {
 244         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 245         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 246         // TODO verify that the required fields are present.
 247         return has_MsgType;
 248 }
 249 
 250 template<class Msg>
 251 inline bool
 252 TradeCaptureReportAckSpecific::is_valid(Msg const &m) noexcept(true) {
 253         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 254         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 255         // TODO verify that the required fields are present.
 256         return has_MsgType;
 257 }
 258 
 259 template<class Msg>
 260 inline bool
 261 TradeCaptureReportRequestAckSpecific::is_valid(Msg const &m) noexcept(true) {
 262         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 263         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 264         // TODO verify that the required fields are present.
 265         return has_MsgType;
 266 }
 267 
 268 template<class Msg>
 269 inline bool
 270 RejectSpecific::is_valid(Msg const &m) noexcept(true) {
 271         auto const &msg_type=m.template find<common::FieldsFast::MsgType>();
 272         const bool has_MsgType=std::equal(msg_type.first, msg_type.second, Msg::msg_version_t::msg_type::value);
 273         // TODO verify that the required fields are present.
 274         return has_MsgType;
 275 }
 276 
 277 } } } }

/* [<][>][^][v][top][bottom][index][help] */