OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  11.0.0
API documentation
MassInstrumentStateChange.h
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 #pragma once
21 
27 
28 namespace OnixS
29 {
30  namespace Eurex
31  {
32  namespace MarketData
33  {
34  ///
35  struct ONIXS_EUREX_EMDI_API LastFragment
36  {
37  enum Enum
38  {
39  /// Used to identify absence of value.
40  Undefined = -1,
41 
42  /// NotLastMessage
43  NotLastMessage = 0,
44 
45  /// LastMessage
47  };
48  };
49 
50  ///
51  class ONIXS_EUREX_EMDI_API SecMassStat : GroupInstance
52  {
53  public:
54 
55  /// Instrument identifier.
57  {
58  return getInt64 (Tags::SecurityID);
59  }
60 
61  /// Security Status.
63  {
64  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityStatus);
65  }
66 
67  /// Defines the security trading status.
69  {
70  return getIntEnumFieldValue<SecurityTradingStatus> (*this, Tags::SecurityTradingStatus);
71  }
72 
73  /// Indicator for stressed market conditions.
75  {
76  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MarketCondition);
77  }
78 
79  /// Identifies an event related to a securityTradingStatus()
81  {
82  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::SecurityTradingEvent);
83  }
84 
85  /// Identifies the sold out status (applicable for continuous auction trading model only).
87  {
88  return getNonZeroIntEnumFieldValue<SoldOutIndicator>(*this, Tags::SoldOutIndicator);
89  }
90 
91  /// Upper boundary price.
92  bool highPx(Decimal& price) const
93  {
94  return get(Tags::HighPx).toNumber(price);
95  }
96 
97  /// Lower boundary price.
98  bool lowPx(Decimal& price) const
99  {
100  return get(Tags::LowPx).toNumber(price);
101  }
102 
103  /// Defines the TES trading session status.
105  {
106  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityStatus);
107  }
108 
109  private:
110  friend class TypedGroup<SecMassStat>;
111 
112  SecMassStat (const GroupInstance& groupInstance)
113  : GroupInstance (groupInstance)
114  {
115  }
116  };
117 
118  class SecMassStats : public TypedGroup<SecMassStat>
119  {
120  private:
121  explicit
122  SecMassStats (const Group& group)
123  : TypedGroup<SecMassStat> (group)
124  {
125  }
126 
128  };
129 
130  /// Mass instrument state change
131  class ONIXS_EUREX_EMDI_API MassInstrumentStateChange : public Message
132  {
133  public:
134  /// Product identifier.
136  {
137  return getUInt32 (Tags::MarketSegmentID);
138  }
139 
140  /// Instrument type of affected instruments.
142  {
143  return getNonZeroIntEnumFieldValue<InstrumentType> (*this, Tags::InstrumentScopeProductComplex);
144  }
145 
146  /// SecurityMassStatus
148  {
149  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityMassStatus);
150  }
151 
152  /// Defines the security mass trading status.
154  {
155  return getIntEnumFieldValue<SecurityTradingStatus> (*this, Tags::SecurityMassTradingStatus);
156  }
157 
158  /// Identifies an event related to a securityMassTradingStatus().
160  {
161  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::SecurityMassTradingEvent);
162  }
163 
164  /// MassSoldOutIndicator
166  {
167  return getNonZeroIntEnumFieldValue<SoldOutIndicator> (*this, Tags::MassSoldOutIndicator);
168  }
169 
170  /// Indicates if product is in the state Fast Market.
171  bool fastMarketIndicator() const
172  {
173  return getUInt32 (Tags::FastMarketIndicator) == 1;
174  }
175 
176  /// Time when request was processed by the matcher (nanoseconds).
177  UInt64 transactTime() const
178  {
179  return getUInt64 (Tags::TransactTime);
180  }
181 
182  /// TESSecurityMassStatus
184  {
185  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityMassStatus);
186  }
187 
188  /// checks existence of optional group
189  /// deprecated - please use Group::size() instead
190  bool hasSecMassStats() const
191  {
192  return (secMassStats().size() != 0);
193  }
194 
195  /// SecMassStats.
197  {
198  return SecMassStats ( getOptionalGroup (Tags::NoRelatedSym) );
199  }
200 
201  /// Indicator for stressed market conditions.
203  {
204  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MassMarketCondition);
205  }
206 
207  /// Indicator for stressed market conditions.
209  {
210  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MarketCondition);
211  }
212 
213  /// LastFragment
215  {
216  return getIntEnumFieldValue<LastFragment>(*this, Tags::LastFragment);
217  }
218 
219  private:
220  friend class MassInstrumentStateChangeWrapper;
221 
222  MassInstrumentStateChange (const void* impl)
223  : Message (impl)
224  {
225  }
226  };
227  }
228  }
229 }
const Tag TESSecurityMassStatus
Definition: Tags.h:272
const Tag SecurityMassTradingEvent
Definition: Tags.h:188
SecurityTradingEvent::Enum securityTradingEvent() const
Identifies an event related to a securityTradingStatus()
UInt64 transactTime() const
Time when request was processed by the matcher (nanoseconds).
SecurityTradingStatus::Enum securityTradingStatus() const
Defines the security trading status.
MarketCondition::Enum marketCondition() const
Indicator for stressed market conditions.
SecurityStatus::Enum tesSecurityMassStatus() const
TESSecurityMassStatus.
const Tag MassSoldOutIndicator
Definition: Tags.h:271
const Tag MassMarketCondition
Definition: Tags.h:234
const Tag SecurityTradingStatus
Definition: Tags.h:61
SecurityTradingStatus::Enum securityMassTradingStatus() const
Defines the security mass trading status.
bool fastMarketIndicator() const
Indicates if product is in the state Fast Market.
const Tag InstrumentScopeProductComplex
Definition: Tags.h:115
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
MarketCondition::Enum marketCondition() const
Indicator for stressed market conditions.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
MarketSegmentId marketSegmentId() const
Product identifier.
SoldOutIndicator::Enum soldOutIndicator() const
Identifies the sold out status (applicable for continuous auction trading model only).
SecurityId securityId() const
Instrument identifier.
SecurityStatus::Enum securityMassStatus() const
SecurityMassStatus.
const Tag SecurityMassTradingStatus
Definition: Tags.h:116
const Tag SecurityMassStatus
Definition: Tags.h:270
const Tag SecurityTradingEvent
Definition: Tags.h:189
SecurityTradingEvent::Enum securityMassTradingEvent() const
Identifies an event related to a securityMassTradingStatus().
SecurityStatus::Enum tesTradSesStatus() const
Defines the TES trading session status.
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
SecurityStatus::Enum securityStatus() const
Security Status.
const Tag FastMarketIndicator
Definition: Tags.h:143
SoldOutIndicator::Enum massSoldOutIndicator() const
MassSoldOutIndicator.
MarketCondition::Enum massMarketCondition() const
Indicator for stressed market conditions.
LastFragment::Enum lastFragment() const
LastFragment.
bool lowPx(Decimal &price) const
Lower boundary price.
InstrumentType::Enum instrumentScopeProductComplex() const
Instrument type of affected instruments.
bool highPx(Decimal &price) const
Upper boundary price.