OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
Formatting.cpp
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #include "Formatting.h"
21 
23 
24 namespace OnixS {
25 namespace Eurex {
26 namespace MarketData {
27 
28 STRUCT_FORMAT(ServiceDescriptor,
29  << obj.address << ':' << obj.port);
30 
32  << FIELD(serviceA)
33  << FIELD(serviceB));
34 
36  << FIELD(snapshotFeed)
37  << FIELD(incrementalFeed));
38 
39 namespace EOBI {
40 
41 std::string messageName(UInt16 templateId)
42 {
43  switch (templateId)
44  {
45  case Implementation::BaseMsgData::Invalid: return "Invalid"; break;
46  case Implementation::BaseMsgData::Heartbeat: return "Heartbeat"; break;
47  case Implementation::BaseMsgData::OrderAdd: return "OrderAdd"; break;
48  case Implementation::BaseMsgData::OrderModify: return "OrderModify"; break;
49  case Implementation::BaseMsgData::OrderModifySamePriority: return "OrderModifySamePriority"; break;
50  case Implementation::BaseMsgData::OrderDelete: return "OrderDelete"; break;
51  case Implementation::BaseMsgData::OrderMassDelete: return "OrderMassDelete"; break;
52  case Implementation::BaseMsgData::FullOrderExecution: return "FullOrderExecution"; break;
53  case Implementation::BaseMsgData::PartialOrderExecution: return "PartialOrderExecution"; break;
54  case Implementation::BaseMsgData::TradeReversal: return "TradeReversal"; break;
55  case Implementation::BaseMsgData::TradeReport: return "TradeReport"; break;
56  case Implementation::BaseMsgData::ExecutionSummary: return "ExecutionSummary"; break;
57  case Implementation::BaseMsgData::ProductStateChange: return "ProductStateChange"; break;
58  case Implementation::BaseMsgData::InstrumentStateChange: return "InstrumentStateChange"; break;
59  case Implementation::BaseMsgData::AddComplexInstrument: return "AddComplexInstrument"; break;
60  case Implementation::BaseMsgData::AuctionBestBidOffer: return "AuctionBestBidOffer"; break;
61  case Implementation::BaseMsgData::AuctionClearingPrice: return "AuctionClearingPrice"; break;
62  case Implementation::BaseMsgData::CrossRequest: return "CrossRequest"; break;
63  case Implementation::BaseMsgData::QuoteRequest: return "QuoteRequest"; break;
64  case Implementation::BaseMsgData::TopOfBook: return "TopOfBook"; break;
65  case Implementation::BaseMsgData::ProductSummary: return "ProductSummary"; break;
66  case Implementation::BaseMsgData::InstrumentSummary: return "InstrumentSummary"; break;
67  case Implementation::BaseMsgData::SnapshotOrder: return "SnapshotOrder"; break;
68 
69  default: return "Unknown"; break;
70  }
71 
72  return "";
73 }
74 
75 } // EOBI
76 
77 }}}
78 
#define STRUCT_FORMAT(ftype, fformat)
Definition: HandlerLogger.h:63
#define FIELD(var)
Definition: HandlerLogger.h:94
Definition: Defines.h:30
std::string messageName(UInt16 templateId)
Definition: Formatting.cpp:41
unsigned short UInt16
Definition: Numeric.h:38