OnixS C++ CME MDP Conflated TCP Handler  1.2.1
API Documentation
Serialization.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 
27 
29 
30 // Market Data Serialization.
31 
32 /// Serializes into a string.
34 void
35 toStr(
36  std::string& str,
37  ErrorCodes::Enum value);
38 
39 
40 /// Serializes into a string.
41 inline std::string toStr(ErrorCodes::Enum value)
42 {
43  std::string str;
44 
45  toStr(str, value);
46 
47  return str;
48 }
49 
50 /// Serializes into a stream.
51 inline
52 std::ostream&
54  std::ostream& stream,
55  ErrorCodes::Enum value)
56 {
57  std::string str;
58 
59  toStr(str, value);
60 
61  return stream << str;
62 }
63 
64 /// Serializes the object into FIX presentation.
65 inline
66 void
68  std::string& str,
69  ErrorCodes::Enum value)
70 {
71  toStr(
72  str,
73  static_cast<ErrorCodes::Base>(value));
74 }
75 
76 
77 /// Serializes into a string.
79 void
80 toStr(
81  std::string& str,
82  ReqRejReason::Enum value);
83 
84 
85 /// Serializes into a string.
86 inline std::string toStr(ReqRejReason::Enum value)
87 {
88  std::string str;
89 
90  toStr(str, value);
91 
92  return str;
93 }
94 
95 /// Serializes into a stream.
96 inline
97 std::ostream&
99  std::ostream& stream,
100  ReqRejReason::Enum value)
101 {
102  std::string str;
103 
104  toStr(str, value);
105 
106  return stream << str;
107 }
108 
109 /// Serializes the object into FIX presentation.
110 inline
111 void
113  std::string& str,
114  ReqRejReason::Enum value)
115 {
116  toStr(
117  str,
118  static_cast<ReqRejReason::Base>(value));
119 }
120 
121 
122 /// Serializes into a string.
124 void
125 toStr(
126  std::string& str,
127  RequestIDStatus::Enum value);
128 
129 
130 /// Serializes into a string.
131 inline
132 std::string
134  RequestIDStatus::Enum value)
135 {
136  std::string str;
137 
138  toStr(str, value);
139 
140  return str;
141 }
142 
143 /// Serializes into a stream.
144 inline
145 std::ostream&
147  std::ostream& stream,
148  RequestIDStatus::Enum value)
149 {
150  std::string str;
151 
152  toStr(str, value);
153 
154  return stream << str;
155 }
156 
157 /// Serializes the object into FIX presentation.
158 inline
159 void
161  std::string& str,
162  RequestIDStatus::Enum value)
163 {
164  toStr(
165  str,
166  static_cast<RequestIDStatus::Base>(value));
167 }
168 
169 
170 /// Serializes into a string.
172 void
173 toStr(
174  std::string& str,
176 
177 
178 /// Serializes into a string.
179 inline
180 std::string
183 {
184  std::string str;
185 
186  toStr(str, value);
187 
188  return str;
189 }
190 
191 /// Serializes into a stream.
192 inline
193 std::ostream&
195  std::ostream& stream,
197 {
198  std::string str;
199 
200  toStr(str, value);
201 
202  return stream << str;
203 }
204 
205 /// Serializes the object into FIX presentation.
206 inline
207 void
209  std::string& str,
211 {
212  toStr(
213  str,
214  static_cast<SubscriptionReqType::Base>(value));
215 }
216 
217 
218 inline std::string ErrorCodes::toString(ErrorCodes::Enum value)
219 {
220  return toStr(value);
221 }
222 
223 inline std::string ReqRejReason::toString(ReqRejReason::Enum value)
224 {
225  return toStr(value);
226 }
227 
228 inline
229 std::string
230 RequestIDStatus::toString(
231  RequestIDStatus::Enum value)
232 {
233  return toStr(value);
234 }
235 
236 inline
237 std::string
238 SubscriptionReqType::toString(
240 {
241  return toStr(value);
242 }
243 
std::string toStr(const SnapshotFullRefreshOrderBook53::Entry &obj)
Serializes into a string.
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_END
Definition: ABI.h:144
void toFix(std::string &str, const SnapshotFullRefreshOrderBook53 &obj)
Serializes the object into FIX presentation.
#define ONIXS_CONFLATEDTCP_EXPORTED
Definition: Compiler.h:187
#define ONIXS_CONFLATEDTCP_MESSAGING_NAMESPACE_BEGIN
Definition: ABI.h:140
std::ostream & operator<<(std::ostream &stream, const SnapshotFullRefreshOrderBook53::Entry &obj)
Serializes into a stream.