OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  9.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  /// Defines the TES trading session status.
93  {
94  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityStatus);
95  }
96 
97  private:
98  friend class TypedGroup<SecMassStat>;
99 
100  SecMassStat (const GroupInstance& groupInstance)
101  : GroupInstance (groupInstance)
102  {
103  }
104  };
105 
106  class SecMassStats : public TypedGroup<SecMassStat>
107  {
108  private:
109  explicit
110  SecMassStats (const Group& group)
111  : TypedGroup<SecMassStat> (group)
112  {
113  }
114 
116  };
117 
118  /// Mass instrument state change
119  class ONIXS_EUREX_EMDI_API MassInstrumentStateChange : public Message
120  {
121  public:
122  /// Product identifier.
124  {
125  return getUInt32 (Tags::MarketSegmentID);
126  }
127 
128  /// Instrument type of affected instruments.
130  {
131  return getNonZeroIntEnumFieldValue<InstrumentType> (*this, Tags::InstrumentScopeProductComplex);
132  }
133 
134  /// SecurityMassStatus
136  {
137  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityMassStatus);
138  }
139 
140  /// Defines the security mass trading status.
142  {
143  return getIntEnumFieldValue<SecurityTradingStatus> (*this, Tags::SecurityMassTradingStatus);
144  }
145 
146  /// Identifies an event related to a securityMassTradingStatus().
148  {
149  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::SecurityMassTradingEvent);
150  }
151 
152  /// MassSoldOutIndicator
154  {
155  return getNonZeroIntEnumFieldValue<SoldOutIndicator> (*this, Tags::MassSoldOutIndicator);
156  }
157 
158  /// Indicates if product is in the state Fast Market.
159  bool fastMarketIndicator() const
160  {
161  return getUInt32 (Tags::FastMarketIndicator) == 1;
162  }
163 
164  /// Time when request was processed by the matcher (nanoseconds).
165  UInt64 transactTime() const
166  {
167  return getUInt64 (Tags::TransactTime);
168  }
169 
170  /// TESSecurityMassStatus
172  {
173  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityMassStatus);
174  }
175 
176  /// checks existence of optional group
177  /// deprecated - please use Group::size() instead
178  bool hasSecMassStats() const
179  {
180  return (secMassStats().size() != 0);
181  }
182 
183  /// SecMassStats.
185  {
186  return SecMassStats ( getOptionalGroup (Tags::NoRelatedSym) );
187  }
188 
189  /// Indicator for stressed market conditions.
191  {
192  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MassMarketCondition);
193  }
194 
195  /// Indicator for stressed market conditions.
197  {
198  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MarketCondition);
199  }
200 
201  /// LastFragment
203  {
204  return getIntEnumFieldValue<LastFragment>(*this, Tags::LastFragment);
205  }
206 
207  private:
208  friend class MassInstrumentStateChangeWrapper;
209 
210  MassInstrumentStateChange (const void* impl)
211  : Message (impl)
212  {
213  }
214  };
215  }
216  }
217 }
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
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.
InstrumentType::Enum instrumentScopeProductComplex() const
Instrument type of affected instruments.