OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
API documentation
Loading...
Searching...
No Matches
MarketSubscription.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Onix Solutions Limited. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited 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 "Enumerations.h"
23#include "Export.h"
24#include "Types.h"
25
26#include <iosfwd>
27#include <set>
28#include <string>
29
30namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
31
85
87ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const MarketSubscription&);
88
90{
91 if (marketType != rhs.marketType)
92 {
93 return false;
94 }
95
97 {
98 return false;
99 }
100
101 if (securityType != rhs.securityType)
102 {
103 return false;
104 }
105
106 if (bookDepth != rhs.bookDepth)
107 {
108 return false;
109 }
110
111 if (priority != rhs.priority)
112 {
113 return false;
114 }
115
116 if (marketIds != rhs.marketIds)
117 {
118 return false;
119 }
120
121 return true;
122}
123
125{
126 return !(*this == rhs);
127}
128
130{
131 if (priority < right.priority)
132 {
133 return true;
134 }
135
136 if (priority > right.priority)
137 {
138 return false;
139 }
140
141 if (marketType < right.marketType)
142 {
143 return true;
144 }
145
146 if (marketType > right.marketType)
147 {
148 return false;
149 }
150
151 if (marketSubType < right.marketSubType)
152 {
153 return true;
154 }
155
156 if (marketSubType > right.marketSubType)
157 {
158 return false;
159 }
160
161 if (securityType < right.securityType)
162 {
163 return true;
164 }
165
166 if (securityType > right.securityType)
167 {
168 return false;
169 }
170
171 if (bookDepth < right.bookDepth)
172 {
173 return true;
174 }
175
176 if (bookDepth > right.bookDepth)
177 {
178 return false;
179 }
180
181 if (marketIds < right.marketIds)
182 {
183 return true;
184 }
185
186 if (marketIds > right.marketIds)
187 {
188 return false;
189 }
190
191 return false;
192}
193
195typedef std::set<MarketSubscription> MarketSubscriptions;
196
197}}}} // namespace OnixS::ICE::iMpact::MarketData
Declare ICE iMpact enumerations.
std::set< MarketId > MarketIds
List of market ID's.
Definition Types.h:48
short MarketType
Alias for market types.
Definition Types.h:36
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
std::set< MarketSubscription > MarketSubscriptions
Collection of market subscriptions.
Enum
Depth of order book constants.
@ NonImplied
The enhanced implication technology is disabled.
Defines which books should be maintained for given market type id.
BookDepth::Enum bookDepth
Specifies book depth.
std::string toString() const
Returns string representation.
static MarketSubscription deserialize(const char *)
Deserialize from a string representation.
MarketSubscription(MarketType marketType=static_cast< MarketType >(-1), MarketSubType::Enum marketSubType=MarketSubType::NonImplied, SecurityType::Enum securityType=SecurityType::Futures, BookDepth::Enum bookDepth=BookDepth::TOP5PL, int priority=0)
Initializes subscription attributes for given market type id, security type and book depth.
bool operator==(const MarketSubscription &) const
Returns true if current instance is equal to the given.
SecurityType::Enum securityType
Specifies type of securities received in product definition response.
bool operator!=(const MarketSubscription &) const
Returns true if current instance is not equal to the given.
bool operator<(const MarketSubscription &) const
Returns true if this market subscription is less than a given.
MarketType marketType
Id of market type for which books should be maintained.