OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 19.0.3
Users' manual and API documentation
Loading...
Searching...
No Matches
FieldValueRef.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#pragma once
21
25
26namespace OnixS
27{
28 namespace Eurex
29 {
30 namespace MarketData
31 {
32
35
38 class
39 ONIXS_EUREX_EMDI_API
41 {
42 public:
44 FieldValueRef() noexcept;
45
48
51 explicit operator bool() const;
52
55 explicit operator std::string() const;
56
58 bool operator == (const FieldValueRef&) const;
59
61 bool operator != (const FieldValueRef&) const;
62
65 bool operator == (const StringRef&) const;
66
69 bool operator != (const StringRef&) const;
70
79 bool toNumber (Int32&) const;
80
89 bool toNumber (UInt32&) const;
90
99 bool toNumber (Int64&) const;
100
109 bool toNumber (UInt64&) const;
110
119 bool toNumber (Decimal&) const;
120
129 bool
131 Timestamp&,
132 TimestampFormat::Enum =
133 TimestampFormat::YYYYMMDDHHMMSSNsec) const;
134
145 bool toStringRef (StringRef&) const;
146
158 bool toChar (char&) const;
159
169 bool toGroup (Group&) const;
170
172 void toString (std::string&) const;
173
175 std::string toString() const;
176
180 FieldValueRef& operator = (const FieldValueRef&);
181
183 void swap(FieldValueRef&) noexcept;
184
185 private:
186 friend class MessageOperator;
187
188 const void* impl_;
189
190 const Message* container_;
191
192 FieldValueRef (const Message*, const void*);
193 };
194
195 inline
197 operator std::string() const
198 {
199 std::string str;
200
201 toString (str);
202
203 return str;
204 }
205
206 inline
207 std::string
209 {
210 std::string str;
211
212 toString (str);
213
214 return str;
215 }
216
217 // More comparison operators.
218
219 inline
220 bool
222 const FieldValueRef& ref,
223 const std::string& str)
224 {
225 return ref == StringRef (str);
226 }
227
228 inline
229 bool
231 const FieldValueRef& ref,
232 const std::string& str)
233 {
234 return ref != StringRef (str);
235 }
236
237 inline
238 bool
240 const std::string& str,
241 const FieldValueRef& ref)
242 {
243 return ref == StringRef (str);
244 }
245
246 inline
247 bool
249 const std::string& str,
250 const FieldValueRef& ref)
251 {
252 return ref != StringRef (str);
253 }
254
255 // More comparison operators.
256
257 inline
258 bool
260 const FieldValueRef& ref,
261 const char* str)
262 {
263 return ref == StringRef (str);
264 }
265
266 inline
267 bool
269 const FieldValueRef& ref,
270 const char* str)
271 {
272 return ref != StringRef (str);
273 }
274
275 inline
276 bool
278 const char* str,
279 const FieldValueRef& ref)
280 {
281 return ref == StringRef (str);
282 }
283
284 inline
285 bool
287 const char* str,
288 const FieldValueRef& ref)
289 {
290 return ref != StringRef (str);
291 }
292 }
293 }
294}
#define ONIXS_EUREX_EMDI_API_DECL(typeKind, typeName)
Definition ABI.h:27
Decimal type for better precision.
Definition Numeric.h:66
bool toStringRef(StringRef &) const
FieldValueRef() noexcept
Uninitialized value.
void swap(FieldValueRef &) noexcept
std::string toString() const
Return string presentation of field value.
void toString(std::string &) const
Appends copy of text presentation to the std::string.
bool toTimestamp(Timestamp &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
Represents time point without time-zone information.
Definition Timestamp.h:451
unsigned int UInt32
Definition Numeric.h:41
bool operator==(const FieldValueRef &ref, const std::string &str)
bool operator!=(const FieldValueRef &ref, const std::string &str)
STL namespace.
Collection of timestamp formatting patterns.
Definition Timestamp.h:432