OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.0.3
API documentation
SnapshotOrder.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 
21 
22 #include "MessageDataStructures.h"
23 
24 #include "../Utils.h"
25 
26 namespace OnixS{
27 namespace Eurex{
28 namespace MarketData{
29 namespace EOBI{
30 
32 
33 std::string SnapshotOrder::msgType() const
34 {
35  return std::string("U21", 3); // implied constant
36 }
37 
39 {
40  return EOBI::MarketDataType::OrderBookMaintenance; // implied constant
41 }
42 
44 {
45  return EOBI::MDUpdateAction::Overlay; // implied constant
46 }
47 
49 {
50 
51 return (getData<SnapshotOrderMsgData>())->OrderDetails.TrdRegTSTimePriority;
52 }
53 
55 {
56  return (getData<SnapshotOrderMsgData>())->OrderDetails.DisplayQty;
57 }
58 
60 {
61  return static_cast<EOBI::Side::Enum>((getData<SnapshotOrderMsgData>())->OrderDetails.Side);
62 }
63 
65 {
66  return static_cast<EOBI::OrderType::Enum>((getData<SnapshotOrderMsgData>())->OrderDetails.OrdType);
67 }
68 
70 {
71  const SnapshotOrderMsgData* msgData = getData<SnapshotOrderMsgData>();
73  return false;
74 
75  price = Decimal(msgData->OrderDetails.Price/100000000.0, 8u);
76  return true;
77 }
78 
79 void SnapshotOrder::toString(std::string& presentation) const
80 {
81  presentation
82  << "SnapshotOrder [msgSeqNum="
83  << msgSeqNum()
84  << ", trdRegTSTimePriority="
86  << ", side="
87  << Side::toString(side())
88  << ", ordType=" << OrderType::toString(ordType());
89 
90  Decimal p;
91  if(price(p))
92  presentation << ", price=" << p.toString();
93 
94  presentation << ", displayQty="
95  << displayQty();
96 
97  presentation << ']';
98 }
99 
100 }}}}
QuantityType displayQty() const
Quantity.
std::string toString() const
Returns text presentation.
Definition: MessageBase.cpp:37
EOBI::MDUpdateAction::Enum mdUpdateAction() const
Update action.
Definition: Group.h:25
Decimal type for better precision.
Definition: Numeric.h:63
EOBI::OrderType::Enum ordType() const
Reserved for future release.
UInt32 msgSeqNum() const
Message sequence number.
Definition: MessageBase.cpp:32
EOBI::MarketDataType::Enum marketDataType() const
Market data type.
UInt64 trdRegTSTimePriority() const
Priority timestamp.
std::string msgType() const
Message type.
void toString(std::string &) const
Appends text presentation to given string.
Definition: Decimal.cpp:217
static std::string toString(Enum value)
Definition: Defines.cpp:602
static std::string toString(Enum value)
Definition: Defines.cpp:142
Implementation::SnapshotOrderMsgData SnapshotOrderMsgData
EOBI::Side::Enum side() const
Side of the order. Value Description: 1 Buy, 2 Sell.
bool price(Decimal &price) const
Price.