OnixS C++ Cboe CFE Multicast PITCH Market Data Handler  1.12.1
API documentation
FuturesInstrumentDefinition.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 
22 #include <vector>
23 
30 
31 
32 namespace OnixS {
33 namespace CboeCFE {
34 namespace MarketData {
35 namespace Pitch {
36 
37  ///
39  {
40  /// Nanosecond offset from last unit timestamp or Unit Timestamp in this message if it is non-zero.
43  {
44  return ordinary<Binary4>(2);
45  }
46 
47  /// Symbol right padded with spaces.
48  StrRef symbol() const
50  {
51  return fixedStr<6>(6);
52  }
53 
54  /// Unit timestamp expressed as number of whole seconds since the Epoch (Midnight, January 1, 1970 UTC).
57  {
58  return ordinary<Binary4>(12);
59  }
60 
61  /// Symbol for product or underlying security.
64  {
65  return fixedStr<6>(16);
66  }
67 
68  /// Bit 0 - Variance (1: Variance Future, 0:Standard Future)
71  {
72  return ordinary<BitField>(22);
73  }
74 
75  /// Expiration Date of Instrument.
78  {
79  return ordinary<BinaryDate>(23);
80  }
81 
82  /// Contract size of Instrument.
85  {
86  return ordinary<Binary2>(27);
87  }
88 
89  /// Listing State
92  {
93  return enumeration<ListingState>(29);
94  }
95 
96  /// Minimum Price Increment
99  {
100  return ordinary<BinaryPrice>(30);
101  }
102 
103  /// Values greater than 0 indicate this is a multi-leg strategy.
106  {
107  return ordinary<Binary1>(38);
108  }
109 
110  /// Leg definitions, if any, begin at this offset from the beginning of the message. Possible values
111  /// are 0 (no legs present), 41 (no Variance Block), or 93 (Variance Block present). Cboe reserves the
112  /// right to change these values without prior notice.
115  {
116  return ordinary<Binary1>(39);
117  }
118 
119  /// Variance Future parameter block begins at this offset from the beginning of the message. Possible
120  /// values are 0 (no Variance Block) or 41 (Variance Block present). Cboe reserves the right to change
121  /// these values without prior notice.
124  {
125  return ordinary<Binary1>(40);
126  }
127 
128  /// Populated for single-leg instruments only.
131  {
132  return ordinary<BinaryDate>(41);
133  }
134 
135  /// Variance block
138  {
139  assert(futuresFlags() & 0x01);
140  assert(varianceBlockOffset() != 0);
141 
142  return
143  submessage<Variance>(45, 52);
144  }
145 
146  /// Leg
147  Leg leg(MessageSize index) const
149  {
150  assert(legCount() != 0);
151  assert(legOffset() != 0);
152  assert(index < legCount());
153 
154  return
155  (varianceBlockOffset() == 0)
156  ? submessage<Leg>(45 + 10 * index, 10)
157  : submessage<Leg>((45 + 52) + 10 * index, 10);
158  }
159 
160  /// Initializes instance over given memory block.
163  : BinaryMessage(data, size)
164  {
165  }
166  };
167 
168  /// Serializes object into string.
169  ONIXS_CBOECFE_PITCH_API void toStr(std::string&, const FuturesInstrumentDefinitionMsg&);
170 
171  /// Serializes object into string.
172  inline std::string toStr(const FuturesInstrumentDefinitionMsg& msg)
173  {
174  std::string str;
175  toStr(str, msg);
176  return str;
177  }
178 
179 }
180 }
181 }
182 }
StrRef symbol() const ONIXS_BATS_PITCH_NOTHROW
Symbol right padded with spaces.
ListingState::Enum listingState() const ONIXS_BATS_PITCH_NOTHROW
Listing State.
StrRef reportSymbol() const ONIXS_BATS_PITCH_NOTHROW
Symbol for product or underlying security.
Binary4 timeOffset() const ONIXS_BATS_PITCH_NOTHROW
Nanosecond offset from last unit timestamp or Unit Timestamp in this message if it is non-zero...
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:45
Variance variance() const ONIXS_BATS_PITCH_NOTHROW
Variance block.
Encapsulates services for manipulating little endian encoded messages.
BinaryDate expirationDate() const ONIXS_BATS_PITCH_NOTHROW
Expiration Date of Instrument.
Leg leg(MessageSize index) const ONIXS_BATS_PITCH_NOTHROW
Leg.
BinaryMessage() ONIXS_BATS_PITCH_NOTHROW
Initializes blank instance referencing to nothing.
Binary2 contractSize() const ONIXS_BATS_PITCH_NOTHROW
Contract size of Instrument.
Binary2 MessageSize
Aliases message length type.
Definition: Defines.h:90
BinaryPrice priceIncrement() const ONIXS_BATS_PITCH_NOTHROW
Minimum Price Increment.
BinaryDate contractDate() const ONIXS_BATS_PITCH_NOTHROW
Populated for single-leg instruments only.
BitField futuresFlags() const ONIXS_BATS_PITCH_NOTHROW
Bit 0 - Variance (1: Variance Future, 0:Standard Future)
Binary1 legCount() const ONIXS_BATS_PITCH_NOTHROW
Values greater than 0 indicate this is a multi-leg strategy.
#define ONIXS_BATS_PITCH_NOTHROW
Definition: Compiler.h:107
FuturesInstrumentDefinitionMsg(const void *data, MessageSize size) ONIXS_BATS_PITCH_NOTHROW
Initializes instance over given memory block.
ONIXS_CBOECFE_PITCH_API void toStr(std::string &, SideIndicator::Enum)
Appends string presentation of object.
Binary4 unitTimestamp() const ONIXS_BATS_PITCH_NOTHROW
Unit timestamp expressed as number of whole seconds since the Epoch (Midnight, January 1...