OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
Replay.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 #include <vector>
25 
28 
30 
31 /// Collection of parameters affecting replay of legacy logs.
34 : public SessionSettings
35 {
36 public:
37  /// Initializes instance with default
38  /// values for each of the parameters.
40  : replace_(false)
41  {
42  }
43 
44  /// Indicates whether session settings detected
45  /// from log file to be replayed have to be replaced
46  /// with settings stored by given instance.
47  bool replace() const
48  {
49  return replace_;
50  }
51 
52  /// Specifies whether session settings detected
53  /// from log file to be replayed have to be replaced
54  /// with settings stored by given instance.
55  void
57  bool value)
58  {
59  replace_ = value;
60  }
61 
62 private:
63  bool replace_;
64 };
65 
66 /// Ordered list of logs to be replayed.
67 typedef
68 std::vector<std::string>
70 
71 /// Defines parameters which affect logs replay.
74 {
75 public:
76  /// Initializes instance with default values.
78  {
79  }
80 
81  /// List of instruments logs to be replayed.
82  /// Must be stored in 'oldest to recent' order.
83  const FileList& logs() const
84  {
85  return logs_;
86  }
87 
88  /// List of instruments logs to be replayed.
89  /// Must be stored in 'oldest to recent' order.
91  {
92  return logs_;
93  }
94 
95  /// Settings related with replay of log files produced
96  /// by older (prior to v4) version of the Handler.
97  const
100  {
101  return sessionSettings_;
102  }
103 
104  /// Settings related with replay of log files produced
105  /// by older (prior to v4) version of the Handler.
107  {
108  return sessionSettings_;
109  }
110 
111 private:
112  FileList logs_;
113  LoggedSessionSettings sessionSettings_;
114 };
115 
116 /// Gathers log files logs which are available for
117 /// given channel and are stored in a given folder.
118 /// Gathering assumes log files are named by log file
119 /// naming routine exposed by given SDK.
121 void
123  FileList&,
124  UInt32,
125  const std::string&);
126 
127 /// Gathers log files logs which are available for
128 /// given channel and are stored in a given folder.
129 /// Gathering assumes log files are named by log file
130 /// naming routine exposed by given SDK. In contrast
131 /// to other overloads, given one allows to define
132 /// prefix pattern for logs to be gathered.
134 void
136  FileList&,
137  UInt32,
138  const std::string&,
139  const std::string&);
140 
LoggedSessionSettings & sessionSettings()
Settings related with replay of log files produced by older (prior to v4) version of the Handler...
Definition: Replay.h:106
ReplaySettings()
Initializes instance with default values.
Definition: Replay.h:77
LoggedSessionSettings()
Initializes instance with default values for each of the parameters.
Definition: Replay.h:39
Defines parameters which affect logs replay.
Definition: Replay.h:72
Set of parameters affecting Handler&#39;s behavior when market data processing session is spawned...
const LoggedSessionSettings & sessionSettings() const
Settings related with replay of log files produced by older (prior to v4) version of the Handler...
Definition: Replay.h:99
Collection of parameters affecting replay of legacy logs.
Definition: Replay.h:32
void replace(bool value)
Specifies whether session settings detected from log file to be replayed have to be replaced with set...
Definition: Replay.h:56
FileList & logs()
List of instruments logs to be replayed.
Definition: Replay.h:90
#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
const FileList & logs() const
List of instruments logs to be replayed.
Definition: Replay.h:83
std::vector< std::string > FileList
Ordered list of logs to be replayed.
Definition: Replay.h:69
void gatherLogFiles(FileList &, UInt32, const std::string &, const std::string &)
Gathers log files logs which are available for given channel and are stored in a given folder...
bool replace() const
Indicates whether session settings detected from log file to be replayed have to be replaced with set...
Definition: Replay.h:47
UInt32 UInt32
uInt32.
Definition: Fields.h:183
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:169