OnixS C++ CME MDP Premium Market Data Handler 5.9.0
API Documentation
Loading...
Searching...
No Matches
ValueConverters.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 <stdexcept>
24
26#include <OnixS/CME/MDH/Time.h>
27
31
33
35
40{
43 virtual const Char* typeName() const = 0;
44
47 virtual void toStr(std::string&, const ValueContainer&) const {}
48
52 virtual bool convert(StrRef&, const ValueContainer&) const
53 {
54 return false;
55 }
56
60 virtual bool convert(Char&, const ValueContainer&) const
61 {
62 return false;
63 }
64
68 virtual bool convert(Int8&, const ValueContainer&) const
69 {
70 return false;
71 }
72
76 virtual bool convert(UInt8&, const ValueContainer&) const
77 {
78 return false;
79 }
80
84 virtual bool convert(Int16&, const ValueContainer&) const
85 {
86 return false;
87 }
88
92 virtual bool convert(UInt16&, const ValueContainer&) const
93 {
94 return false;
95 }
96
100 virtual bool convert(Int32&, const ValueContainer&) const
101 {
102 return false;
103 }
104
108 virtual bool convert(UInt32&, const ValueContainer&) const
109 {
110 return false;
111 }
112
116 virtual bool convert(Int64&, const ValueContainer&) const
117 {
118 return false;
119 }
120
124 virtual bool convert(UInt64&, const ValueContainer&) const
125 {
126 return false;
127 }
128
132 virtual bool convert(Decimal&, const ValueContainer&) const
133 {
134 return false;
135 }
136
140 virtual bool convert(Timestamp&, const ValueContainer&) const
141 {
142 return false;
143 }
144
148 virtual bool convert(MaturityMonthYear&, const ValueContainer&) const
149 {
150 return false;
151 }
152};
153
155{
157 {
158 return "Null";
159 }
160
161 static const ValueConverter& self();
162};
163
164//
165
169{
171 {
172 return "String";
173 }
174
175 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
176 {
177 const StrRef& ref = container.get<StrRef>();
178
179 str.assign(ref.items(), ref.size());
180 }
181
182 bool convert(StrRef& ref, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
183 {
184 ref = container.get<StrRef>();
185
186 return true;
187 }
188
190 {
191 const StrRef& str = container.get<StrRef>();
192
193 if (1 == str.size())
194 {
195 value = str[0];
196
197 return true;
198 }
199 else if (str.empty())
200 {
201 value = 0;
202
203 return true;
204 }
205
206 return false;
207 }
208
210 {
211 const StrRef& str = container.get<StrRef>();
212
213 return fromStr(value, str.items(), str.size());
214 }
215
217 {
218 const StrRef& str = container.get<StrRef>();
219
220 return fromStr(value, str.items(), str.size());
221 }
222
224 {
225 const StrRef& str = container.get<StrRef>();
226
227 return fromStr(value, str.items(), str.size());
228 }
229
231 {
232 const StrRef& str = container.get<StrRef>();
233
234 return fromStr(value, str.items(), str.size());
235 }
236
238 {
239 const StrRef& str = container.get<StrRef>();
240
241 return fromStr(value, str.items(), str.size());
242 }
243
245 {
246 const StrRef& str = container.get<StrRef>();
247
248 return fromStr(value, str.items(), str.size());
249 }
250
251 bool convert(Int64& value, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
252 {
253 const StrRef& str = container.get<StrRef>();
254
255 return fromStr(value, str.items(), str.size());
256 }
257
259 {
260 const StrRef& str = container.get<StrRef>();
261
262 return fromStr(value, str.items(), str.size());
263 }
264
266 {
267 const StrRef& str = container.get<StrRef>();
268
269 return fromStr(value, str.items(), str.size());
270 }
271
273 {
274 const StrRef& str = container.get<StrRef>();
275
276 return fromStr(value, str.items(), str.size());
277 }
278
280 {
281 return false;
282 }
283
284 static const ValueConverter& self();
285};
286
287//
288
292{
294 {
295 return "Char";
296 }
297
298 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
299 {
300 str.append(1, container.get<Char>());
301 }
302
303 bool convert(StrRef& ref, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
304 {
305 ref = StrRef(&container.get<Char>(), 1);
306
307 return true;
308 }
309
311 {
312 value = container.get<Char>();
313
314 return true;
315 }
316
318 {
319 return charToDigit(value, container.get<Char>());
320 }
321
323 {
324 return charToDigit(value, container.get<Char>());
325 }
326
328 {
329 return charToDigit(value, container.get<Char>());
330 }
331
333 {
334 return charToDigit(value, container.get<Char>());
335 }
336
338 {
339 return charToDigit(value, container.get<Char>());
340 }
341
343 {
344 return charToDigit(value, container.get<Char>());
345 }
346
347 bool convert(Int64& value, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
348 {
349 return charToDigit(value, container.get<Char>());
350 }
351
353 {
354 return charToDigit(value, container.get<Char>());
355 }
356
358 {
359 Decimal::Mantissa mantissa;
360
361 if (charToDigit(mantissa, container.get<Char>()))
362 {
363 value = Decimal(mantissa, 0);
364
365 return true;
366 }
367
368 return false;
369 }
370
372 {
373 return false;
374 }
375
377 {
378 return false;
379 }
380
381 static const ValueConverter& self();
382
383private:
384 template <class Integer>
385 static bool charToDigit(Integer& converted, Char original)
386 {
387 if ('0' <= original && '9' >= original)
388 {
389 converted = static_cast<Integer>(original - '0');
390
391 return true;
392 }
393
394 return false;
395 }
396};
397
398//
399
402template <class Integer, class Descendant>
404{
405 template <class Integral, bool IsSigned>
406 struct FitsToChar
407 {
408 bool operator()(Integral value) const
409 {
410 return (0 <= value && value < 10);
411 }
412 };
413
414 template <class Integral>
415 struct FitsToChar<Integral, false>
416 {
417 bool operator()(Integral value) const
418 {
419 return (value < 10);
420 }
421 };
422
423 typedef FitsToChar<Integer, !(static_cast<Integer>(-1) > static_cast<Integer>(0))> CanFitToChar;
424
425public:
426 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
427 {
428 OnixS::CME::MDH::toStr(str, container.get<Integer>());
429 }
430
432 {
433 const Integer actual = container.get<Integer>();
434
435 if (CanFitToChar()(actual))
436 {
437 value = static_cast<Char>('0' + actual);
438
439 return true;
440 }
441
442 return false;
443 }
444
446 {
447 value = static_cast<Int8>(container.get<Integer>());
448
449 return true;
450 }
451
453 {
454 value = static_cast<UInt8>(container.get<Integer>());
455
456 return true;
457 }
458
460 {
461 value = static_cast<Int16>(container.get<Integer>());
462
463 return true;
464 }
465
467 {
468 value = static_cast<UInt16>(container.get<Integer>());
469
470 return true;
471 }
472
474 {
475 value = static_cast<Int32>(container.get<Integer>());
476
477 return true;
478 }
479
481 {
482 value = static_cast<UInt32>(container.get<Integer>());
483
484 return true;
485 }
486
487 bool convert(Int64& value, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
488 {
489 value = static_cast<Int64>(container.get<Integer>());
490
491 return true;
492 }
493
495 {
496 value = static_cast<UInt64>(container.get<Integer>());
497
498 return true;
499 }
500
502 {
503 value = Decimal(static_cast<Decimal::Mantissa>(container.get<Integer>()), 0);
504
505 return true;
506 }
507
509 {
510 return false;
511 }
512
514 {
515 return false;
516 }
517
519 {
520 return false;
521 }
522};
523
527{
529 {
530 return "Int8";
531 }
532
533 static const ValueConverter& self();
534};
535
539{
541 {
542 return "UInt8";
543 }
544
545 static const ValueConverter& self();
546};
547
551{
553 {
554 return "Int16";
555 }
556
557 static const ValueConverter& self();
558};
559
563{
565 {
566 return "UInt16";
567 }
568
569 static const ValueConverter& self();
570};
571
575{
577 {
578 return "Int32";
579 }
580
581 static const ValueConverter& self();
582};
583
587{
589 {
590 return "UInt32";
591 }
592
593 static const ValueConverter& self();
594};
595
599{
601 {
602 return "Int64";
603 }
604
605 static const ValueConverter& self();
606};
607
611{
613 {
614 return "UInt64";
615 }
616
617 static const ValueConverter& self();
618};
619
620//
621
625{
627 {
628 return "Decimal";
629 }
630
631 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
632 {
633 OnixS::CME::MDH::toStr(str, container.get<Decimal>());
634 }
635
637 {
638 value = container.get<Decimal>();
639
640 return true;
641 }
642
644 {
645 return false;
646 }
647
649 {
650 return false;
651 }
652
654 {
655 return false;
656 }
657
659 {
660 return false;
661 }
662
664 {
665 return false;
666 }
667
669 {
670 return false;
671 }
672
674 {
675 return false;
676 }
677
679 {
680 return false;
681 }
682
684 {
685 return false;
686 }
687
689 {
690 return false;
691 }
692
694 {
695 return false;
696 }
697
699 {
700 return false;
701 }
702
703 static const ValueConverter& self();
704};
705
706//
707
711{
713 {
714 return "Timestamp";
715 }
716
717 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
718 {
719 OnixS::CME::MDH::toStr(str, container.get<Timestamp>());
720 }
721
722 bool convert(Int64& value, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
723 {
724 value = static_cast<Int64>(container.get<Timestamp>().sinceEpoch());
725
726 return true;
727 }
728
730 {
731 value = container.get<Timestamp>().sinceEpoch();
732
733 return true;
734 }
735
737 {
738 value = container.get<Timestamp>();
739
740 return true;
741 }
742
744 {
745 return false;
746 }
747
749 {
750 return false;
751 }
752
754 {
755 return false;
756 }
757
759 {
760 return false;
761 }
762
764 {
765 return false;
766 }
767
769 {
770 return false;
771 }
772
774 {
775 return false;
776 }
777
779 {
780 return false;
781 }
782
784 {
785 return false;
786 }
787
789 {
790 return false;
791 }
792
793 static const ValueConverter& self();
794};
795
796//
797
801{
803 {
804 return "MaturityMonthYear";
805 }
806
807 void toStr(std::string& str, const ValueContainer& container) const ONIXS_CMEMDH_OVERRIDE
808 {
809 OnixS::CME::MDH::toStr(str, container.get<MaturityMonthYear>());
810 }
811
813 {
814 value = container.get<MaturityMonthYear>();
815
816 return true;
817 }
818
820 {
821 return false;
822 }
823
825 {
826 return false;
827 }
828
830 {
831 return false;
832 }
833
835 {
836 return false;
837 }
838
840 {
841 return false;
842 }
843
845 {
846 return false;
847 }
848
850 {
851 return false;
852 }
853
855 {
856 return false;
857 }
858
860 {
861 return false;
862 }
863
865 {
866 return false;
867 }
868
870 {
871 return false;
872 }
873
875 {
876 return false;
877 }
878
879 static const ValueConverter& self();
880};
881
882//
883
884inline void throwBadConversion(const Char* typeName)
885{
886 std::string issue;
887
888 issue += "Cannot transform ";
889
890 issue += typeName ? typeName : "Unknown type";
891
892 issue += " value to the value of the requested "
893 "type because either conversion between "
894 "types does not exist or the value cannot "
895 "be fit to the value of the target type. ";
896
897 throw std::domain_error(issue);
898}
899
900//
901
904{
912};
913
915template <class Value>
917{
918 typedef char Ordinary[1];
919
920 typedef char Enumeration[2];
921
922 typedef char Bits[3];
923
924 template <class Other>
925 static Bits& kind(typename Other::Bits*);
926
927 template <class Other>
928 static Enumeration& kind(typename Other::Enum*);
929
930 template <class Other>
931 static Ordinary& kind(...);
932
933public:
934 enum
935 {
938 (sizeof(Bits) == sizeof(kind<Value>(ONIXS_CMEMDH_NULLPTR))
940 : (sizeof(Enumeration) == sizeof(kind<Value>(ONIXS_CMEMDH_NULLPTR)) ? ValueKinds::Enumeration : ValueKinds::Ordinary))
941 };
942};
943
946template <class Value, int>
948{
950 typedef Value Result;
951
956 static Result convert(const ValueConverter& converter, const ValueContainer& container)
957 {
958 Result result;
959
960 if (!converter.convert(result, container))
961 {
962 throwBadConversion(converter.typeName());
963 }
964
965 return result;
966 }
967
972 static bool convert(Result& result, const ValueConverter& converter, const ValueContainer& container)
973 {
974 return converter.convert(result, container);
975 }
976};
977
982template <class Enumeration>
983struct ValueConversionTraits<Enumeration, ValueKinds::Enumeration>
984{
986 typedef typename Enumeration::Enum Result;
987
992 static Result convert(const ValueConverter& converter, const ValueContainer& container)
993 {
994 typename Enumeration::Base result;
995
996 if (!converter.convert(result, container))
997 {
998 throwBadConversion(converter.typeName());
999 }
1000
1001 return static_cast<Result>(result);
1002 }
1003
1008 static bool convert(Result& result, const ValueConverter& converter, const ValueContainer& container)
1009 {
1010 typename Enumeration::Base base;
1011
1012 if (converter.convert(base, container))
1013 {
1014 result = static_cast<Result>(base);
1015
1016 return true;
1017 }
1018
1019 return false;
1020 }
1021};
1022
1027template <class BitSet>
1029{
1031 typedef BitSet Result;
1032
1037 static BitSet convert(const ValueConverter& converter, const ValueContainer& container)
1038 {
1039 typename BitSet::Bits bits;
1040
1041 if (!converter.convert(bits, container))
1042 {
1043 throwBadConversion(converter.typeName());
1044 }
1045
1046 return BitSet(bits);
1047 }
1048
1053 static bool convert(BitSet& result, const ValueConverter& converter, const ValueContainer& container)
1054 {
1055 typename BitSet::Bits bits;
1056
1057 if (converter.convert(bits, container))
1058 {
1059 result = BitSet(bits);
1060
1061 return true;
1062 }
1063
1064 return false;
1065 }
1066};
1067
1070template <class Value>
1072{
1075
1077 typedef typename Traits::Result Result;
1078
1081 typename Traits::Result operator()(const ValueConverter& converter, const ValueContainer& container) const
1082 {
1083 return Traits::convert(converter, container);
1084 }
1085
1088 bool
1089 operator()(typename Traits::Result& result, const ValueConverter& converter, const ValueContainer& container) const
1090 {
1091 return Traits::convert(result, converter, container);
1092 }
1093};
1094
#define ONIXS_CMEMDHFIX_NAMESPACE_BEGIN
Definition Bootstrap.h:70
#define ONIXS_CMEMDHFIX_NAMESPACE_END
Definition Bootstrap.h:71
#define ONIXS_CMEMDH_NULLPTR
Definition Compiler.h:178
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
#define ONIXS_CMEMDH_OVERRIDE
Definition Compiler.h:176
A real number with floating exponent.
Definition Decimal.h:137
DecimalMantissa Mantissa
Aliases mantissa component type.
Definition Decimal.h:140
Implements the value conversion abstraction for the integer fields.
bool convert(Int64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(Int16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(UInt64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Timestamp &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a timestamp.
bool convert(StrRef &, const ValueContainer &) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(MaturityMonthYear &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Int32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Char &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a character.
Container for a value of any supported kinds.
Traits class used identify a field value kind.
@ Kind
The kind of the given field value by its type.
Provides efficient way of accessing text-based values without copying content of the text being refer...
Definition String.h:42
const Char * items() const
Read-only content.
Definition String.h:77
size_t size() const
Number of chars.
Definition String.h:83
bool empty() const
Indicates whether the referenced text is empty.
Definition String.h:71
Represents time point without time-zone information.
Definition Time.h:388
Ticks sinceEpoch() const
Number of nanoseconds since the Epoch (01-01-1970).
Definition Time.h:529
void throwBadConversion(const Char *typeName)
bool value(Number &number, const MultiContainer &container, Tag tag)
Finds a tag-value entry in the given collection by the given tag and returns its value component tran...
Int8 Int8
int8.
Definition Fields.h:63
bool fromStr(Decimal &, const Char *, size_t)
Deserializes a decimal number from the given text presentation.
UInt64 UInt64
uInt64.
Definition Fields.h:205
Int32 Int32
int32.
Definition Fields.h:60
char Char
Character type alias.
Definition String.h:36
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:202
Int16 Int16
int16.
Definition Fields.h:57
UInt8 UInt8
uInt8.
Definition Fields.h:208
UInt16 UInt16
uInt16.
Definition Fields.h:199
Implements the value conversion abstraction for fields whose values represent a single character.
bool convert(Int64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(Int16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(UInt64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Timestamp &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a timestamp.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
bool convert(MaturityMonthYear &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Int32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(StrRef &ref, const ValueContainer &container) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(Char &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a character.
static const ValueConverter & self()
Implements the value conversion abstraction for the decimal fields.
bool convert(UInt32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(UInt8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(Int64 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Timestamp &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a timestamp.
bool convert(Int16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
bool convert(StrRef &, const ValueContainer &) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(UInt64 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(MaturityMonthYear &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Int32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Char &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a character.
bool convert(UInt16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the month-year fields.
bool convert(UInt32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(UInt8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int64 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(MaturityMonthYear &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Timestamp &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a timestamp.
bool convert(Int16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
bool convert(StrRef &, const ValueContainer &) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(UInt64 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Char &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a character.
bool convert(UInt16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
static const ValueConverter & self()
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the text fields.
bool convert(Int64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(Int16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Timestamp &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a timestamp.
bool convert(UInt32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(UInt64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Int8 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
bool convert(MaturityMonthYear &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Int32 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt16 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(StrRef &ref, const ValueContainer &container) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(Char &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a character.
static const ValueConverter & self()
Implements the value conversion abstraction for the timestamp fields.
bool convert(Int64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
void toStr(std::string &str, const ValueContainer &container) const override
Outputs the text presentation of the FIX value stored in the given container into the given string.
bool convert(UInt8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Timestamp &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into a timestamp.
bool convert(Int8 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(UInt64 &value, const ValueContainer &container) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Decimal &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a decimal.
bool convert(Int16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
bool convert(StrRef &, const ValueContainer &) const override
Tries to convert the value stored in the given container into the string reference.
bool convert(MaturityMonthYear &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a month-year.
bool convert(Int32 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
bool convert(Char &, const ValueContainer &) const override
Tries to convert the value stored in the given container into a character.
bool convert(UInt16 &, const ValueContainer &) const override
Tries to convert the value stored in the given container into an integer.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
Implements the value conversion abstraction for the integer fields.
const Char * typeName() const override
The name of the type whose values are manipulated through the given converter.
static const ValueConverter & self()
static BitSet convert(const ValueConverter &converter, const ValueContainer &container)
Converters the given value by using the specified value converter and returns the result of conversio...
static bool convert(BitSet &result, const ValueConverter &converter, const ValueContainer &container)
Tries to convert the given value using the given value converter and puts the result of the conversio...
static Result convert(const ValueConverter &converter, const ValueContainer &container)
Converters the given value by using the specified value converter and returns the result of conversio...
static bool convert(Result &result, const ValueConverter &converter, const ValueContainer &container)
Tries to convert the given value using the given value converter and puts the result of the conversio...
The field value traits used in conversion related operations.
static Result convert(const ValueConverter &converter, const ValueContainer &container)
Converters the given value by using the specified value converter and returns the result of conversio...
Value Result
Type of the conversion output.
static bool convert(Result &result, const ValueConverter &converter, const ValueContainer &container)
Tries to convert the given value using the given value converter and puts the result of the conversio...
Implements value conversion operations through value conversion traits.
bool operator()(typename Traits::Result &result, const ValueConverter &converter, const ValueContainer &container) const
Converts the given value into a value of target type.
Traits::Result Result
Conversion output type.
ValueConversionTraits< Value, ValueKind< Value >::Kind > Traits
Conversion traits.
Traits::Result operator()(const ValueConverter &converter, const ValueContainer &container) const
Converts the given value into a value of target type.
Abstraction gathering operations over a value of a particular type stored as a field in a message.
virtual bool convert(StrRef &, const ValueContainer &) const
Tries to convert the value stored in the given container into the string reference.
virtual void toStr(std::string &, const ValueContainer &) const
Outputs the text presentation of the FIX value stored in the given container into the given string.
virtual bool convert(MaturityMonthYear &, const ValueContainer &) const
Tries to convert the value stored in the given container into a month-year.
virtual bool convert(UInt64 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(Timestamp &, const ValueContainer &) const
Tries to convert the value stored in the given container into a timestamp.
virtual bool convert(UInt16 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(UInt32 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(UInt8 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(Int16 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(Int32 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual const Char * typeName() const =0
The name of the type whose values are manipulated through the given converter.
virtual bool convert(Decimal &, const ValueContainer &) const
Tries to convert the value stored in the given container into a decimal.
virtual bool convert(Char &, const ValueContainer &) const
Tries to convert the value stored in the given container into a character.
virtual bool convert(Int8 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
virtual bool convert(Int64 &, const ValueContainer &) const
Tries to convert the value stored in the given container into an integer.
Identifies kinds of FIX field values.
Enum
Identifies kinds of FIX field values.