MessageCracker.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. /* -*- C++ -*- */
  2. /****************************************************************************
  3. ** Copyright (c) 2001-2014
  4. **
  5. ** This file is part of the QuickFIX FIX Engine
  6. **
  7. ** This file may be distributed under the terms of the quickfixengine.org
  8. ** license as defined by quickfixengine.org and appearing in the file
  9. ** LICENSE included in the packaging of this file.
  10. **
  11. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  12. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  13. **
  14. ** See http://www.quickfixengine.org/LICENSE for licensing information.
  15. **
  16. ** Contact ask@quickfixengine.org if any conditions of this licensing are
  17. ** not clear to you.
  18. **
  19. ****************************************************************************/
  20. #ifndef FIX42_MESSAGECRACKER_H
  21. #define FIX42_MESSAGECRACKER_H
  22. #include "../SessionID.h"
  23. #include "../Exceptions.h"
  24. #include "../fix42/Message.h"
  25. namespace FIX42
  26. {
  27. class Heartbeat;
  28. class TestRequest;
  29. class ResendRequest;
  30. class Reject;
  31. class SequenceReset;
  32. class Logout;
  33. class IOI;
  34. class Advertisement;
  35. class ExecutionReport;
  36. class OrderCancelReject;
  37. class Logon;
  38. class News;
  39. class Email;
  40. class NewOrderSingle;
  41. class NewOrderList;
  42. class OrderCancelRequest;
  43. class OrderCancelReplaceRequest;
  44. class OrderStatusRequest;
  45. class Allocation;
  46. class ListCancelRequest;
  47. class ListExecute;
  48. class ListStatusRequest;
  49. class ListStatus;
  50. class AllocationInstructionAck;
  51. class DontKnowTrade;
  52. class QuoteRequest;
  53. class Quote;
  54. class SettlementInstructions;
  55. class MarketDataRequest;
  56. class MarketDataSnapshotFullRefresh;
  57. class MarketDataIncrementalRefresh;
  58. class MarketDataRequestReject;
  59. class QuoteCancel;
  60. class QuoteStatusRequest;
  61. class QuoteAcknowledgement;
  62. class SecurityDefinitionRequest;
  63. class SecurityDefinition;
  64. class SecurityStatusRequest;
  65. class SecurityStatus;
  66. class TradingSessionStatusRequest;
  67. class TradingSessionStatus;
  68. class MassQuote;
  69. class BusinessMessageReject;
  70. class BidRequest;
  71. class BidResponse;
  72. class ListStrikePrice;
  73. class MessageCracker
  74. {
  75. public:
  76. virtual ~MessageCracker() {}
  77. virtual void onMessage( const Message&, const FIX::SessionID& )
  78. { throw FIX::UnsupportedMessageType(); }
  79. virtual void onMessage( Message&, const FIX::SessionID& )
  80. { throw FIX::UnsupportedMessageType(); }
  81. virtual void onMessage( const Heartbeat&, const FIX::SessionID& )
  82. {}
  83. virtual void onMessage( const TestRequest&, const FIX::SessionID& )
  84. {}
  85. virtual void onMessage( const ResendRequest&, const FIX::SessionID& )
  86. {}
  87. virtual void onMessage( const Reject&, const FIX::SessionID& )
  88. {}
  89. virtual void onMessage( const SequenceReset&, const FIX::SessionID& )
  90. {}
  91. virtual void onMessage( const Logout&, const FIX::SessionID& )
  92. {}
  93. virtual void onMessage( const IOI&, const FIX::SessionID& )
  94. { throw FIX::UnsupportedMessageType(); }
  95. virtual void onMessage( const Advertisement&, const FIX::SessionID& )
  96. { throw FIX::UnsupportedMessageType(); }
  97. virtual void onMessage( const ExecutionReport&, const FIX::SessionID& )
  98. { throw FIX::UnsupportedMessageType(); }
  99. virtual void onMessage( const OrderCancelReject&, const FIX::SessionID& )
  100. { throw FIX::UnsupportedMessageType(); }
  101. virtual void onMessage( const Logon&, const FIX::SessionID& )
  102. {}
  103. virtual void onMessage( const News&, const FIX::SessionID& )
  104. { throw FIX::UnsupportedMessageType(); }
  105. virtual void onMessage( const Email&, const FIX::SessionID& )
  106. { throw FIX::UnsupportedMessageType(); }
  107. virtual void onMessage( const NewOrderSingle&, const FIX::SessionID& )
  108. { throw FIX::UnsupportedMessageType(); }
  109. virtual void onMessage( const NewOrderList&, const FIX::SessionID& )
  110. { throw FIX::UnsupportedMessageType(); }
  111. virtual void onMessage( const OrderCancelRequest&, const FIX::SessionID& )
  112. { throw FIX::UnsupportedMessageType(); }
  113. virtual void onMessage( const OrderCancelReplaceRequest&, const FIX::SessionID& )
  114. { throw FIX::UnsupportedMessageType(); }
  115. virtual void onMessage( const OrderStatusRequest&, const FIX::SessionID& )
  116. { throw FIX::UnsupportedMessageType(); }
  117. virtual void onMessage( const Allocation&, const FIX::SessionID& )
  118. { throw FIX::UnsupportedMessageType(); }
  119. virtual void onMessage( const ListCancelRequest&, const FIX::SessionID& )
  120. { throw FIX::UnsupportedMessageType(); }
  121. virtual void onMessage( const ListExecute&, const FIX::SessionID& )
  122. { throw FIX::UnsupportedMessageType(); }
  123. virtual void onMessage( const ListStatusRequest&, const FIX::SessionID& )
  124. { throw FIX::UnsupportedMessageType(); }
  125. virtual void onMessage( const ListStatus&, const FIX::SessionID& )
  126. { throw FIX::UnsupportedMessageType(); }
  127. virtual void onMessage( const AllocationInstructionAck&, const FIX::SessionID& )
  128. { throw FIX::UnsupportedMessageType(); }
  129. virtual void onMessage( const DontKnowTrade&, const FIX::SessionID& )
  130. { throw FIX::UnsupportedMessageType(); }
  131. virtual void onMessage( const QuoteRequest&, const FIX::SessionID& )
  132. { throw FIX::UnsupportedMessageType(); }
  133. virtual void onMessage( const Quote&, const FIX::SessionID& )
  134. { throw FIX::UnsupportedMessageType(); }
  135. virtual void onMessage( const SettlementInstructions&, const FIX::SessionID& )
  136. { throw FIX::UnsupportedMessageType(); }
  137. virtual void onMessage( const MarketDataRequest&, const FIX::SessionID& )
  138. { throw FIX::UnsupportedMessageType(); }
  139. virtual void onMessage( const MarketDataSnapshotFullRefresh&, const FIX::SessionID& )
  140. { throw FIX::UnsupportedMessageType(); }
  141. virtual void onMessage( const MarketDataIncrementalRefresh&, const FIX::SessionID& )
  142. { throw FIX::UnsupportedMessageType(); }
  143. virtual void onMessage( const MarketDataRequestReject&, const FIX::SessionID& )
  144. { throw FIX::UnsupportedMessageType(); }
  145. virtual void onMessage( const QuoteCancel&, const FIX::SessionID& )
  146. { throw FIX::UnsupportedMessageType(); }
  147. virtual void onMessage( const QuoteStatusRequest&, const FIX::SessionID& )
  148. { throw FIX::UnsupportedMessageType(); }
  149. virtual void onMessage( const QuoteAcknowledgement&, const FIX::SessionID& )
  150. { throw FIX::UnsupportedMessageType(); }
  151. virtual void onMessage( const SecurityDefinitionRequest&, const FIX::SessionID& )
  152. { throw FIX::UnsupportedMessageType(); }
  153. virtual void onMessage( const SecurityDefinition&, const FIX::SessionID& )
  154. { throw FIX::UnsupportedMessageType(); }
  155. virtual void onMessage( const SecurityStatusRequest&, const FIX::SessionID& )
  156. { throw FIX::UnsupportedMessageType(); }
  157. virtual void onMessage( const SecurityStatus&, const FIX::SessionID& )
  158. { throw FIX::UnsupportedMessageType(); }
  159. virtual void onMessage( const TradingSessionStatusRequest&, const FIX::SessionID& )
  160. { throw FIX::UnsupportedMessageType(); }
  161. virtual void onMessage( const TradingSessionStatus&, const FIX::SessionID& )
  162. { throw FIX::UnsupportedMessageType(); }
  163. virtual void onMessage( const MassQuote&, const FIX::SessionID& )
  164. { throw FIX::UnsupportedMessageType(); }
  165. virtual void onMessage( const BusinessMessageReject&, const FIX::SessionID& )
  166. {}
  167. virtual void onMessage( const BidRequest&, const FIX::SessionID& )
  168. { throw FIX::UnsupportedMessageType(); }
  169. virtual void onMessage( const BidResponse&, const FIX::SessionID& )
  170. { throw FIX::UnsupportedMessageType(); }
  171. virtual void onMessage( const ListStrikePrice&, const FIX::SessionID& )
  172. { throw FIX::UnsupportedMessageType(); }
  173. virtual void onMessage( Heartbeat&, const FIX::SessionID& ) {}
  174. virtual void onMessage( TestRequest&, const FIX::SessionID& ) {}
  175. virtual void onMessage( ResendRequest&, const FIX::SessionID& ) {}
  176. virtual void onMessage( Reject&, const FIX::SessionID& ) {}
  177. virtual void onMessage( SequenceReset&, const FIX::SessionID& ) {}
  178. virtual void onMessage( Logout&, const FIX::SessionID& ) {}
  179. virtual void onMessage( IOI&, const FIX::SessionID& ) {}
  180. virtual void onMessage( Advertisement&, const FIX::SessionID& ) {}
  181. virtual void onMessage( ExecutionReport&, const FIX::SessionID& ) {}
  182. virtual void onMessage( OrderCancelReject&, const FIX::SessionID& ) {}
  183. virtual void onMessage( Logon&, const FIX::SessionID& ) {}
  184. virtual void onMessage( News&, const FIX::SessionID& ) {}
  185. virtual void onMessage( Email&, const FIX::SessionID& ) {}
  186. virtual void onMessage( NewOrderSingle&, const FIX::SessionID& ) {}
  187. virtual void onMessage( NewOrderList&, const FIX::SessionID& ) {}
  188. virtual void onMessage( OrderCancelRequest&, const FIX::SessionID& ) {}
  189. virtual void onMessage( OrderCancelReplaceRequest&, const FIX::SessionID& ) {}
  190. virtual void onMessage( OrderStatusRequest&, const FIX::SessionID& ) {}
  191. virtual void onMessage( Allocation&, const FIX::SessionID& ) {}
  192. virtual void onMessage( ListCancelRequest&, const FIX::SessionID& ) {}
  193. virtual void onMessage( ListExecute&, const FIX::SessionID& ) {}
  194. virtual void onMessage( ListStatusRequest&, const FIX::SessionID& ) {}
  195. virtual void onMessage( ListStatus&, const FIX::SessionID& ) {}
  196. virtual void onMessage( AllocationInstructionAck&, const FIX::SessionID& ) {}
  197. virtual void onMessage( DontKnowTrade&, const FIX::SessionID& ) {}
  198. virtual void onMessage( QuoteRequest&, const FIX::SessionID& ) {}
  199. virtual void onMessage( Quote&, const FIX::SessionID& ) {}
  200. virtual void onMessage( SettlementInstructions&, const FIX::SessionID& ) {}
  201. virtual void onMessage( MarketDataRequest&, const FIX::SessionID& ) {}
  202. virtual void onMessage( MarketDataSnapshotFullRefresh&, const FIX::SessionID& ) {}
  203. virtual void onMessage( MarketDataIncrementalRefresh&, const FIX::SessionID& ) {}
  204. virtual void onMessage( MarketDataRequestReject&, const FIX::SessionID& ) {}
  205. virtual void onMessage( QuoteCancel&, const FIX::SessionID& ) {}
  206. virtual void onMessage( QuoteStatusRequest&, const FIX::SessionID& ) {}
  207. virtual void onMessage( QuoteAcknowledgement&, const FIX::SessionID& ) {}
  208. virtual void onMessage( SecurityDefinitionRequest&, const FIX::SessionID& ) {}
  209. virtual void onMessage( SecurityDefinition&, const FIX::SessionID& ) {}
  210. virtual void onMessage( SecurityStatusRequest&, const FIX::SessionID& ) {}
  211. virtual void onMessage( SecurityStatus&, const FIX::SessionID& ) {}
  212. virtual void onMessage( TradingSessionStatusRequest&, const FIX::SessionID& ) {}
  213. virtual void onMessage( TradingSessionStatus&, const FIX::SessionID& ) {}
  214. virtual void onMessage( MassQuote&, const FIX::SessionID& ) {}
  215. virtual void onMessage( BusinessMessageReject&, const FIX::SessionID& ) {}
  216. virtual void onMessage( BidRequest&, const FIX::SessionID& ) {}
  217. virtual void onMessage( BidResponse&, const FIX::SessionID& ) {}
  218. virtual void onMessage( ListStrikePrice&, const FIX::SessionID& ) {}
  219. public:
  220. void crack( const Message& message,
  221. const FIX::SessionID& sessionID )
  222. {
  223. const std::string& msgTypeValue
  224. = message.getHeader().getField( FIX::FIELD::MsgType );
  225. if( msgTypeValue == "0" )
  226. onMessage( (const Heartbeat&)message, sessionID );
  227. else
  228. if( msgTypeValue == "1" )
  229. onMessage( (const TestRequest&)message, sessionID );
  230. else
  231. if( msgTypeValue == "2" )
  232. onMessage( (const ResendRequest&)message, sessionID );
  233. else
  234. if( msgTypeValue == "3" )
  235. onMessage( (const Reject&)message, sessionID );
  236. else
  237. if( msgTypeValue == "4" )
  238. onMessage( (const SequenceReset&)message, sessionID );
  239. else
  240. if( msgTypeValue == "5" )
  241. onMessage( (const Logout&)message, sessionID );
  242. else
  243. if( msgTypeValue == "6" )
  244. onMessage( (const IOI&)message, sessionID );
  245. else
  246. if( msgTypeValue == "7" )
  247. onMessage( (const Advertisement&)message, sessionID );
  248. else
  249. if( msgTypeValue == "8" )
  250. onMessage( (const ExecutionReport&)message, sessionID );
  251. else
  252. if( msgTypeValue == "9" )
  253. onMessage( (const OrderCancelReject&)message, sessionID );
  254. else
  255. if( msgTypeValue == "A" )
  256. onMessage( (const Logon&)message, sessionID );
  257. else
  258. if( msgTypeValue == "B" )
  259. onMessage( (const News&)message, sessionID );
  260. else
  261. if( msgTypeValue == "C" )
  262. onMessage( (const Email&)message, sessionID );
  263. else
  264. if( msgTypeValue == "D" )
  265. onMessage( (const NewOrderSingle&)message, sessionID );
  266. else
  267. if( msgTypeValue == "E" )
  268. onMessage( (const NewOrderList&)message, sessionID );
  269. else
  270. if( msgTypeValue == "F" )
  271. onMessage( (const OrderCancelRequest&)message, sessionID );
  272. else
  273. if( msgTypeValue == "G" )
  274. onMessage( (const OrderCancelReplaceRequest&)message, sessionID );
  275. else
  276. if( msgTypeValue == "H" )
  277. onMessage( (const OrderStatusRequest&)message, sessionID );
  278. else
  279. if( msgTypeValue == "J" )
  280. onMessage( (const Allocation&)message, sessionID );
  281. else
  282. if( msgTypeValue == "K" )
  283. onMessage( (const ListCancelRequest&)message, sessionID );
  284. else
  285. if( msgTypeValue == "L" )
  286. onMessage( (const ListExecute&)message, sessionID );
  287. else
  288. if( msgTypeValue == "M" )
  289. onMessage( (const ListStatusRequest&)message, sessionID );
  290. else
  291. if( msgTypeValue == "N" )
  292. onMessage( (const ListStatus&)message, sessionID );
  293. else
  294. if( msgTypeValue == "P" )
  295. onMessage( (const AllocationInstructionAck&)message, sessionID );
  296. else
  297. if( msgTypeValue == "Q" )
  298. onMessage( (const DontKnowTrade&)message, sessionID );
  299. else
  300. if( msgTypeValue == "R" )
  301. onMessage( (const QuoteRequest&)message, sessionID );
  302. else
  303. if( msgTypeValue == "S" )
  304. onMessage( (const Quote&)message, sessionID );
  305. else
  306. if( msgTypeValue == "T" )
  307. onMessage( (const SettlementInstructions&)message, sessionID );
  308. else
  309. if( msgTypeValue == "V" )
  310. onMessage( (const MarketDataRequest&)message, sessionID );
  311. else
  312. if( msgTypeValue == "W" )
  313. onMessage( (const MarketDataSnapshotFullRefresh&)message, sessionID );
  314. else
  315. if( msgTypeValue == "X" )
  316. onMessage( (const MarketDataIncrementalRefresh&)message, sessionID );
  317. else
  318. if( msgTypeValue == "Y" )
  319. onMessage( (const MarketDataRequestReject&)message, sessionID );
  320. else
  321. if( msgTypeValue == "Z" )
  322. onMessage( (const QuoteCancel&)message, sessionID );
  323. else
  324. if( msgTypeValue == "a" )
  325. onMessage( (const QuoteStatusRequest&)message, sessionID );
  326. else
  327. if( msgTypeValue == "b" )
  328. onMessage( (const QuoteAcknowledgement&)message, sessionID );
  329. else
  330. if( msgTypeValue == "c" )
  331. onMessage( (const SecurityDefinitionRequest&)message, sessionID );
  332. else
  333. if( msgTypeValue == "d" )
  334. onMessage( (const SecurityDefinition&)message, sessionID );
  335. else
  336. if( msgTypeValue == "e" )
  337. onMessage( (const SecurityStatusRequest&)message, sessionID );
  338. else
  339. if( msgTypeValue == "f" )
  340. onMessage( (const SecurityStatus&)message, sessionID );
  341. else
  342. if( msgTypeValue == "g" )
  343. onMessage( (const TradingSessionStatusRequest&)message, sessionID );
  344. else
  345. if( msgTypeValue == "h" )
  346. onMessage( (const TradingSessionStatus&)message, sessionID );
  347. else
  348. if( msgTypeValue == "i" )
  349. onMessage( (const MassQuote&)message, sessionID );
  350. else
  351. if( msgTypeValue == "j" )
  352. onMessage( (const BusinessMessageReject&)message, sessionID );
  353. else
  354. if( msgTypeValue == "k" )
  355. onMessage( (const BidRequest&)message, sessionID );
  356. else
  357. if( msgTypeValue == "l" )
  358. onMessage( (const BidResponse&)message, sessionID );
  359. else
  360. if( msgTypeValue == "m" )
  361. onMessage( (const ListStrikePrice&)message, sessionID );
  362. else onMessage( message, sessionID );
  363. }
  364. void crack( Message& message,
  365. const FIX::SessionID& sessionID )
  366. {
  367. FIX::MsgType msgType;
  368. message.getHeader().getField(msgType);
  369. std::string msgTypeValue = msgType.getValue();
  370. if( msgTypeValue == "0" )
  371. onMessage( (Heartbeat&)message, sessionID );
  372. else
  373. if( msgTypeValue == "1" )
  374. onMessage( (TestRequest&)message, sessionID );
  375. else
  376. if( msgTypeValue == "2" )
  377. onMessage( (ResendRequest&)message, sessionID );
  378. else
  379. if( msgTypeValue == "3" )
  380. onMessage( (Reject&)message, sessionID );
  381. else
  382. if( msgTypeValue == "4" )
  383. onMessage( (SequenceReset&)message, sessionID );
  384. else
  385. if( msgTypeValue == "5" )
  386. onMessage( (Logout&)message, sessionID );
  387. else
  388. if( msgTypeValue == "6" )
  389. onMessage( (IOI&)message, sessionID );
  390. else
  391. if( msgTypeValue == "7" )
  392. onMessage( (Advertisement&)message, sessionID );
  393. else
  394. if( msgTypeValue == "8" )
  395. onMessage( (ExecutionReport&)message, sessionID );
  396. else
  397. if( msgTypeValue == "9" )
  398. onMessage( (OrderCancelReject&)message, sessionID );
  399. else
  400. if( msgTypeValue == "A" )
  401. onMessage( (Logon&)message, sessionID );
  402. else
  403. if( msgTypeValue == "B" )
  404. onMessage( (News&)message, sessionID );
  405. else
  406. if( msgTypeValue == "C" )
  407. onMessage( (Email&)message, sessionID );
  408. else
  409. if( msgTypeValue == "D" )
  410. onMessage( (NewOrderSingle&)message, sessionID );
  411. else
  412. if( msgTypeValue == "E" )
  413. onMessage( (NewOrderList&)message, sessionID );
  414. else
  415. if( msgTypeValue == "F" )
  416. onMessage( (OrderCancelRequest&)message, sessionID );
  417. else
  418. if( msgTypeValue == "G" )
  419. onMessage( (OrderCancelReplaceRequest&)message, sessionID );
  420. else
  421. if( msgTypeValue == "H" )
  422. onMessage( (OrderStatusRequest&)message, sessionID );
  423. else
  424. if( msgTypeValue == "J" )
  425. onMessage( (Allocation&)message, sessionID );
  426. else
  427. if( msgTypeValue == "K" )
  428. onMessage( (ListCancelRequest&)message, sessionID );
  429. else
  430. if( msgTypeValue == "L" )
  431. onMessage( (ListExecute&)message, sessionID );
  432. else
  433. if( msgTypeValue == "M" )
  434. onMessage( (ListStatusRequest&)message, sessionID );
  435. else
  436. if( msgTypeValue == "N" )
  437. onMessage( (ListStatus&)message, sessionID );
  438. else
  439. if( msgTypeValue == "P" )
  440. onMessage( (AllocationInstructionAck&)message, sessionID );
  441. else
  442. if( msgTypeValue == "Q" )
  443. onMessage( (DontKnowTrade&)message, sessionID );
  444. else
  445. if( msgTypeValue == "R" )
  446. onMessage( (QuoteRequest&)message, sessionID );
  447. else
  448. if( msgTypeValue == "S" )
  449. onMessage( (Quote&)message, sessionID );
  450. else
  451. if( msgTypeValue == "T" )
  452. onMessage( (SettlementInstructions&)message, sessionID );
  453. else
  454. if( msgTypeValue == "V" )
  455. onMessage( (MarketDataRequest&)message, sessionID );
  456. else
  457. if( msgTypeValue == "W" )
  458. onMessage( (MarketDataSnapshotFullRefresh&)message, sessionID );
  459. else
  460. if( msgTypeValue == "X" )
  461. onMessage( (MarketDataIncrementalRefresh&)message, sessionID );
  462. else
  463. if( msgTypeValue == "Y" )
  464. onMessage( (MarketDataRequestReject&)message, sessionID );
  465. else
  466. if( msgTypeValue == "Z" )
  467. onMessage( (QuoteCancel&)message, sessionID );
  468. else
  469. if( msgTypeValue == "a" )
  470. onMessage( (QuoteStatusRequest&)message, sessionID );
  471. else
  472. if( msgTypeValue == "b" )
  473. onMessage( (QuoteAcknowledgement&)message, sessionID );
  474. else
  475. if( msgTypeValue == "c" )
  476. onMessage( (SecurityDefinitionRequest&)message, sessionID );
  477. else
  478. if( msgTypeValue == "d" )
  479. onMessage( (SecurityDefinition&)message, sessionID );
  480. else
  481. if( msgTypeValue == "e" )
  482. onMessage( (SecurityStatusRequest&)message, sessionID );
  483. else
  484. if( msgTypeValue == "f" )
  485. onMessage( (SecurityStatus&)message, sessionID );
  486. else
  487. if( msgTypeValue == "g" )
  488. onMessage( (TradingSessionStatusRequest&)message, sessionID );
  489. else
  490. if( msgTypeValue == "h" )
  491. onMessage( (TradingSessionStatus&)message, sessionID );
  492. else
  493. if( msgTypeValue == "i" )
  494. onMessage( (MassQuote&)message, sessionID );
  495. else
  496. if( msgTypeValue == "j" )
  497. onMessage( (BusinessMessageReject&)message, sessionID );
  498. else
  499. if( msgTypeValue == "k" )
  500. onMessage( (BidRequest&)message, sessionID );
  501. else
  502. if( msgTypeValue == "l" )
  503. onMessage( (BidResponse&)message, sessionID );
  504. else
  505. if( msgTypeValue == "m" )
  506. onMessage( (ListStrikePrice&)message, sessionID );
  507. else onMessage( message, sessionID );
  508. }
  509. };
  510. }
  511. #endif