OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
HandlerSettings.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
23#include <string>
24
26
33
35
37
41 : public SettingGroup
42{
43 ChannelId channel_;
44
45 FeedSettings feeds_;
46
48
49 TradeProcessing::Enum tradeProcessing_;
50 BookManagement bookManagement_;
51
52 UInt32 recoveryQueueMaxSize_;
53 std::string instrumentCache_;
54
55 LoggingSettings logging_;
56
57 HandlerListeners listeners_;
58
59 void
60 assignNoControl(
61 const HandlerSettings& other)
62 {
63 channel_ =
64 other.channel_;
65
66 feeds_.
67 assignNoControl(
68 other.feeds_);
69
70 session_.
71 assignNoControl(
72 other.session_);
73
74 tradeProcessing_ =
75 other.tradeProcessing_;
76
77 bookManagement_.
78 assignNoControl(
79 other.bookManagement_);
80
81 recoveryQueueMaxSize_ =
82 other.recoveryQueueMaxSize_;
83
84 instrumentCache_ =
85 other.instrumentCache_;
86
87 logging_.
88 assignNoControl(
89 other.logging_);
90
91 listeners_.
92 assignNoControl(
93 other.listeners_);
94 }
95
96public:
100 controller = NULL)
101 : SettingGroup(controller)
102 , channel_(0)
103 , feeds_(controller)
104 , session_(controller)
105 , tradeProcessing_(
106 TradeProcessing::SummaryLevel)
107 , bookManagement_(controller)
108 , recoveryQueueMaxSize_(1000000)
109 , instrumentCache_()
110 , logging_(controller)
111 , listeners_(controller)
112 {
113 }
114
118 const HandlerSettings& other)
119 : SettingGroup()
120 , channel_(
121 other.channel_)
122 , feeds_(
123 other.feeds_)
124 , session_(
125 other.session_)
126 , tradeProcessing_(
127 other.tradeProcessing_)
128 , bookManagement_(
129 other.bookManagement_)
130 , recoveryQueueMaxSize_(
131 other.recoveryQueueMaxSize_)
132 , instrumentCache_(
133 other.instrumentCache_)
134 , logging_(
135 other.logging_)
136 , listeners_(
137 other.listeners_)
138 {
139 }
140
143 {
144 }
145
148 {
149 return channel_;
150 }
151
153 void
155 ChannelId value)
156 {
158 (
159 "Channel Id",
160 channel_,
161 value
162 );
163 }
164
166 const
168 feeds() const
169 {
170 return feeds_;
171 }
172
176 {
177 return feeds_;
178 }
179
183 {
184 return session_;
185 }
186
188 const
190 session() const
191 {
192 return session_;
193 }
194
198 {
199 return listeners_;
200 }
201
203 const
205 listeners() const
206 {
207 return listeners_;
208 }
209
213 {
214 return tradeProcessing_;
215 }
216
218 void
220 TradeProcessing::Enum strategy)
221 {
223 (
224 "Trade Processing Strategy",
225 tradeProcessing_,
226 strategy
227 );
228 }
229
231 const
234 {
235 return bookManagement_;
236 }
237
241 {
242 return bookManagement_;
243 }
244
256 UInt32
258 {
259 return recoveryQueueMaxSize_;
260 }
261
264 void
266 UInt32 queueMaxSize)
267 {
269 (
270 "Recovery Queue Max Size",
271 recoveryQueueMaxSize_,
272 queueMaxSize
273 );
274 }
275
291 const
292 std::string&
294 {
295 return instrumentCache_;
296 }
297
310 void
312 const std::string& filename)
313 {
315 (
316 "Instrument Cache Path",
317 instrumentCache_,
318 filename
319 );
320 }
321
325 {
326 return logging_;
327 }
328
330 const
332 logging() const
333 {
334 return logging_;
335 }
336
337#if !defined (ONIXS_CONFLATEDUDP_NO_DEPRECATED)
338
346 {
347 return logging_.debug();
348 }
349
355 const
358 {
359 return logging_.debug();
360 }
361
362#endif // ONIXS_CONFLATEDUDP_NO_DEPRECATED
363
366 operator =(
367 const HandlerSettings& other)
368 {
370 (
371 "Handler Settings",
372 &HandlerSettings::assignNoControl,
373 *this,
374 other
375 );
376
377 return *this;
378 }
379};
380
382ONIXS_CONFLATEDUDP_EXPORTED
383void
385 std::string&,
386 const HandlerSettings&);
387
389inline
390std::string
392 const
393 HandlerSettings& settings)
394{
395 std::string str;
396
397 toStr(str, settings);
398
399 return str;
400}
401
403ONIXS_CONFLATEDUDP_EXPORTED
404std::string
406
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Definition Bootstrap.h:95
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
Parameters affecting book management machinery.
Handler's configuration settings.
HandlerDebugLoggingSettings & debugLogging()
LoggingSettings & logging()
Settings affecting logging.
void instrumentCache(const std::string &filename)
const FeedSettings & feeds() const
Reference to parameters related with feeds.
TradeProcessing::Enum tradeProcessing() const
Indicates how trades are processed.
const LoggingSettings & logging() const
Settings affecting logging.
const std::string & instrumentCache() const
void channel(ChannelId value)
Identifies CME market data channel.
HandlerSettings(const HandlerSettings &other)
const HandlerDebugLoggingSettings & debugLogging() const
HandlerSettings(SettingAssignController *controller=NULL)
Initializes parameters with default values.
const HandlerListeners & listeners() const
Listeners associated with the Handler.
FeedSettings & feeds()
Reference to parameters related with feeds.
BookManagement & bookManagement()
Reference to parameters affecting book management.
const AdvancedSessionSettings & session() const
Settings affecting processing session.
void recoveryQueueMaxSize(UInt32 queueMaxSize)
AdvancedSessionSettings & session()
Settings affecting processing session.
HandlerListeners & listeners()
Listeners associated with the Handler.
ChannelId channel() const
Identifies CME market data channel.
void tradeProcessing(TradeProcessing::Enum strategy)
Defines how trades are processed.
const BookManagement & bookManagement() const
Reference to parameters affecting book management.
void controlAssignment(const Char *description, Assignee &assignee, Value value) const
ONIXS_CONFLATEDUDP_EXPORTED void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:261
ONIXS_CONFLATEDUDP_EXPORTED std::string makeInstrumentCacheFilename(ChannelId)
Makes filename for instrument cache for the given channel.
DebugLoggingSettings HandlerDebugLoggingSettings
UInt32 ChannelId
Identifies CME channel.
Definition Domain.h:28
Defines different ways trades are processed.