OnixS C++ Cboe CFE Multicast PITCH Market Data Handler  1.12.1
API documentation
Settlement.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 
28 
29 
30 namespace OnixS {
31 namespace CboeCFE {
32 namespace MarketData {
33 namespace Pitch {
34 
35  /// Settlement messages are normally sent once per day per instrument after settlement prices have been calculated for all applicable instruments on a given business date.
36  struct SettlementMsg : public BinaryMessage
37  {
38  /// Nanosecond offset from last unit timestamp.
41  {
42  return ordinary<Binary4>(2);
43  }
44 
45  /// Symbol right padded with spaces.
46  StrRef symbol() const
48  {
49  return fixedStr<6>(6);
50  }
51 
52  /// Trade Date for the settlement.
55  {
56  return ordinary<BinaryDate>(12);
57  }
58 
59  /// Settlement Price
62  {
63  return ordinary<BinaryPrice>(16);
64  }
65 
66  /// Issue
69  {
70  return enumeration<Issue>(24);
71  }
72 
73  /// Total message size.
75 
76  /// Check the given size.
77  static void validateSize(MessageSize size)
78  {
79  if (ONIXS_BATS_PITCH_CHECK_EXPECT((size < messageSize_), false))
80  throwIncorrectSize("Settlement", size, messageSize_);
81  }
82 
83  /// Initializes instance over given memory block.
84  SettlementMsg(const void* data, MessageSize size)
86  : BinaryMessage(data, size)
87  {
88  }
89  };
90 
91  /// Serializes object into string.
92  ONIXS_CBOECFE_PITCH_API void toStr(std::string&, const SettlementMsg&);
93 
94  /// Serializes object into string.
95  inline std::string toStr(const SettlementMsg& msg)
96  {
97  std::string str;
98  toStr(str, msg);
99  return str;
100  }
101 
102 }
103 }
104 }
105 }
SettlementMsg(const void *data, MessageSize size) ONIXS_BATS_PITCH_NOTHROW
Initializes instance over given memory block.
Definition: Settlement.h:84
ONIXS_CBOECFE_PITCH_API ONIXS_BATS_PITCH_COLDPATH ONIXS_BATS_PITCH_NORETURN void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
#define ONIXS_BATS_PITCH_CONST_OR_CONSTEXPR
Definition: Compiler.h:110
static ONIXS_BATS_PITCH_CONST_OR_CONSTEXPR MessageSize messageSize_
Total message size.
Definition: Settlement.h:74
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:45
Encapsulates services for manipulating little endian encoded messages.
BinaryMessage() ONIXS_BATS_PITCH_NOTHROW
Initializes blank instance referencing to nothing.
Binary2 MessageSize
Aliases message length type.
Definition: Defines.h:90
Settlement messages are normally sent once per day per instrument after settlement prices have been c...
Definition: Settlement.h:36
Issue::Enum issue() const ONIXS_BATS_PITCH_NOTHROW
Issue.
Definition: Settlement.h:67
StrRef symbol() const ONIXS_BATS_PITCH_NOTHROW
Symbol right padded with spaces.
Definition: Settlement.h:46
BinaryDate tradeDate() const ONIXS_BATS_PITCH_NOTHROW
Trade Date for the settlement.
Definition: Settlement.h:53
Binary4 timeOffset() const ONIXS_BATS_PITCH_NOTHROW
Nanosecond offset from last unit timestamp.
Definition: Settlement.h:39
#define ONIXS_BATS_PITCH_NOTHROW
Definition: Compiler.h:107
ONIXS_CBOECFE_PITCH_API void toStr(std::string &, SideIndicator::Enum)
Appends string presentation of object.
BinaryPrice settlementPrice() const ONIXS_BATS_PITCH_NOTHROW
Settlement Price.
Definition: Settlement.h:60
static void validateSize(MessageSize size)
Check the given size.
Definition: Settlement.h:77