OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers 18.2.0
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:
45
48
51 operator bool() const;
52
55 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&,
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&) throw();
184
185 private:
186 friend class MessageOperator;
187
188 const void* impl_;
189
190 const Message* container_;
191
193 const Message*,
194 const void*);
195 };
196
197 inline
198 FieldValueRef::
199 operator std::string() const
200 {
201 std::string str;
202
203 toString (str);
204
205 return str;
206 }
207
208 inline
209 std::string
211 {
212 std::string str;
213
214 toString (str);
215
216 return str;
217 }
218
219 // More comparison operators.
220
221 inline
222 bool
224 const FieldValueRef& ref,
225 const std::string& str)
226 {
227 return ref == StringRef (str);
228 }
229
230 inline
231 bool
233 const FieldValueRef& ref,
234 const std::string& str)
235 {
236 return ref != StringRef (str);
237 }
238
239 inline
240 bool
242 const std::string& str,
243 const FieldValueRef& ref)
244 {
245 return ref == StringRef (str);
246 }
247
248 inline
249 bool
251 const std::string& str,
252 const FieldValueRef& ref)
253 {
254 return ref != StringRef (str);
255 }
256
257 // More comparison operators.
258
259 inline
260 bool
262 const FieldValueRef& ref,
263 const char* str)
264 {
265 return ref == StringRef (str);
266 }
267
268 inline
269 bool
271 const FieldValueRef& ref,
272 const char* str)
273 {
274 return ref != StringRef (str);
275 }
276
277 inline
278 bool
280 const char* str,
281 const FieldValueRef& ref)
282 {
283 return ref == StringRef (str);
284 }
285
286 inline
287 bool
289 const char* str,
290 const FieldValueRef& ref)
291 {
292 return ref != StringRef (str);
293 }
294 }
295 }
296}
#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
std::string toString() const
Return string presentation of field value.
FieldValueRef(const FieldValueRef &other)
Shallow copy from another one.
void toString(std::string &) const
Appends copy of text presentation to the std::string.
bool toTimestamp(Timestamp &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec) const
Represents timestamp without time-zone information.
Definition Timestamp.h:88
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)
@ YYYYMMDDHHMMSSNsec
Indicates timestamp in "YYYYMMDD-HH:MM:SS.sssssssss" format.
Definition Timestamp.h:79