OnixS C++ CME MDP Premium Market Data Handler 5.9.0
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
40{
41public:
43 typedef std::vector<std::string> LicenseStores;
44
50
54 : SettingGroup()
55 , stores_(other.stores_)
56 , licenseString_(other.licenseString_)
57 {
58 }
59
61 LicenseSettings& addLicenseStore(const std::string& value)
62 {
63 LicenseStores stores = stores_;
64 stores.push_back(value);
65
66 controlAssignment("License Store", stores_, stores);
67 return *this;
68 }
69
71 LicenseSettings& licenseStore(const std::string& value)
72 {
73 LicenseStores stores;
74 stores.push_back(value);
75
76 controlAssignment("License Store", stores_, stores);
77 return *this;
78 }
79
81 LicenseSettings& licenseString(const std::string& value)
82 {
83 controlAssignment("License String", licenseString_, value);
84 return *this;
85 }
86
89 {
90 return stores_;
91 }
92
94 const std::string& licenseString() const
95 {
96 return licenseString_;
97 }
98
101 {
102 controlChange("Handler Settings", &LicenseSettings::assignNoControl, *this, other);
103
104 return *this;
105 }
106
107private:
108 void assignNoControl(const LicenseSettings& other)
109 {
110 stores_ = other.stores_;
111 licenseString_ = other.licenseString_;
112 }
113
114 LicenseStores stores_;
115 std::string licenseString_;
116
118};
119
122{
123public:
126 : SettingGroup(controller)
127 , channel_(0)
128 , feeds_(controller)
129 , session_(controller)
130 , tradeProcessing_(TradeProcessing::SummaryLevel)
131 , bookManagement_(controller)
132 , recoveryQueueMaxSize_(1000000)
133 , instrumentCache_()
134 , logging_(controller)
135 , listeners_(controller)
136 , licenseSettings_(controller)
137 , dataCenter_(DataCenter::Primary)
138
139 {
140 }
141
145 : SettingGroup()
146 , channel_(other.channel_)
147 , feeds_(other.feeds_)
148 , session_(other.session_)
149 , tradeProcessing_(other.tradeProcessing_)
150 , bookManagement_(other.bookManagement_)
151 , recoveryQueueMaxSize_(other.recoveryQueueMaxSize_)
152 , instrumentCache_(other.instrumentCache_)
153 , logging_(other.logging_)
154 , listeners_(other.listeners_)
155 , licenseSettings_(other.licenseSettings_)
156 , configurationFile_(other.configurationFile_)
157 , dataCenter_(other.dataCenter_)
158 {
159 }
160
163
166 {
167 return channel_;
168 }
169
172 {
173 controlAssignment("Channel Id", channel_, value);
174
175 return *this;
176 }
177
178
180 const std::string& connectivityConfigurationFile() const
181 {
182 return configurationFile_;
183 }
184
191 {
192 return dataCenter_;
193 }
194
216 const std::string& configurationFile,
218 )
219 {
221 "Connectivity Configuration File",
222 &HandlerSettings::assignConnectivityConfiguration,
223 *this,
224 configurationFile,
226 );
227
228 return *this;
229 }
230
232 const FeedSettings& feeds() const
233 {
234 return feeds_;
235 }
236
239 {
240 return feeds_;
241 }
242
245 {
246 return session_;
247 }
248
251 {
252 return session_;
253 }
254
257 {
258 return listeners_;
259 }
260
263 {
264 return listeners_;
265 }
266
269 {
270 return tradeProcessing_;
271 }
272
275 {
276 controlAssignment("Trade Processing Strategy", tradeProcessing_, strategy);
277
278 return *this;
279 }
280
283 {
284 return bookManagement_;
285 }
286
289 {
290 return bookManagement_;
291 }
292
305 {
306 return recoveryQueueMaxSize_;
307 }
308
312 {
313 controlAssignment("Recovery Queue Max Size", recoveryQueueMaxSize_, queueMaxSize);
314
315 return *this;
316 }
317
333 const std::string& instrumentCache() const
334 {
335 return instrumentCache_;
336 }
337
350 HandlerSettings& instrumentCache(const std::string& filename)
351 {
352 controlAssignment("Instrument Cache Path", instrumentCache_, filename);
353
354 return *this;
355 }
356
359 {
360 return logging_;
361 }
362
365 {
366 return logging_;
367 }
368
371 {
372 return licenseSettings_;
373 }
374
377 {
378 return licenseSettings_;
379 }
380
381#if !defined(ONIXS_CMEMDH_NO_DEPRECATED)
382
389 {
390 return logging_.debug();
391 }
392
399 {
400 return logging_.debug();
401 }
402
403#endif // ONIXS_CMEMDH_NO_DEPRECATED
404
407 {
408 controlChange("Handler Settings", &HandlerSettings::assignNoControl, *this, other);
409
410 return *this;
411 }
412
413private:
414 ChannelId channel_;
415
416 FeedSettings feeds_;
417
418 SessionSettings session_;
419
420 TradeProcessing::Enum tradeProcessing_;
421 BookManagement bookManagement_;
422
423 UInt32 recoveryQueueMaxSize_;
424 std::string instrumentCache_;
425
426 LoggingSettings logging_;
427
428 HandlerListeners listeners_;
429
430 LicenseSettings licenseSettings_;
431
432 std::string configurationFile_;
433
434 DataCenter::Enum dataCenter_;
435
436 void assignNoControl(const HandlerSettings& other)
437 {
438 channel_ = other.channel_;
439
440 feeds_.assignNoControl(other.feeds_);
441
442 session_.assignNoControl(other.session_);
443
444 tradeProcessing_ = other.tradeProcessing_;
445
446 bookManagement_.assignNoControl(other.bookManagement_);
447
448 recoveryQueueMaxSize_ = other.recoveryQueueMaxSize_;
449
450 instrumentCache_ = other.instrumentCache_;
451
452 logging_.assignNoControl(other.logging_);
453
454 listeners_.assignNoControl(other.listeners_);
455
456 licenseSettings_.assignNoControl(other.licenseSettings_);
457
458 configurationFile_ = other.configurationFile_;
459
460 dataCenter_ = other.dataCenter_;
461 }
462
464 void assignConnectivityConfiguration(const std::string& configurationFile, DataCenter::Enum dataCenter)
465 {
466 configurationFile_ = configurationFile;
467
468 dataCenter_ = dataCenter;
469 }
470};
471
474void toStr(std::string&, const HandlerSettings&);
475
477inline std::string toStr(const HandlerSettings& settings)
478{
479 std::string str;
480
481 toStr(str, settings);
482
483 return str;
484}
485
489
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
Definition Bootstrap.h:48
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_NULLPTR
Definition Compiler.h:178
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
Parameters affecting book management machinery.
The parameters affecting all feeds involved into market data processing.
Set of listeners to be used by the Handler to reflect various aspects of market data processing.
Handler's configuration settings.
HandlerDebugLoggingSettings & debugLogging()
Parameters affecting logging at debug level.
LoggingSettings & logging()
Settings affecting logging.
const FeedSettings & feeds() const
Reference to parameters related with feeds.
TradeProcessing::Enum tradeProcessing() const
Indicates how trades are processed.
LicenseSettings & licenseSettings()
Settings affecting licensing.
HandlerSettings & operator=(const HandlerSettings &other)
Re-initializes as a copy of the other one.
const LoggingSettings & logging() const
Settings affecting logging.
HandlerSettings(SettingChangeController *controller=nullptr)
Initializes parameters with default values.
const LicenseSettings & licenseSettings() const
Settings affecting licensing.
HandlerSettings & connectivityConfigurationFile(const std::string &configurationFile, DataCenter::Enum dataCenter=DataCenter::Primary)
Path to the connectivity configuration file from which to load feed connection settings.
const std::string & instrumentCache() const
Path to the file where the Handler must store security definitions for further use instead of a live ...
const SessionSettings & session() const
Settings affecting processing session.
HandlerSettings(const HandlerSettings &other)
Initializes the instance as a copy of the other one.
const HandlerDebugLoggingSettings & debugLogging() const
Parameters affecting logging at debug level.
~HandlerSettings()
Cleans everything up.
SessionSettings & session()
Settings affecting processing session.
const HandlerListeners & listeners() const
Listeners associated with the Handler.
FeedSettings & feeds()
Reference to parameters related with feeds.
HandlerSettings & recoveryQueueMaxSize(UInt32 queueMaxSize)
Maximum number of packets to be hold in the internal queue used by the Handler while processing incom...
BookManagement & bookManagement()
Reference to parameters affecting book management.
const std::string & connectivityConfigurationFile() const
Path to the connectivity configuration file.
UInt32 recoveryQueueMaxSize() const
Maximum number of packets transmitted via incremental feed to be hold in internal queue while market ...
HandlerSettings & channel(ChannelId value)
Identifies CME market data channel.
HandlerListeners & listeners()
Listeners associated with the Handler.
ChannelId channel() const
Identifies CME market data channel.
const BookManagement & bookManagement() const
Reference to parameters affecting book management.
HandlerSettings & tradeProcessing(TradeProcessing::Enum strategy)
Defines how trades are processed.
DataCenter::Enum dataCenter() const
Identifies the data center whose parameters are to be extracted from the connectivity configuration f...
HandlerSettings & instrumentCache(const std::string &filename)
Defines path to a file to be used as instrument definition cache.
License configuration settings.
LicenseSettings & operator=(const LicenseSettings &other)
Re-initializes as a copy of the other one.
LicenseSettings(SettingChangeController *controller=nullptr)
Initializes listeners with default values.
const std::string & licenseString() const
Returns the license string.
LicenseSettings(const LicenseSettings &other)
Re-initializes settings as copies of the other ones omitting group belonging.
LicenseSettings & licenseString(const std::string &value)
Assigns the license string.
LicenseSettings & licenseStore(const std::string &value)
Assigns the path to the folder that contains license file(s).
const LicenseStores & licenseStores() const
Returns the folders that contain license file(s).
LicenseSettings & addLicenseStore(const std::string &value)
Adds the path to the folder that contains license file(s).
std::vector< std::string > LicenseStores
Folders that contain license file(s).
The collection of settings affecting use of logging subsystem by the Handler.
Basic set of parameters affecting behavior of the Handler when the market data processing is performe...
void assignNoControl(const SessionSettings &other)
Re-initializes the instance as a copy of the other one and bypassing assignment control.
void controlAssignment(const Char *description, Assignee &assignee, Value value) const
Guarded assignment of the given value to the given variable.
SettingGroup(SettingChangeController *controller=nullptr)
Initializes the group of settings with the given validation services.
void controlChange(const Char *description, void(Changeable::*change)(), Changeable &changeable) const
Guarded invoke of the given routine which assumes complex change or update for the given object.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:202
std::string makeInstrumentCacheFilename(ChannelId)
Makes filename for instrument cache for the given channel.
DebugLoggingSettings HandlerDebugLoggingSettings
UInt32 ChannelId
Identifies CME channel.
Definition Domain.h:28
To optimally service customers and meet regulatory requirements for out-of-region recovery capabiliti...
Enum
To optimally service customers and meet regulatory requirements for out-of-region recovery capabiliti...
@ Primary
Indicates the primary data center, which houses all CME applications.
Represents a service controlling change/update operations for the collections of settings.
Defines different ways trades are processed.