OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  16.0.1
API documentation
ComplexInstrumentUpdate.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  class UpdateInstrumentLegs : public TypedGroup<InstrumentLeg>
35  {
36  private:
37  explicit
38  UpdateInstrumentLegs (const Group& group)
40  {
41  }
42 
44  };
45 
46  /// Complex instrument update
47  class ONIXS_EUREX_EMDI_API ComplexInstrumentUpdate : public Message
48  {
49  public:
50  /// Security Update Action.
52  {
53  StringRef val;
54  return get (Tags::SecurityUpdateAction).toStringRef (val) ? val : StringRef();
55  }
56 
57  /// Instrument identifier.
59  {
60  return getInt64 (Tags::SecurityID);
61  }
62 
63  /// Security description
65  {
66  StringRef val;
67  return get (Tags::SecurityDesc).toStringRef (val) ? val : StringRef();
68  }
69 
70  /// Type of security.
72  {
73  return getIntEnumFieldValue<SecurityType> (*this, Tags::SecurityType);
74  }
75 
76  /// Standard strategy type for complex instruments, e.g. BER-C.
77  bool securitySubType (UInt32& type) const
78  {
79  return get (Tags::SecuritySubType).toNumber (type);
80  }
81 
82  /// Type of Market Data update action
84  {
85  return getNonZeroIntEnumFieldValue<InstrumentType> (*this, Tags::ProductComplex);
86  }
87 
88  /// Common integer multiple of the option legs for Option Volatility Strategies.
89  bool legRatioMultiplier(UInt32& type) const
90  {
91  return get(Tags::LegRatioMultiplier).toNumber(type);
92  }
93 
94  ///
95  bool quantityScalingFactor(UInt32& type) const
96  {
97  return get(Tags::QuantityScalingFactor).toNumber(type);
98  }
99 
100  /// Legs.
102  {
103  return UpdateInstrumentLegs ( getGroup (Tags::NoLegs) );
104  }
105 
106  /// Product identifier.
108  {
109  return getGroup (Tags::NoMarketSegments).at (0).getUInt32 (Tags::MarketSegmentID);
110  }
111 
112  /// Implied market indicator
114  {
115  return getIntEnumFieldValue<ImpliedMarketIndicator> (getGroup (Tags::NoMarketSegments).at (0), Tags::ImpliedMarketIndicator)
117  }
118 
119  /// Creation time of complex instruments.
120  bool transactTime (UInt64& time) const
121  {
122  return get (Tags::TransactTime).toNumber (time);
123  }
124 
125  private:
126  friend class ComplexInstrumentUpdateWrapper;
127 
128  ComplexInstrumentUpdate (const void* impl)
129  : Message (impl)
130  {
131  }
132  };
133  }
134  }
135 }
bool legRatioMultiplier(UInt32 &type) const
Common integer multiple of the option legs for Option Volatility Strategies.
SecurityId securityId() const
Instrument identifier.
StringRef securityUpdateAction() const
Security Update Action.
const Tag SecurityUpdateAction
Definition: Tags.h:90
bool transactTime(UInt64 &time) const
Creation time of complex instruments.
const Tag QuantityScalingFactor
Definition: Tags.h:343
InstrumentType::Enum productComplex() const
Type of Market Data update action.
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
const Tag LegRatioMultiplier
Definition: Tags.h:287
SecurityType::Enum securityType() const
Type of security.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
bool impliedMarketIndicator() const
Implied market indicator.
MarketSegmentId marketSegmentId() const
Product identifier.
StringRef securityDesc() const
Security description.
const Tag ImpliedMarketIndicator
Definition: Tags.h:96
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
bool securitySubType(UInt32 &type) const
Standard strategy type for complex instruments, e.g. BER-C.