OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
SessionSettings.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 
28 
29 /// Defines the way Handler has to handle
30 /// gap in real-time (incremental) data.
33 {
34  /// Integral type serving as
35  /// basement for given enumeration.
36  typedef UInt32 Base;
37 
38  /// Defines the way Handler has to handle
39  /// gap in real-time (incremental) data.
40  enum Enum
41  {
42  /// Handler continues processing of real-time market data.
43  ContinueProcessing
44  };
45 };
46 
47 /// Serializes gap and error handling option.
49 void
50 toStr(
51  std::string&,
53 
54 /// Serializes gap and error handling option.
55 inline
56 std::string
59 {
60  std::string str;
61 
62  toStr(str, handling);
63 
64  return str;
65 }
66 
67 /// Set of parameters affecting Handler's behavior
68 /// when market data processing session is spawned.
70 {
71  GapAndErrorHandlingOptions::Enum gapAndErrorHandling_;
72 
73 public:
74  /// Initializes parameters with default values.
76  : gapAndErrorHandling_(
78  ContinueProcessing)
79  {
80  }
81 
82  /// Cleans everything up.
84  {
85  }
86 
87  /// Defines what Handler should do in case
88  /// of gap in real-time (incremental) data.
89  ///
90  /// @note Default value is GapAndErrorHandling::RecoverMarketState.
93  {
94  return gapAndErrorHandling_;
95  }
96 
97  /// Defines what Handler should do in case
98  /// of gap in real-time (incremental) data.
99  void
102  {
103  gapAndErrorHandling_ = handling;
104  }
105 };
106 
107 /// Serializes market data processing session settings.
109 void
110 toStr(
111  std::string&,
112  const SessionSettings&);
113 
114 /// Serializes market data processing session settings.
115 inline
116 std::string
118  const SessionSettings& settings)
119 {
120  std::string str;
121 
122  toStr(str, settings);
123 
124  return str;
125 }
126 
127 //
128 
129 /// Configures session settings to maintain
130 /// order books using natural refresh. Startup
131 /// recovery is not performed and thus only
132 /// real-time processing takes place.
135 : public SessionSettings
136 {
137  using
138  SessionSettings::
139  gapAndErrorHandling;
140 
141 public:
142  /// Configures session settings
143  /// according to specialization.
145  : SessionSettings()
146  {
147  gapAndErrorHandling(
149  ContinueProcessing);
150  }
151 };
152 
Enum
Defines the way Handler has to handle gap in real-time (incremental) data.
std::string toStr(const SessionSettings &settings)
Serializes market data processing session settings.
Set of parameters affecting Handler&#39;s behavior when market data processing session is spawned...
SessionSettings()
Initializes parameters with default values.
Defines the way Handler has to handle gap in real-time (incremental) data.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition: Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition: Bootstrap.h:111
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition: Compiler.h:160
NaturalRefreshSession()
Configures session settings according to specialization.
Configures session settings to maintain order books using natural refresh.
UInt32 Base
Integral type serving as basement for given enumeration.
void gapAndErrorHandling(GapAndErrorHandlingOptions::Enum handling)
Defines what Handler should do in case of gap in real-time (incremental) data.
GapAndErrorHandlingOptions::Enum gapAndErrorHandling() const
Defines what Handler should do in case of gap in real-time (incremental) data.
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition: Bootstrap.h:115
UInt32 UInt32
uInt32.
Definition: Fields.h:183
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:169