Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
Reflectable.h
Go to the documentation of this file.
1 #ifndef ZSERIO_REFLECTABLE_H_INC
2 #define ZSERIO_REFLECTABLE_H_INC
3 
4 #include <functional>
5 #include <type_traits>
6 
10 #include "zserio/IReflectable.h"
11 #include "zserio/Span.h"
13 #include "zserio/Traits.h"
14 #include "zserio/TypeInfo.h"
15 #include "zserio/TypeInfoUtil.h"
16 
17 namespace zserio
18 {
19 
26 template <typename ALLOC>
27 class ReflectableBase : public IBasicReflectable<ALLOC>
28 {
29 public:
35  explicit ReflectableBase(const IBasicTypeInfo<ALLOC>& typeInfo);
36 
38  ~ReflectableBase() override = 0;
39 
44  ReflectableBase(const ReflectableBase&) = delete;
46 
47  ReflectableBase(const ReflectableBase&&) = delete;
53  const IBasicTypeInfo<ALLOC>& getTypeInfo() const override;
54  bool isArray() const override;
55 
56  void initializeChildren() override;
57  void initialize(const vector<AnyHolder<ALLOC>, ALLOC>& typeArguments) override;
58  size_t initializeOffsets(size_t bitPosition) override;
59  size_t initializeOffsets() override;
60  size_t bitSizeOf(size_t bitPosition) const override;
61  size_t bitSizeOf() const override;
62  void write(BitStreamWriter& writer) const override;
63 
67  void setField(StringView name, const AnyHolder<ALLOC>& value) override;
72 
73  StringView getChoice() const override;
74 
79 
80  size_t size() const override;
81  void resize(size_t size) override;
82  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override;
83  IBasicReflectablePtr<ALLOC> at(size_t index) override;
84  IBasicReflectableConstPtr<ALLOC> operator[](size_t index) const override;
85  IBasicReflectablePtr<ALLOC> operator[](size_t index) override;
86  void setAt(const AnyHolder<ALLOC>& value, size_t index) override;
87  void append(const AnyHolder<ALLOC>& value) override;
88 
89  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override;
90  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override;
91  AnyHolder<ALLOC> getAnyValue() const override;
92  AnyHolder<ALLOC> getAnyValue() override;
93 
94  // exact checked getters
95  bool getBool() const override;
96  int8_t getInt8() const override;
97  int16_t getInt16() const override;
98  int32_t getInt32() const override;
99  int64_t getInt64() const override;
100  uint8_t getUInt8() const override;
101  uint16_t getUInt16() const override;
102  uint32_t getUInt32() const override;
103  uint64_t getUInt64() const override;
104  float getFloat() const override;
105  double getDouble() const override;
106  Span<const uint8_t> getBytes() const override;
107  StringView getStringView() const override;
108  const BasicBitBuffer<ALLOC>& getBitBuffer() const override;
109 
110  // convenience conversions
111  int64_t toInt() const override;
112  uint64_t toUInt() const override;
113  double toDouble() const override;
114  string<ALLOC> toString(const ALLOC& allocator) const override;
115  string<ALLOC> toString() const override;
116 
117  const ParsingInfo& parsingInfo() const override;
118 
119 private:
120  const IBasicTypeInfo<ALLOC>& m_typeInfo;
121 };
122 
126 template <typename ALLOC, typename T, typename = void>
128 {
129 private:
131 
132 protected:
133  BuiltinReflectableBase(const IBasicTypeInfo<ALLOC>& typeInfo, const T& value) :
134  Base(typeInfo),
135  m_value(value)
136  {}
137 
138  const T& getValue() const
139  {
140  return m_value;
141  }
142 
143 public:
144  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
145  {
146  return AnyHolder<ALLOC>(std::cref(getValue()), allocator);
147  }
148 
149  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
150  {
151  // we have only const reference, thus return it
152  return AnyHolder<ALLOC>(std::cref(getValue()), allocator);
153  }
154 
155 private:
156  const T& m_value;
157 };
158 
164 template <typename ALLOC, typename T>
165 class BuiltinReflectableBase<ALLOC, T,
166  typename std::enable_if<std::is_arithmetic<T>::value || std::is_same<T, StringView>::value ||
167  is_span<T>::value>::type> : public ReflectableBase<ALLOC>
168 {
169 private:
171 
172 protected:
173  BuiltinReflectableBase(const IBasicTypeInfo<ALLOC>& typeInfo, T value) :
174  Base(typeInfo),
175  m_value(value)
176  {}
177 
178  T getValue() const
179  {
180  return m_value;
181  }
182 
183 public:
184  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
185  {
186  return AnyHolder<ALLOC>(m_value, allocator);
187  }
188 
189  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
190  {
191  return AnyHolder<ALLOC>(m_value, allocator);
192  }
193 
194 private:
195  T m_value;
196 };
197 
206 template <typename ALLOC, typename T>
208 {
209 protected:
210  static_assert(std::is_integral<T>::value, "T must be a signed integral type!");
211 
213 
214 public:
215  IntegralReflectableBase(const IBasicTypeInfo<ALLOC>& typeInfo, T value) :
216  Base(typeInfo, value)
217  {}
218 
219  double toDouble() const override
220  {
221  return static_cast<double>(Base::getValue());
222  }
223 
224  string<ALLOC> toString(const ALLOC& allocator) const override
225  {
226  return ::zserio::toString<ALLOC>(Base::getValue(), allocator);
227  }
228 };
229 
235 template <typename ALLOC, typename T>
237 {
238 protected:
239  static_assert(std::is_signed<T>::value, "T must be a signed integral type!");
240 
242 
243  using Base::Base;
244 
245 public:
246  int64_t toInt() const override
247  {
248  return Base::getValue();
249  }
250 };
251 
257 template <typename ALLOC, typename T>
259 {
260 protected:
261  static_assert(std::is_unsigned<T>::value, "T must be an unsigned integral type!");
262 
264 
265  using Base::Base;
266 
267 public:
268  uint64_t toUInt() const override
269  {
270  return Base::getValue();
271  }
272 };
273 
277 template <typename ALLOC>
278 class BoolReflectable : public UnsignedReflectableBase<ALLOC, bool>
279 {
280 private:
282 
283 public:
285  {
287  }
288 
289  explicit BoolReflectable(bool value) :
290  Base(typeInfo(), value)
291  {}
292 
293  size_t bitSizeOf(size_t) const override
294  {
295  return 1;
296  }
297 
298  void write(BitStreamWriter& writer) const override
299  {
300  writer.writeBool(Base::getValue());
301  }
302 
303  bool getBool() const override
304  {
305  return Base::getValue();
306  }
307 };
308 
314 template <typename ALLOC>
315 class Int8ReflectableBase : public SignedReflectableBase<ALLOC, int8_t>
316 {
317 protected:
319 
320  using Base::Base;
321 
322 public:
323  int8_t getInt8() const override
324  {
325  return Base::getValue();
326  }
327 };
328 
334 template <typename ALLOC>
335 class Int16ReflectableBase : public SignedReflectableBase<ALLOC, int16_t>
336 {
337 protected:
339 
340  using Base::Base;
341 
342 public:
343  int16_t getInt16() const override
344  {
345  return Base::getValue();
346  }
347 };
348 
354 template <typename ALLOC>
355 class Int32ReflectableBase : public SignedReflectableBase<ALLOC, int32_t>
356 {
357 protected:
359 
360  using Base::Base;
361 
362 public:
363  int32_t getInt32() const override
364  {
365  return Base::getValue();
366  }
367 };
368 
374 template <typename ALLOC>
375 class Int64ReflectableBase : public SignedReflectableBase<ALLOC, int64_t>
376 {
377 protected:
379 
380  using Base::Base;
381 
382 public:
383  int64_t getInt64() const override
384  {
385  return Base::getValue();
386  }
387 };
388 
394 template <typename ALLOC>
395 class UInt8ReflectableBase : public UnsignedReflectableBase<ALLOC, uint8_t>
396 {
397 protected:
399 
400  using Base::Base;
401 
402 public:
403  uint8_t getUInt8() const override
404  {
405  return Base::getValue();
406  }
407 };
408 
414 template <typename ALLOC>
415 class UInt16ReflectableBase : public UnsignedReflectableBase<ALLOC, uint16_t>
416 {
417 protected:
419 
420  using Base::Base;
421 
422 public:
423  uint16_t getUInt16() const override
424  {
425  return Base::getValue();
426  }
427 };
428 
434 template <typename ALLOC>
435 class UInt32ReflectableBase : public UnsignedReflectableBase<ALLOC, uint32_t>
436 {
437 protected:
439 
440  using Base::Base;
441 
442 public:
443  uint32_t getUInt32() const override
444  {
445  return Base::getValue();
446  }
447 };
448 
454 template <typename ALLOC>
455 class UInt64ReflectableBase : public UnsignedReflectableBase<ALLOC, uint64_t>
456 {
457 protected:
459 
460  using Base::Base;
461 
462 public:
463  uint64_t getUInt64() const override
464  {
465  return Base::getValue();
466  }
467 };
468 
472 template <typename ALLOC>
474 {
475 private:
477 
478 public:
480  {
482  }
483 
484  explicit Int8Reflectable(int8_t value) :
485  Base(typeInfo(), value)
486  {}
487 
488  size_t bitSizeOf(size_t) const override
489  {
490  return 8;
491  }
492 
493  void write(BitStreamWriter& writer) const override
494  {
495  writer.writeSignedBits(Base::getValue(), 8);
496  }
497 };
498 
502 template <typename ALLOC>
504 {
505 private:
507 
508 public:
510  {
512  }
513 
514  explicit Int16Reflectable(int16_t value) :
515  Base(typeInfo(), value)
516  {}
517 
518  size_t bitSizeOf(size_t) const override
519  {
520  return 16;
521  }
522 
523  void write(BitStreamWriter& writer) const override
524  {
525  writer.writeSignedBits(Base::getValue(), 16);
526  }
527 };
528 
532 template <typename ALLOC>
534 {
535 private:
537 
538 public:
540  {
542  }
543 
544  explicit Int32Reflectable(int32_t value) :
545  Base(typeInfo(), value)
546  {}
547 
548  size_t bitSizeOf(size_t) const override
549  {
550  return 32;
551  }
552 
553  void write(BitStreamWriter& writer) const override
554  {
555  writer.writeSignedBits(Base::getValue(), 32);
556  }
557 };
558 
562 template <typename ALLOC>
564 {
565 private:
567 
568 public:
570  {
572  }
573 
574  explicit Int64Reflectable(int64_t value) :
575  Base(typeInfo(), value)
576  {}
577 
578  size_t bitSizeOf(size_t) const override
579  {
580  return 64;
581  }
582 
583  void write(BitStreamWriter& writer) const override
584  {
585  writer.writeSignedBits64(Base::getValue(), 64);
586  }
587 };
588 
592 template <typename ALLOC>
594 {
595 private:
597 
598 public:
600  {
602  }
603 
604  explicit UInt8Reflectable(uint8_t value) :
605  Base(typeInfo(), value)
606  {}
607 
608  size_t bitSizeOf(size_t) const override
609  {
610  return 8;
611  }
612 
613  void write(BitStreamWriter& writer) const override
614  {
615  writer.writeBits(Base::getValue(), 8);
616  }
617 };
618 
622 template <typename ALLOC>
624 {
625 private:
627 
628 public:
630  {
632  }
633 
634  explicit UInt16Reflectable(uint16_t value) :
635  Base(typeInfo(), value)
636  {}
637 
638  size_t bitSizeOf(size_t) const override
639  {
640  return 16;
641  }
642 
643  void write(BitStreamWriter& writer) const override
644  {
645  writer.writeBits(Base::getValue(), 16);
646  }
647 };
648 
652 template <typename ALLOC>
654 {
655 private:
657 
658 public:
660  {
662  }
663 
664  explicit UInt32Reflectable(uint32_t value) :
665  Base(typeInfo(), value)
666  {}
667 
668  size_t bitSizeOf(size_t) const override
669  {
670  return 32;
671  }
672 
673  void write(BitStreamWriter& writer) const override
674  {
675  writer.writeBits(Base::getValue(), 32);
676  }
677 };
678 
682 template <typename ALLOC>
684 {
685 private:
687 
688 public:
690  {
692  }
693 
694  explicit UInt64Reflectable(uint64_t value) :
695  Base(typeInfo(), value)
696  {}
697 
698  size_t bitSizeOf(size_t) const override
699  {
700  return 64;
701  }
702 
703  void write(BitStreamWriter& writer) const override
704  {
705  writer.writeBits64(Base::getValue(), 64);
706  }
707 };
708 
709 template <typename ALLOC, typename T>
711 
712 template <typename ALLOC>
713 class FixedSignedBitFieldReflectable<ALLOC, int8_t> : public Int8ReflectableBase<ALLOC>
714 {
715 private:
717 
718 public:
719  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
720  {
722  }
723 
724  FixedSignedBitFieldReflectable(int8_t value, uint8_t bitSize) :
725  Base(typeInfo(bitSize), value)
726  {
727  if (bitSize > 8)
728  {
729  throw CppRuntimeException("FixedSignedBitFieldReflectable ")
730  << " - invalid bit size '" << bitSize << "' for 'int8_t' value!";
731  }
732  }
733 
734  size_t bitSizeOf(size_t) const override
735  {
736  return Base::getTypeInfo().getBitSize();
737  }
738 
739  void write(BitStreamWriter& writer) const override
740  {
741  writer.writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
742  }
743 };
744 
745 template <typename ALLOC>
746 class FixedSignedBitFieldReflectable<ALLOC, int16_t> : public Int16ReflectableBase<ALLOC>
747 {
748 private:
750 
751 public:
752  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
753  {
755  }
756 
757  FixedSignedBitFieldReflectable(int16_t value, uint8_t bitSize) :
758  Base(typeInfo(bitSize), value)
759  {
760  if (bitSize <= 8 || bitSize > 16)
761  {
762  throw CppRuntimeException("FixedSignedBitFieldReflectable ")
763  << " - invalid bit size '" << bitSize << "' for 'int16_t' value!";
764  }
765  }
766 
767  size_t bitSizeOf(size_t) const override
768  {
769  return Base::getTypeInfo().getBitSize();
770  }
771 
772  void write(BitStreamWriter& writer) const override
773  {
774  writer.writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
775  }
776 };
777 
778 template <typename ALLOC>
779 class FixedSignedBitFieldReflectable<ALLOC, int32_t> : public Int32ReflectableBase<ALLOC>
780 {
781 private:
783 
784 public:
785  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
786  {
788  }
789 
790  FixedSignedBitFieldReflectable(int32_t value, uint8_t bitSize) :
791  Base(typeInfo(bitSize), value)
792  {
793  if (bitSize <= 16 || bitSize > 32)
794  {
795  throw CppRuntimeException("FixedSignedBitFieldReflectable ")
796  << " - invalid bit size '" << bitSize << "' for 'int32_t' value!";
797  }
798  }
799 
800  size_t bitSizeOf(size_t) const override
801  {
802  return Base::getTypeInfo().getBitSize();
803  }
804 
805  void write(BitStreamWriter& writer) const override
806  {
807  writer.writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
808  }
809 };
810 
811 template <typename ALLOC>
812 class FixedSignedBitFieldReflectable<ALLOC, int64_t> : public Int64ReflectableBase<ALLOC>
813 {
814 private:
816 
817 public:
818  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
819  {
821  }
822 
823  FixedSignedBitFieldReflectable(int64_t value, uint8_t bitSize) :
824  Base(typeInfo(bitSize), value)
825  {
826  if (bitSize <= 32) // check for maximum bit size (64) is done in type info
827  {
828  throw CppRuntimeException("FixedSignedBitFieldReflectable ")
829  << " - invalid bit size '" << bitSize << "' for 'int64_t' value!";
830  }
831  }
832 
833  size_t bitSizeOf(size_t) const override
834  {
835  return Base::getTypeInfo().getBitSize();
836  }
837 
838  void write(BitStreamWriter& writer) const override
839  {
840  writer.writeSignedBits64(Base::getValue(), Base::getTypeInfo().getBitSize());
841  }
842 };
843 
844 template <typename ALLOC, typename T>
846 
847 template <typename ALLOC>
848 class FixedUnsignedBitFieldReflectable<ALLOC, uint8_t> : public UInt8ReflectableBase<ALLOC>
849 {
850 private:
852 
853 public:
854  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
855  {
857  }
858 
859  FixedUnsignedBitFieldReflectable(uint8_t value, uint8_t bitSize) :
860  Base(typeInfo(bitSize), value)
861  {
862  if (bitSize > 8)
863  {
864  throw CppRuntimeException("FixedUnsignedBitFieldReflectable")
865  << " - invalid bit size '" << bitSize << "' for 'uint8_t' value!";
866  }
867  }
868 
869  size_t bitSizeOf(size_t) const override
870  {
871  return Base::getTypeInfo().getBitSize();
872  }
873 
874  void write(BitStreamWriter& writer) const override
875  {
876  writer.writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
877  }
878 };
879 
880 template <typename ALLOC>
881 class FixedUnsignedBitFieldReflectable<ALLOC, uint16_t> : public UInt16ReflectableBase<ALLOC>
882 {
883 private:
885 
886 public:
887  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
888  {
890  }
891 
892  FixedUnsignedBitFieldReflectable(uint16_t value, uint8_t bitSize) :
893  Base(typeInfo(bitSize), value)
894  {
895  if (bitSize <= 8 || bitSize > 16)
896  {
897  throw CppRuntimeException("FixedUnsignedBitFieldReflectable")
898  << " - invalid bit size '" << bitSize << "' for 'uint16_t' value!";
899  }
900  }
901 
902  size_t bitSizeOf(size_t) const override
903  {
904  return Base::getTypeInfo().getBitSize();
905  }
906 
907  void write(BitStreamWriter& writer) const override
908  {
909  writer.writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
910  }
911 };
912 
913 template <typename ALLOC>
914 class FixedUnsignedBitFieldReflectable<ALLOC, uint32_t> : public UInt32ReflectableBase<ALLOC>
915 {
916 private:
918 
919 public:
920  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
921  {
923  }
924 
925  FixedUnsignedBitFieldReflectable(uint32_t value, uint8_t bitSize) :
926  Base(typeInfo(bitSize), value)
927  {
928  if (bitSize <= 16 || bitSize > 32)
929  {
930  throw CppRuntimeException("FixedUnsignedBitFieldReflectable")
931  << " - invalid bit size '" << bitSize << "' for 'uint32_t' value!";
932  }
933  }
934 
935  size_t bitSizeOf(size_t) const override
936  {
937  return Base::getTypeInfo().getBitSize();
938  }
939 
940  void write(BitStreamWriter& writer) const override
941  {
942  writer.writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
943  }
944 };
945 
946 template <typename ALLOC>
947 class FixedUnsignedBitFieldReflectable<ALLOC, uint64_t> : public UInt64ReflectableBase<ALLOC>
948 {
949 private:
951 
952 public:
953  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t bitSize)
954  {
956  }
957 
958  FixedUnsignedBitFieldReflectable(uint64_t value, uint8_t bitSize) :
959  Base(typeInfo(bitSize), value)
960  {
961  if (bitSize <= 32) // check for maximum bit size (64) is done in type info
962  {
963  throw CppRuntimeException("FixedUnsignedBitFieldReflectable")
964  << " - invalid bit size '" << bitSize << "' for 'uint64_t' value!";
965  }
966  }
967 
968  size_t bitSizeOf(size_t) const override
969  {
970  return Base::getTypeInfo().getBitSize();
971  }
972 
973  void write(BitStreamWriter& writer) const override
974  {
975  writer.writeBits64(Base::getValue(), Base::getTypeInfo().getBitSize());
976  }
977 };
978 
979 template <typename ALLOC, typename T>
981 
982 template <typename ALLOC>
983 class DynamicSignedBitFieldReflectable<ALLOC, int8_t> : public Int8ReflectableBase<ALLOC>
984 {
985 private:
987 
988 public:
989  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
990  {
992  }
993 
994  DynamicSignedBitFieldReflectable(int8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
995  Base(typeInfo(maxBitSize), value),
996  m_dynamicBitSize(dynamicBitSize)
997  {
998  if (maxBitSize > 8)
999  {
1000  throw CppRuntimeException("DynamicSignedBitFieldReflectable")
1001  << " - invalid max bit size '" << maxBitSize << "' for 'int8_t' value!";
1002  }
1003 
1004  if (dynamicBitSize > maxBitSize)
1005  {
1006  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1007  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1008  }
1009  }
1010 
1011  size_t bitSizeOf(size_t) const override
1012  {
1013  return m_dynamicBitSize;
1014  }
1015 
1016  void write(BitStreamWriter& writer) const override
1017  {
1018  writer.writeSignedBits(Base::getValue(), m_dynamicBitSize);
1019  }
1020 
1021 private:
1022  uint8_t m_dynamicBitSize;
1023 };
1024 
1025 template <typename ALLOC>
1026 class DynamicSignedBitFieldReflectable<ALLOC, int16_t> : public Int16ReflectableBase<ALLOC>
1027 {
1028 private:
1030 
1031 public:
1032  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1033  {
1035  }
1036 
1037  DynamicSignedBitFieldReflectable(int16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1038  Base(typeInfo(maxBitSize), value),
1039  m_dynamicBitSize(dynamicBitSize)
1040  {
1041  if (maxBitSize <= 8 || maxBitSize > 16)
1042  {
1043  throw CppRuntimeException("DynamicSignedBitFieldReflectable")
1044  << " - invalid max bit size '" << maxBitSize << "' for 'int16_t' value!";
1045  }
1046 
1047  if (dynamicBitSize > maxBitSize)
1048  {
1049  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1050  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1051  }
1052  }
1053 
1054  size_t bitSizeOf(size_t) const override
1055  {
1056  return m_dynamicBitSize;
1057  }
1058 
1059  void write(BitStreamWriter& writer) const override
1060  {
1061  writer.writeSignedBits(Base::getValue(), m_dynamicBitSize);
1062  }
1063 
1064 private:
1065  uint8_t m_dynamicBitSize;
1066 };
1067 
1068 template <typename ALLOC>
1069 class DynamicSignedBitFieldReflectable<ALLOC, int32_t> : public Int32ReflectableBase<ALLOC>
1070 {
1071 private:
1073 
1074 public:
1075  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1076  {
1078  }
1079 
1080  DynamicSignedBitFieldReflectable(int32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1081  Base(typeInfo(maxBitSize), value),
1082  m_dynamicBitSize(dynamicBitSize)
1083  {
1084  if (maxBitSize <= 16 || maxBitSize > 32)
1085  {
1086  throw CppRuntimeException("DynamicSignedBitFieldReflectable")
1087  << " - invalid max bit size '" << maxBitSize << "' for 'int32_t' value!";
1088  }
1089 
1090  if (dynamicBitSize > maxBitSize)
1091  {
1092  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1093  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1094  }
1095  }
1096 
1097  size_t bitSizeOf(size_t) const override
1098  {
1099  return m_dynamicBitSize;
1100  }
1101 
1102  void write(BitStreamWriter& writer) const override
1103  {
1104  writer.writeSignedBits(Base::getValue(), m_dynamicBitSize);
1105  }
1106 
1107 private:
1108  uint8_t m_dynamicBitSize;
1109 };
1110 
1111 template <typename ALLOC>
1112 class DynamicSignedBitFieldReflectable<ALLOC, int64_t> : public Int64ReflectableBase<ALLOC>
1113 {
1114 private:
1116 
1117 public:
1118  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1119  {
1121  }
1122 
1123  DynamicSignedBitFieldReflectable(int64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1124  Base(typeInfo(maxBitSize), value),
1125  m_dynamicBitSize(dynamicBitSize)
1126  {
1127  if (maxBitSize <= 32) // check for maximum bit size (64) is done in type info
1128  {
1129  throw CppRuntimeException("DynamicSignedBitFieldReflectable")
1130  << " - invalid max bit size '" << maxBitSize << "' for 'int64_t' value!";
1131  }
1132 
1133  if (dynamicBitSize > maxBitSize)
1134  {
1135  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1136  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1137  }
1138  }
1139 
1140  size_t bitSizeOf(size_t) const override
1141  {
1142  return m_dynamicBitSize;
1143  }
1144 
1145  void write(BitStreamWriter& writer) const override
1146  {
1147  writer.writeSignedBits64(Base::getValue(), m_dynamicBitSize);
1148  }
1149 
1150 private:
1151  uint8_t m_dynamicBitSize;
1152 };
1153 
1154 template <typename ALLOC, typename T>
1156 
1157 template <typename ALLOC>
1158 class DynamicUnsignedBitFieldReflectable<ALLOC, uint8_t> : public UInt8ReflectableBase<ALLOC>
1159 {
1160 private:
1162 
1163 public:
1164  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1165  {
1167  }
1168 
1169  DynamicUnsignedBitFieldReflectable(uint8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1170  Base(typeInfo(maxBitSize), value),
1171  m_dynamicBitSize(dynamicBitSize)
1172  {
1173  if (maxBitSize > 8)
1174  {
1175  throw CppRuntimeException("DynamicUnsignedBitFieldReflectable")
1176  << " - invalid max bit size '" << maxBitSize << "' for 'uint8_t' value!";
1177  }
1178 
1179  if (dynamicBitSize > maxBitSize)
1180  {
1181  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1182  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1183  }
1184  }
1185 
1186  size_t bitSizeOf(size_t) const override
1187  {
1188  return m_dynamicBitSize;
1189  }
1190 
1191  void write(BitStreamWriter& writer) const override
1192  {
1193  writer.writeBits(Base::getValue(), m_dynamicBitSize);
1194  }
1195 
1196 private:
1197  uint8_t m_dynamicBitSize;
1198 };
1199 
1200 template <typename ALLOC>
1201 class DynamicUnsignedBitFieldReflectable<ALLOC, uint16_t> : public UInt16ReflectableBase<ALLOC>
1202 {
1203 private:
1205 
1206 public:
1207  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1208  {
1210  }
1211 
1212  DynamicUnsignedBitFieldReflectable(uint16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1213  Base(typeInfo(maxBitSize), value),
1214  m_dynamicBitSize(dynamicBitSize)
1215  {
1216  if (maxBitSize <= 8 || maxBitSize > 16)
1217  {
1218  throw CppRuntimeException("DynamicUnsignedBitFieldReflectable")
1219  << " - invalid max bit size '" << maxBitSize << "' for 'uint16_t' value!";
1220  }
1221 
1222  if (dynamicBitSize > maxBitSize)
1223  {
1224  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1225  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1226  }
1227  }
1228 
1229  size_t bitSizeOf(size_t) const override
1230  {
1231  return m_dynamicBitSize;
1232  }
1233 
1234  void write(BitStreamWriter& writer) const override
1235  {
1236  writer.writeBits(Base::getValue(), m_dynamicBitSize);
1237  }
1238 
1239 private:
1240  uint8_t m_dynamicBitSize;
1241 };
1242 
1243 template <typename ALLOC>
1244 class DynamicUnsignedBitFieldReflectable<ALLOC, uint32_t> : public UInt32ReflectableBase<ALLOC>
1245 {
1246 private:
1248 
1249 public:
1250  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1251  {
1253  }
1254 
1255  DynamicUnsignedBitFieldReflectable(uint32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1256  Base(typeInfo(maxBitSize), value),
1257  m_dynamicBitSize(dynamicBitSize)
1258  {
1259  if (maxBitSize <= 16 || maxBitSize > 32)
1260  {
1261  throw CppRuntimeException("DynamicUnsignedBitFieldReflectable")
1262  << " - invalid max bit size '" << maxBitSize << "' for 'uint32_t' value!";
1263  }
1264 
1265  if (dynamicBitSize > maxBitSize)
1266  {
1267  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1268  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1269  }
1270  }
1271 
1272  size_t bitSizeOf(size_t) const override
1273  {
1274  return m_dynamicBitSize;
1275  }
1276 
1277  void write(BitStreamWriter& writer) const override
1278  {
1279  writer.writeBits(Base::getValue(), m_dynamicBitSize);
1280  }
1281 
1282 private:
1283  uint8_t m_dynamicBitSize;
1284 };
1285 
1286 template <typename ALLOC>
1287 class DynamicUnsignedBitFieldReflectable<ALLOC, uint64_t> : public UInt64ReflectableBase<ALLOC>
1288 {
1289 private:
1291 
1292 public:
1293  static const IBasicTypeInfo<ALLOC>& typeInfo(uint8_t maxBitSize)
1294  {
1296  }
1297 
1298  DynamicUnsignedBitFieldReflectable(uint64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize) :
1299  Base(typeInfo(maxBitSize), value),
1300  m_dynamicBitSize(dynamicBitSize)
1301  {
1302  if (maxBitSize <= 32) // check for maximum bit size (64) is done in type info
1303  {
1304  throw CppRuntimeException("DynamicUnsignedBitFieldReflectable")
1305  << " - invalid max bit size '" << maxBitSize << "' for 'uint64_t' value!";
1306  }
1307 
1308  if (dynamicBitSize > maxBitSize)
1309  {
1310  throw CppRuntimeException("DynamicSignedBitFieldReflectable - dynamic bit size '")
1311  << dynamicBitSize << "' is greater than max bit size '" << maxBitSize << "'!";
1312  }
1313  }
1314 
1315  size_t bitSizeOf(size_t) const override
1316  {
1317  return m_dynamicBitSize;
1318  }
1319 
1320  void write(BitStreamWriter& writer) const override
1321  {
1322  writer.writeBits64(Base::getValue(), m_dynamicBitSize);
1323  }
1324 
1325 private:
1326  uint8_t m_dynamicBitSize;
1327 };
1328 
1332 template <typename ALLOC>
1334 {
1335 private:
1337 
1338 public:
1340  {
1342  }
1343 
1344  explicit VarInt16Reflectable(int16_t value) :
1345  Base(typeInfo(), value)
1346  {}
1347 
1348  size_t bitSizeOf(size_t) const override
1349  {
1351  }
1352 
1353  void write(BitStreamWriter& writer) const override
1354  {
1355  writer.writeVarInt16(Base::getValue());
1356  }
1357 };
1358 
1362 template <typename ALLOC>
1364 {
1365 private:
1367 
1368 public:
1370  {
1372  }
1373 
1374  explicit VarInt32Reflectable(int32_t value) :
1375  Base(typeInfo(), value)
1376  {}
1377 
1378  size_t bitSizeOf(size_t) const override
1379  {
1381  }
1382 
1383  void write(BitStreamWriter& writer) const override
1384  {
1385  writer.writeVarInt32(Base::getValue());
1386  }
1387 };
1388 
1392 template <typename ALLOC>
1394 {
1395 private:
1397 
1398 public:
1400  {
1402  }
1403 
1404  explicit VarInt64Reflectable(int64_t value) :
1405  Base(typeInfo(), value)
1406  {}
1407 
1408  size_t bitSizeOf(size_t) const override
1409  {
1411  }
1412 
1413  void write(BitStreamWriter& writer) const override
1414  {
1415  writer.writeVarInt64(Base::getValue());
1416  }
1417 };
1418 
1422 template <typename ALLOC>
1424 {
1425 private:
1427 
1428 public:
1430  {
1432  }
1433 
1434  explicit VarIntReflectable(int64_t value) :
1435  Base(typeInfo(), value)
1436  {}
1437 
1438  size_t bitSizeOf(size_t) const override
1439  {
1441  }
1442 
1443  void write(BitStreamWriter& writer) const override
1444  {
1445  writer.writeVarInt(Base::getValue());
1446  }
1447 };
1448 
1452 template <typename ALLOC>
1454 {
1455 private:
1457 
1458 public:
1460  {
1462  }
1463 
1464  explicit VarUInt16Reflectable(uint16_t value) :
1465  Base(typeInfo(), value)
1466  {}
1467 
1468  size_t bitSizeOf(size_t) const override
1469  {
1471  }
1472 
1473  void write(BitStreamWriter& writer) const override
1474  {
1475  writer.writeVarUInt16(Base::getValue());
1476  }
1477 };
1478 
1482 template <typename ALLOC>
1484 {
1485 private:
1487 
1488 public:
1490  {
1492  }
1493 
1494  explicit VarUInt32Reflectable(uint32_t value) :
1495  Base(typeInfo(), value)
1496  {}
1497 
1498  size_t bitSizeOf(size_t) const override
1499  {
1501  }
1502 
1503  void write(BitStreamWriter& writer) const override
1504  {
1505  writer.writeVarUInt32(Base::getValue());
1506  }
1507 };
1508 
1512 template <typename ALLOC>
1514 {
1515 private:
1517 
1518 public:
1520  {
1522  }
1523 
1524  explicit VarUInt64Reflectable(uint64_t value) :
1525  Base(typeInfo(), value)
1526  {}
1527 
1528  size_t bitSizeOf(size_t) const override
1529  {
1531  }
1532 
1533  void write(BitStreamWriter& writer) const override
1534  {
1535  writer.writeVarUInt64(Base::getValue());
1536  }
1537 };
1538 
1542 template <typename ALLOC>
1544 {
1545 private:
1547 
1548 public:
1550  {
1552  }
1553 
1554  explicit VarUIntReflectable(uint64_t value) :
1555  Base(typeInfo(), value)
1556  {}
1557 
1558  size_t bitSizeOf(size_t) const override
1559  {
1561  }
1562 
1563  void write(BitStreamWriter& writer) const override
1564  {
1565  writer.writeVarUInt(Base::getValue());
1566  }
1567 };
1568 
1572 template <typename ALLOC>
1574 {
1575 private:
1577 
1578 public:
1580  {
1582  }
1583 
1584  explicit VarSizeReflectable(uint32_t value) :
1585  Base(typeInfo(), value)
1586  {}
1587 
1588  size_t bitSizeOf(size_t) const override
1589  {
1591  }
1592 
1593  void write(BitStreamWriter& writer) const override
1594  {
1595  writer.writeVarSize(Base::getValue());
1596  }
1597 };
1598 
1602 template <typename ALLOC, typename T>
1604 {
1605 protected:
1606  static_assert(std::is_floating_point<T>::value, "T must be a floating point type!");
1607 
1610 
1611 public:
1612  double toDouble() const override
1613  {
1614  return static_cast<double>(getValue());
1615  }
1616 };
1617 
1621 template <typename ALLOC>
1623 {
1624 private:
1626 
1627 public:
1629  {
1631  }
1632 
1633  explicit Float16Reflectable(float value) :
1634  Base(typeInfo(), value)
1635  {}
1636 
1637  size_t bitSizeOf(size_t) const override
1638  {
1639  return 16;
1640  }
1641 
1642  void write(BitStreamWriter& writer) const override
1643  {
1644  writer.writeFloat16(Base::getValue());
1645  }
1646 
1647  float getFloat() const override
1648  {
1649  return Base::getValue();
1650  }
1651 };
1652 
1656 template <typename ALLOC>
1658 {
1659 private:
1661 
1662 public:
1664  {
1666  }
1667 
1668  explicit Float32Reflectable(float value) :
1669  Base(typeInfo(), value)
1670  {}
1671 
1672  size_t bitSizeOf(size_t) const override
1673  {
1674  return 32;
1675  }
1676 
1677  void write(BitStreamWriter& writer) const override
1678  {
1679  writer.writeFloat32(Base::getValue());
1680  }
1681 
1682  float getFloat() const override
1683  {
1684  return Base::getValue();
1685  }
1686 };
1687 
1691 template <typename ALLOC>
1693 {
1694 private:
1696 
1697 public:
1699  {
1701  }
1702 
1703  explicit Float64Reflectable(double value) :
1704  Base(typeInfo(), value)
1705  {}
1706 
1707  size_t bitSizeOf(size_t) const override
1708  {
1709  return 64;
1710  }
1711 
1712  void write(BitStreamWriter& writer) const override
1713  {
1714  writer.writeFloat64(Base::getValue());
1715  }
1716 
1717  double getDouble() const override
1718  {
1719  return Base::getValue();
1720  }
1721 };
1722 
1726 template <typename ALLOC>
1727 class BytesReflectable : public BuiltinReflectableBase<ALLOC, Span<const uint8_t>>
1728 {
1729 private:
1731 
1732 public:
1734  {
1736  }
1737 
1739  Base(typeInfo(), value)
1740  {}
1741 
1742  size_t bitSizeOf(size_t) const override
1743  {
1745  }
1746 
1747  void write(BitStreamWriter& writer) const override
1748  {
1749  writer.writeBytes(Base::getValue());
1750  }
1751 
1753  {
1754  return Base::getValue();
1755  }
1756 };
1757 
1761 template <typename ALLOC>
1762 class StringReflectable : public BuiltinReflectableBase<ALLOC, StringView>
1763 {
1764 private:
1766 
1767 public:
1769  {
1771  }
1772 
1773  explicit StringReflectable(StringView value) :
1774  Base(typeInfo(), value)
1775  {}
1776 
1777  size_t bitSizeOf(size_t) const override
1778  {
1780  }
1781 
1782  void write(BitStreamWriter& writer) const override
1783  {
1784  writer.writeString(Base::getValue());
1785  }
1786 
1787  StringView getStringView() const override
1788  {
1789  return Base::getValue();
1790  }
1791 
1792  string<ALLOC> toString(const ALLOC& allocator) const override
1793  {
1794  return zserio::toString(Base::getValue(), allocator);
1795  }
1796 };
1797 
1801 template <typename ALLOC>
1802 class BitBufferReflectable : public BuiltinReflectableBase<ALLOC, BasicBitBuffer<ALLOC>>
1803 {
1804 private:
1806 
1807 public:
1809  {
1811  }
1812 
1814  Base(typeInfo(), value)
1815  {}
1816 
1817  size_t bitSizeOf(size_t) const override
1818  {
1820  }
1821 
1822  void write(BitStreamWriter& writer) const override
1823  {
1824  writer.writeBitBuffer(Base::getValue());
1825  }
1826 
1827  const BasicBitBuffer<ALLOC>& getBitBuffer() const override
1828  {
1829  return Base::getValue();
1830  }
1831 };
1832 
1833 namespace detail
1834 {
1835 
1836 template <typename ALLOC>
1837 IBasicReflectableConstPtr<ALLOC> getFieldFromObject(const IBasicReflectable<ALLOC>& object, StringView name)
1838 {
1839  const auto& typeInfo = object.getTypeInfo();
1840  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1841  {
1842  const auto& fields = typeInfo.getFields();
1843  auto fieldsIt = std::find_if(fields.begin(), fields.end(),
1844  [name](const BasicFieldInfo<ALLOC>& fieldInfo) { return fieldInfo.schemaName == name; });
1845  if (fieldsIt != fields.end())
1846  {
1847  return object.getField(name);
1848  }
1849  }
1850 
1851  return nullptr;
1852 }
1853 
1854 template <typename ALLOC>
1855 IBasicReflectablePtr<ALLOC> getFieldFromObject(IBasicReflectable<ALLOC>& object, StringView name)
1856 {
1857  const auto& typeInfo = object.getTypeInfo();
1858  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1859  {
1860  const auto& fields = typeInfo.getFields();
1861  auto fieldsIt = std::find_if(fields.begin(), fields.end(),
1862  [name](const BasicFieldInfo<ALLOC>& fieldInfo) { return fieldInfo.schemaName == name; });
1863  if (fieldsIt != fields.end())
1864  {
1865  return object.getField(name);
1866  }
1867  }
1868 
1869  return nullptr;
1870 }
1871 
1872 template <typename ALLOC>
1873 IBasicReflectableConstPtr<ALLOC> getParameterFromObject(const IBasicReflectable<ALLOC>& object, StringView name)
1874 {
1875  const auto& typeInfo = object.getTypeInfo();
1876  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1877  {
1878  const auto& parameters = typeInfo.getParameters();
1879  auto parametersIt = std::find_if(
1880  parameters.begin(), parameters.end(), [name](const BasicParameterInfo<ALLOC>& parameterInfo) {
1881  return parameterInfo.schemaName == name;
1882  });
1883  if (parametersIt != parameters.end())
1884  {
1885  return object.getParameter(name);
1886  }
1887  }
1888 
1889  return nullptr;
1890 }
1891 
1892 template <typename ALLOC>
1893 IBasicReflectablePtr<ALLOC> getParameterFromObject(IBasicReflectable<ALLOC>& object, StringView name)
1894 {
1895  const auto& typeInfo = object.getTypeInfo();
1896  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1897  {
1898  const auto& parameters = typeInfo.getParameters();
1899  auto parametersIt = std::find_if(
1900  parameters.begin(), parameters.end(), [name](const BasicParameterInfo<ALLOC>& parameterInfo) {
1901  return parameterInfo.schemaName == name;
1902  });
1903  if (parametersIt != parameters.end())
1904  {
1905  return object.getParameter(name);
1906  }
1907  }
1908 
1909  return nullptr;
1910 }
1911 
1912 template <typename ALLOC>
1913 IBasicReflectableConstPtr<ALLOC> callFunctionInObject(const IBasicReflectable<ALLOC>& object, StringView name)
1914 {
1915  const auto& typeInfo = object.getTypeInfo();
1916  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1917  {
1918  const auto& functions = typeInfo.getFunctions();
1919  auto functionsIt = std::find_if(
1920  functions.begin(), functions.end(), [name](const BasicFunctionInfo<ALLOC>& functionInfo) {
1921  return functionInfo.schemaName == name;
1922  });
1923  if (functionsIt != functions.end())
1924  {
1925  return object.callFunction(name);
1926  }
1927  }
1928 
1929  return nullptr;
1930 }
1931 
1932 template <typename ALLOC>
1933 IBasicReflectablePtr<ALLOC> callFunctionInObject(IBasicReflectable<ALLOC>& object, StringView name)
1934 {
1935  const auto& typeInfo = object.getTypeInfo();
1936  if (TypeInfoUtil::isCompound(typeInfo.getSchemaType()))
1937  {
1938  const auto& functions = typeInfo.getFunctions();
1939  auto functionsIt = std::find_if(
1940  functions.begin(), functions.end(), [name](const BasicFunctionInfo<ALLOC>& functionInfo) {
1941  return functionInfo.schemaName == name;
1942  });
1943  if (functionsIt != functions.end())
1944  {
1945  return object.callFunction(name);
1946  }
1947  }
1948 
1949  return nullptr;
1950 }
1951 
1952 template <typename ALLOC>
1953 IBasicReflectableConstPtr<ALLOC> getFromObject(
1954  const IBasicReflectable<ALLOC>& object, StringView path, size_t pos)
1955 {
1956  try
1957  {
1958  const size_t dotPos = path.find('.', pos);
1959  const bool isLast = dotPos == StringView::npos;
1960  const StringView name = path.substr(pos, dotPos == StringView::npos ? StringView::npos : dotPos - pos);
1961 
1962  auto field = getFieldFromObject(object, name);
1963  if (field)
1964  {
1965  return isLast ? std::move(field) : getFromObject(*field, path, dotPos + 1);
1966  }
1967 
1968  auto parameter = getParameterFromObject(object, name);
1969  if (parameter)
1970  {
1971  return isLast ? std::move(parameter) : getFromObject(*parameter, path, dotPos + 1);
1972  }
1973 
1974  auto functionResult = callFunctionInObject(object, name);
1975  if (functionResult)
1976  {
1977  return isLast ? std::move(functionResult) : getFromObject(*functionResult, path, dotPos + 1);
1978  }
1979  }
1980  catch (const CppRuntimeException&)
1981  {}
1982 
1983  return nullptr;
1984 }
1985 
1986 template <typename ALLOC>
1987 IBasicReflectablePtr<ALLOC> getFromObject(IBasicReflectable<ALLOC>& object, StringView path, size_t pos)
1988 {
1989  try
1990  {
1991  const size_t dotPos = path.find('.', pos);
1992  const bool isLast = dotPos == StringView::npos;
1993  const StringView name = path.substr(pos, dotPos == StringView::npos ? StringView::npos : dotPos - pos);
1994 
1995  auto field = getFieldFromObject(object, name);
1996  if (field)
1997  {
1998  return isLast ? std::move(field) : getFromObject(*field, path, dotPos + 1);
1999  }
2000 
2001  auto parameter = getParameterFromObject(object, name);
2002  if (parameter)
2003  {
2004  return isLast ? std::move(parameter) : getFromObject(*parameter, path, dotPos + 1);
2005  }
2006 
2007  auto functionResult = callFunctionInObject(object, name);
2008  if (functionResult)
2009  {
2010  return isLast ? std::move(functionResult) : getFromObject(*functionResult, path, dotPos + 1);
2011  }
2012  }
2013  catch (const CppRuntimeException&)
2014  {}
2015 
2016  return nullptr;
2017 }
2018 
2019 } // namespace detail
2020 
2024 template <typename ALLOC>
2026 {
2027 public:
2028  ReflectableAllocatorHolderBase(const IBasicTypeInfo<ALLOC>& typeInfo, const ALLOC& allocator) :
2029  ReflectableBase<ALLOC>(typeInfo),
2030  AllocatorHolder<ALLOC>(allocator)
2031  {}
2032 };
2033 
2039 template <typename ALLOC>
2041 {
2042 private:
2044 
2045 public:
2046  using Base::Base;
2047  using Base::getTypeInfo;
2048 
2049  void initializeChildren() override;
2050  void initialize(const vector<AnyHolder<ALLOC>, ALLOC>& typeArguments) override;
2051  size_t initializeOffsets(size_t bitPosition) override;
2052 
2054  void setField(StringView name, const AnyHolder<ALLOC>& value) override;
2057 
2058  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override;
2059 };
2060 
2066 template <typename ALLOC>
2068 {
2069 private:
2071 
2072 public:
2073  using Base::Base;
2074  using Base::getTypeInfo;
2075 
2076  bool isArray() const override
2077  {
2078  return true;
2079  }
2080 
2081  void initializeChildren() override;
2082  void initialize(const vector<AnyHolder<ALLOC>, ALLOC>& typeArguments) override;
2083  size_t initializeOffsets(size_t bitPosition) override;
2084  size_t bitSizeOf(size_t bitPosition) const override;
2085  void write(BitStreamWriter& writer) const override;
2086 
2090  void setField(StringView name, const AnyHolder<ALLOC>& value) override;
2095 
2096  StringView getChoice() const override;
2097 
2098  IBasicReflectableConstPtr<ALLOC> operator[](size_t index) const override;
2099  IBasicReflectablePtr<ALLOC> operator[](size_t index) override;
2100 
2101  bool getBool() const override;
2102  int8_t getInt8() const override;
2103  int16_t getInt16() const override;
2104  int32_t getInt32() const override;
2105  int64_t getInt64() const override;
2106  uint8_t getUInt8() const override;
2107  uint16_t getUInt16() const override;
2108  uint32_t getUInt32() const override;
2109  uint64_t getUInt64() const override;
2110  float getFloat() const override;
2111  double getDouble() const override;
2112  Span<const uint8_t> getBytes() const override;
2113  StringView getStringView() const override;
2114  const BasicBitBuffer<ALLOC>& getBitBuffer() const override;
2115 
2116  int64_t toInt() const override;
2117  uint64_t toUInt() const override;
2118  double toDouble() const override;
2119  string<ALLOC> toString(const ALLOC& allocator) const override;
2120 };
2121 
2127 template <typename ALLOC>
2129 {
2130 private:
2132 
2133 public:
2134  using Base::Base;
2135  using Base::getTypeInfo;
2136 
2137  void resize(size_t index) override;
2138  IBasicReflectablePtr<ALLOC> at(size_t index) override;
2139  IBasicReflectablePtr<ALLOC> operator[](size_t index) override;
2140  void setAt(const AnyHolder<ALLOC>& value, size_t index) override;
2141  void append(const AnyHolder<ALLOC>& value) override;
2142 
2143  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override;
2144 };
2145 
2150 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2152 {
2153 private:
2155 
2156  using ElementReflectable = ELEMENT_REFLECTABLE;
2157 
2158 public:
2159  using Base::at;
2160  using Base::getTypeInfo;
2161  using Base::operator[];
2162  using Base::getAnyValue;
2163 
2164  BuiltinReflectableConstArray(const ALLOC& allocator, const RAW_ARRAY& rawArray) :
2165  Base(ElementReflectable::typeInfo(), allocator),
2166  m_rawArray(rawArray)
2167  {}
2168 
2169  size_t size() const override
2170  {
2171  return m_rawArray.size();
2172  }
2173 
2174  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2175  {
2176  if (index >= size())
2177  {
2178  throw CppRuntimeException("Index ")
2179  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2180  << "' of size " << size() << "!";
2181  }
2182 
2183  return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2184  }
2185 
2186  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2187  {
2188  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2189  }
2190 
2191 private:
2192  const RAW_ARRAY& m_rawArray;
2193 };
2194 
2195 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2197 {
2198 private:
2200 
2201  using ElementReflectable = ELEMENT_REFLECTABLE;
2202 
2203 public:
2204  using Base::getTypeInfo;
2205 
2206  BuiltinReflectableArray(const ALLOC& allocator, RAW_ARRAY& rawArray) :
2207  Base(ElementReflectable::typeInfo(), allocator),
2208  m_rawArray(rawArray)
2209  {}
2210 
2211  size_t size() const override
2212  {
2213  return m_rawArray.size();
2214  }
2215 
2216  void resize(size_t size) override
2217  {
2218  m_rawArray.resize(size);
2219  }
2220 
2221  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2222  {
2223  if (index >= size())
2224  {
2225  throw CppRuntimeException("Index ")
2226  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2227  << "' of size " << size() << "!";
2228  }
2229 
2230  return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2231  }
2232 
2233  IBasicReflectablePtr<ALLOC> at(size_t index) override
2234  {
2235  if (index >= size())
2236  {
2237  throw CppRuntimeException("Index ")
2238  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2239  << "' of size " << size() << "!";
2240  }
2241 
2242  return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2243  }
2244 
2245  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
2246  {
2247  if (index >= size())
2248  {
2249  throw CppRuntimeException("Index ")
2250  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2251  << "' of size " << size() << "!";
2252  }
2253 
2254  m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2255  }
2256 
2257  void append(const AnyHolder<ALLOC>& value) override
2258  {
2259  m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2260  }
2261 
2262  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2263  {
2264  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2265  }
2266 
2267  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
2268  {
2269  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
2270  }
2271 
2272 private:
2273  RAW_ARRAY& m_rawArray;
2274 };
2281 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2283 {
2284 private:
2286 
2287  using ElementReflectable = ELEMENT_REFLECTABLE;
2288 
2289 public:
2290  using Base::at;
2291  using Base::getTypeInfo;
2292  using Base::operator[];
2293  using Base::getAnyValue;
2294 
2295  FixedBitFieldReflectableConstArray(const ALLOC& allocator, const RAW_ARRAY& rawArray, uint8_t bitSize) :
2296  Base(ElementReflectable::typeInfo(bitSize), allocator),
2297  m_rawArray(rawArray)
2298  {}
2299 
2300  size_t size() const override
2301  {
2302  return m_rawArray.size();
2303  }
2304 
2305  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2306  {
2307  if (index >= size())
2308  {
2309  throw CppRuntimeException("Index ")
2310  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2311  << "' of size " << size() << "!";
2312  }
2313 
2314  return std::allocate_shared<ElementReflectable>(
2315  Base::get_allocator(), m_rawArray[index], getTypeInfo().getBitSize());
2316  }
2317 
2318  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2319  {
2320  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2321  }
2322 
2323 private:
2324  const RAW_ARRAY& m_rawArray;
2325 };
2326 
2327 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2329 {
2330 private:
2332 
2333  using ElementReflectable = ELEMENT_REFLECTABLE;
2334 
2335 public:
2336  using Base::getTypeInfo;
2337 
2338  FixedBitFieldReflectableArray(const ALLOC& allocator, RAW_ARRAY& rawArray, uint8_t bitSize) :
2339  Base(ElementReflectable::typeInfo(bitSize), allocator),
2340  m_rawArray(rawArray)
2341  {}
2342 
2343  size_t size() const override
2344  {
2345  return m_rawArray.size();
2346  }
2347 
2348  void resize(size_t size) override
2349  {
2350  m_rawArray.resize(size);
2351  }
2352 
2353  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2354  {
2355  if (index >= size())
2356  {
2357  throw CppRuntimeException("Index ")
2358  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2359  << "' of size " << size() << "!";
2360  }
2361 
2362  return std::allocate_shared<ElementReflectable>(
2363  Base::get_allocator(), m_rawArray[index], getTypeInfo().getBitSize());
2364  }
2365 
2366  IBasicReflectablePtr<ALLOC> at(size_t index) override
2367  {
2368  if (index >= size())
2369  {
2370  throw CppRuntimeException("Index ")
2371  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2372  << "' of size " << size() << "!";
2373  }
2374 
2375  return std::allocate_shared<ElementReflectable>(
2376  Base::get_allocator(), m_rawArray[index], getTypeInfo().getBitSize());
2377  }
2378 
2379  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
2380  {
2381  if (index >= size())
2382  {
2383  throw CppRuntimeException("Index ")
2384  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2385  << "' of size " << size() << "!";
2386  }
2387 
2388  m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2389  }
2390 
2391  void append(const AnyHolder<ALLOC>& value) override
2392  {
2393  m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2394  }
2395 
2396  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2397  {
2398  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2399  }
2400 
2401  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
2402  {
2403  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
2404  }
2405 
2406 private:
2407  RAW_ARRAY& m_rawArray;
2408 };
2415 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2417 {
2418 private:
2420 
2421  using ElementReflectable = ELEMENT_REFLECTABLE;
2422 
2423 public:
2424  using Base::at;
2425  using Base::getTypeInfo;
2426  using Base::operator[];
2427  using Base::getAnyValue;
2428 
2430  const ALLOC& allocator, const RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize) :
2431  Base(ElementReflectable::typeInfo(maxBitSize), allocator),
2432  m_rawArray(rawArray),
2433  m_maxBitSize(maxBitSize),
2434  m_dynamicBitSize(dynamicBitSize)
2435  {}
2436 
2437  size_t size() const override
2438  {
2439  return m_rawArray.size();
2440  }
2441 
2442  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2443  {
2444  if (index >= size())
2445  {
2446  throw CppRuntimeException("Index ")
2447  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2448  << "' of size " << size() << "!";
2449  }
2450 
2451  return std::allocate_shared<ElementReflectable>(
2452  Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2453  }
2454 
2455  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2456  {
2457  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2458  }
2459 
2460 private:
2461  const RAW_ARRAY& m_rawArray;
2462  const uint8_t m_maxBitSize;
2463  const uint8_t m_dynamicBitSize;
2464 };
2465 
2466 template <typename ALLOC, typename RAW_ARRAY, typename ELEMENT_REFLECTABLE>
2468 {
2469 private:
2471 
2472  using ElementReflectable = ELEMENT_REFLECTABLE;
2473 
2474 public:
2475  using Base::getTypeInfo;
2476 
2478  const ALLOC& allocator, RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize) :
2479  Base(ElementReflectable::typeInfo(maxBitSize), allocator),
2480  m_rawArray(rawArray),
2481  m_maxBitSize(maxBitSize),
2482  m_dynamicBitSize(dynamicBitSize)
2483  {}
2484 
2485  size_t size() const override
2486  {
2487  return m_rawArray.size();
2488  }
2489 
2490  void resize(size_t size) override
2491  {
2492  m_rawArray.resize(size);
2493  }
2494 
2495  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2496  {
2497  if (index >= size())
2498  {
2499  throw CppRuntimeException("Index ")
2500  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2501  << "' of size " << size() << "!";
2502  }
2503 
2504  return std::allocate_shared<ElementReflectable>(
2505  Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2506  }
2507 
2508  IBasicReflectablePtr<ALLOC> at(size_t index) override
2509  {
2510  if (index >= size())
2511  {
2512  throw CppRuntimeException("Index ")
2513  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2514  << "' of size " << size() << "!";
2515  }
2516 
2517  return std::allocate_shared<ElementReflectable>(
2518  Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2519  }
2520 
2521  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
2522  {
2523  if (index >= size())
2524  {
2525  throw CppRuntimeException("Index ")
2526  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2527  << "' of size " << size() << "!";
2528  }
2529 
2530  m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2531  }
2532 
2533  void append(const AnyHolder<ALLOC>& value) override
2534  {
2535  m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2536  }
2537 
2538  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2539  {
2540  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2541  }
2542 
2543  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
2544  {
2545  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
2546  }
2547 
2548 private:
2549  RAW_ARRAY& m_rawArray;
2550  const uint8_t m_maxBitSize;
2551  const uint8_t m_dynamicBitSize;
2552 };
2559 template <typename ALLOC, typename RAW_ARRAY>
2561 template <typename ALLOC, typename RAW_ARRAY>
2563 
2564 template <typename ALLOC, typename RAW_ARRAY>
2566 template <typename ALLOC, typename RAW_ARRAY>
2568 
2569 template <typename ALLOC, typename RAW_ARRAY>
2571 template <typename ALLOC, typename RAW_ARRAY>
2573 
2574 template <typename ALLOC, typename RAW_ARRAY>
2576 template <typename ALLOC, typename RAW_ARRAY>
2578 
2579 template <typename ALLOC, typename RAW_ARRAY>
2581 template <typename ALLOC, typename RAW_ARRAY>
2583 
2584 template <typename ALLOC, typename RAW_ARRAY>
2586 template <typename ALLOC, typename RAW_ARRAY>
2588 
2589 template <typename ALLOC, typename RAW_ARRAY>
2591 template <typename ALLOC, typename RAW_ARRAY>
2593 
2594 template <typename ALLOC, typename RAW_ARRAY>
2596 template <typename ALLOC, typename RAW_ARRAY>
2598 
2599 template <typename ALLOC, typename RAW_ARRAY>
2601 template <typename ALLOC, typename RAW_ARRAY>
2603 
2604 template <typename ALLOC, typename RAW_ARRAY>
2607 template <typename ALLOC, typename RAW_ARRAY>
2610 
2611 template <typename ALLOC, typename RAW_ARRAY>
2614 template <typename ALLOC, typename RAW_ARRAY>
2617 
2618 template <typename ALLOC, typename RAW_ARRAY>
2621 template <typename ALLOC, typename RAW_ARRAY>
2624 
2625 template <typename ALLOC, typename RAW_ARRAY>
2628 template <typename ALLOC, typename RAW_ARRAY>
2631 
2632 template <typename ALLOC, typename RAW_ARRAY>
2635 template <typename ALLOC, typename RAW_ARRAY>
2637 
2638 template <typename ALLOC, typename RAW_ARRAY>
2641 template <typename ALLOC, typename RAW_ARRAY>
2643 
2644 template <typename ALLOC, typename RAW_ARRAY>
2647 template <typename ALLOC, typename RAW_ARRAY>
2649 
2650 template <typename ALLOC, typename RAW_ARRAY>
2652 template <typename ALLOC, typename RAW_ARRAY>
2654 
2655 template <typename ALLOC, typename RAW_ARRAY>
2658 template <typename ALLOC, typename RAW_ARRAY>
2660 
2661 template <typename ALLOC, typename RAW_ARRAY>
2664 template <typename ALLOC, typename RAW_ARRAY>
2666 
2667 template <typename ALLOC, typename RAW_ARRAY>
2670 template <typename ALLOC, typename RAW_ARRAY>
2672 
2673 template <typename ALLOC, typename RAW_ARRAY>
2675 template <typename ALLOC, typename RAW_ARRAY>
2677 
2678 template <typename ALLOC, typename RAW_ARRAY>
2680 template <typename ALLOC, typename RAW_ARRAY>
2682 
2683 template <typename ALLOC, typename RAW_ARRAY>
2685 template <typename ALLOC, typename RAW_ARRAY>
2687 
2688 template <typename ALLOC, typename RAW_ARRAY>
2690 template <typename ALLOC, typename RAW_ARRAY>
2692 
2693 template <typename ALLOC, typename RAW_ARRAY>
2695 template <typename ALLOC, typename RAW_ARRAY>
2697 
2698 template <typename ALLOC, typename RAW_ARRAY>
2700 template <typename ALLOC, typename RAW_ARRAY>
2702 
2703 template <typename ALLOC, typename RAW_ARRAY>
2705 template <typename ALLOC, typename RAW_ARRAY>
2707 
2708 template <typename ALLOC, typename RAW_ARRAY>
2711 template <typename ALLOC, typename RAW_ARRAY>
2719 template <typename ALLOC, typename RAW_ARRAY>
2721 {
2722 private:
2724 
2725  using ElementType = typename RAW_ARRAY::value_type;
2726 
2727 public:
2728  using Base::at;
2729  using Base::getTypeInfo;
2730  using Base::operator[];
2731  using Base::getAnyValue;
2732 
2733  CompoundReflectableConstArray(const ALLOC& allocator, const RAW_ARRAY& rawArray) :
2734  Base(ElementType::typeInfo(), allocator),
2735  m_rawArray(rawArray)
2736  {}
2737 
2738  size_t size() const override
2739  {
2740  return m_rawArray.size();
2741  }
2742 
2743  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2744  {
2745  if (index >= size())
2746  {
2747  throw CppRuntimeException("Index ")
2748  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2749  << "' of size " << size() << "!";
2750  }
2751 
2752  return m_rawArray[index].reflectable(Base::get_allocator());
2753  }
2754 
2755  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2756  {
2757  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2758  }
2759 
2760 private:
2761  const RAW_ARRAY& m_rawArray;
2762 };
2763 
2764 template <typename ALLOC, typename RAW_ARRAY>
2766 {
2767 private:
2769 
2770  using ElementType = typename RAW_ARRAY::value_type;
2771 
2772 public:
2773  using Base::getTypeInfo;
2774 
2775  CompoundReflectableArray(const ALLOC& allocator, RAW_ARRAY& rawArray) :
2776  Base(ElementType::typeInfo(), allocator),
2777  m_rawArray(rawArray)
2778  {}
2779 
2780  size_t size() const override
2781  {
2782  return m_rawArray.size();
2783  }
2784 
2785  void resize(size_t size) override
2786  {
2787  m_rawArray.resize(size);
2788  }
2789 
2790  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2791  {
2792  if (index >= size())
2793  {
2794  throw CppRuntimeException("Index ")
2795  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2796  << "' of size " << size() << "!";
2797  }
2798 
2799  return m_rawArray[index].reflectable(Base::get_allocator());
2800  }
2801 
2802  IBasicReflectablePtr<ALLOC> at(size_t index) override
2803  {
2804  if (index >= size())
2805  {
2806  throw CppRuntimeException("Index ")
2807  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2808  << "' of size " << size() << "!";
2809  }
2810 
2811  return m_rawArray[index].reflectable(Base::get_allocator());
2812  }
2813 
2814  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
2815  {
2816  if (index >= size())
2817  {
2818  throw CppRuntimeException("Index ")
2819  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2820  << "' of size " << size() << "!";
2821  }
2822 
2823  m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2824  }
2825 
2826  void append(const AnyHolder<ALLOC>& value) override
2827  {
2828  m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2829  }
2830 
2831  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2832  {
2833  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2834  }
2835 
2836  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
2837  {
2838  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
2839  }
2840 
2841 private:
2842  RAW_ARRAY& m_rawArray;
2843 };
2848 template <typename ALLOC, typename RAW_ARRAY>
2850 {
2851 private:
2853 
2854  using ElementType = typename RAW_ARRAY::value_type;
2855 
2856 public:
2857  using Base::at;
2858  using Base::getTypeInfo;
2859  using Base::operator[];
2860  using Base::getAnyValue;
2861 
2862  BitmaskReflectableConstArray(const ALLOC& allocator, const RAW_ARRAY& rawArray) :
2863  Base(ElementType::typeInfo(), allocator),
2864  m_rawArray(rawArray)
2865  {}
2866 
2867  size_t size() const override
2868  {
2869  return m_rawArray.size();
2870  }
2871 
2872  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2873  {
2874  if (index >= size())
2875  {
2876  throw CppRuntimeException("Index ")
2877  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2878  << "' of size " << size() << "!";
2879  }
2880 
2881  return m_rawArray[index].reflectable(Base::get_allocator());
2882  }
2883 
2884  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2885  {
2886  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2887  }
2888 
2889 private:
2890  const RAW_ARRAY& m_rawArray;
2891 };
2892 
2893 template <typename ALLOC, typename RAW_ARRAY>
2895 {
2896 private:
2898 
2899  using ElementType = typename RAW_ARRAY::value_type;
2900  using UnderlyingElementType = typename ElementType::underlying_type;
2901 
2902 public:
2903  using Base::getTypeInfo;
2904 
2905  BitmaskReflectableArray(const ALLOC& allocator, RAW_ARRAY& rawArray) :
2906  Base(ElementType::typeInfo(), allocator),
2907  m_rawArray(rawArray)
2908  {}
2909 
2910  size_t size() const override
2911  {
2912  return m_rawArray.size();
2913  }
2914 
2915  void resize(size_t size) override
2916  {
2917  m_rawArray.resize(size);
2918  }
2919 
2920  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
2921  {
2922  if (index >= size())
2923  {
2924  throw CppRuntimeException("Index ")
2925  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2926  << "' of size " << size() << "!";
2927  }
2928 
2929  return m_rawArray[index].reflectable(Base::get_allocator());
2930  }
2931 
2932  IBasicReflectablePtr<ALLOC> at(size_t index) override
2933  {
2934  if (index >= size())
2935  {
2936  throw CppRuntimeException("Index ")
2937  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2938  << "' of size " << size() << "!";
2939  }
2940 
2941  return m_rawArray[index].reflectable(Base::get_allocator());
2942  }
2943 
2944  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
2945  {
2946  if (index >= size())
2947  {
2948  throw CppRuntimeException("Index ")
2949  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
2950  << "' of size " << size() << "!";
2951  }
2952 
2953  if (value.template isType<ElementType>())
2954  {
2955  m_rawArray[index] = value.template get<ElementType>();
2956  }
2957  else
2958  {
2959  m_rawArray[index] = ElementType(value.template get<UnderlyingElementType>());
2960  }
2961  }
2962 
2963  void append(const AnyHolder<ALLOC>& value) override
2964  {
2965  if (value.template isType<ElementType>())
2966  {
2967  m_rawArray.push_back(value.template get<ElementType>());
2968  }
2969  else
2970  {
2971  m_rawArray.push_back(ElementType(value.template get<UnderlyingElementType>()));
2972  }
2973  }
2974 
2975  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
2976  {
2977  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
2978  }
2979 
2980  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
2981  {
2982  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
2983  }
2984 
2985 private:
2986  RAW_ARRAY& m_rawArray;
2987 };
2992 template <typename ALLOC, typename RAW_ARRAY>
2994 {
2995 private:
2997 
2998  using ElementType = typename RAW_ARRAY::value_type;
2999 
3000 public:
3001  using Base::at;
3002  using Base::getTypeInfo;
3003  using Base::operator[];
3004  using Base::getAnyValue;
3005 
3006  EnumReflectableConstArray(const ALLOC& allocator, const RAW_ARRAY& rawArray) :
3007  Base(enumTypeInfo<ElementType, ALLOC>(), allocator),
3008  m_rawArray(rawArray)
3009  {}
3010 
3011  size_t size() const override
3012  {
3013  return m_rawArray.size();
3014  }
3015 
3016  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
3017  {
3018  if (index >= size())
3019  {
3020  throw CppRuntimeException("Index ")
3021  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
3022  << "' of size " << size() << "!";
3023  }
3024 
3025  return enumReflectable(m_rawArray[index], Base::get_allocator());
3026  }
3027 
3028  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
3029  {
3030  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
3031  }
3032 
3033 private:
3034  const RAW_ARRAY& m_rawArray;
3035 };
3036 
3037 template <typename ALLOC, typename RAW_ARRAY>
3039 {
3040 private:
3042 
3043  using ElementType = typename RAW_ARRAY::value_type;
3044  using UnderlyingElementType = typename std::underlying_type<ElementType>::type;
3045 
3046 public:
3047  using Base::getTypeInfo;
3048 
3049  EnumReflectableArray(const ALLOC& allocator, RAW_ARRAY& rawArray) :
3050  Base(enumTypeInfo<ElementType, ALLOC>(), allocator),
3051  m_rawArray(rawArray)
3052  {}
3053 
3054  size_t size() const override
3055  {
3056  return m_rawArray.size();
3057  }
3058 
3059  void resize(size_t size) override
3060  {
3061  m_rawArray.resize(size);
3062  }
3063 
3064  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
3065  {
3066  if (index >= size())
3067  {
3068  throw CppRuntimeException("Index ")
3069  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
3070  << "' of size " << size() << "!";
3071  }
3072 
3073  return enumReflectable(m_rawArray[index], Base::get_allocator());
3074  }
3075 
3076  IBasicReflectablePtr<ALLOC> at(size_t index) override
3077  {
3078  if (index >= size())
3079  {
3080  throw CppRuntimeException("Index ")
3081  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
3082  << "' of size " << size() << "!";
3083  }
3084 
3085  return enumReflectable(m_rawArray[index], Base::get_allocator());
3086  }
3087 
3088  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
3089  {
3090  if (index >= size())
3091  {
3092  throw CppRuntimeException("Index ")
3093  << index << " out of range for reflectable array '" << getTypeInfo().getSchemaName()
3094  << "' of size " << size() << "!";
3095  }
3096 
3097  if (value.template isType<ElementType>())
3098  {
3099  m_rawArray[index] = value.template get<ElementType>();
3100  }
3101  else
3102  {
3103  m_rawArray[index] = valueToEnum<ElementType>(value.template get<UnderlyingElementType>());
3104  }
3105  }
3106 
3107  void append(const AnyHolder<ALLOC>& value) override
3108  {
3109  if (value.template isType<ElementType>())
3110  {
3111  m_rawArray.push_back(value.template get<ElementType>());
3112  }
3113  else
3114  {
3115  m_rawArray.push_back(valueToEnum<ElementType>(value.template get<UnderlyingElementType>()));
3116  }
3117  }
3118 
3119  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
3120  {
3121  return AnyHolder<ALLOC>(std::cref(m_rawArray), allocator);
3122  }
3123 
3124  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
3125  {
3126  return AnyHolder<ALLOC>(std::ref(m_rawArray), allocator);
3127  }
3128 
3129 private:
3130  RAW_ARRAY& m_rawArray;
3131 };
3139 template <typename T, typename ALLOC = typename T::allocator_type>
3141 {
3142 public:
3144  ReflectableOwner(ALLOC())
3145  {}
3146 
3147  explicit ReflectableOwner(const ALLOC& allocator) :
3148  m_object(allocator),
3149  m_reflectable(m_object.reflectable(allocator))
3150  {}
3151 
3152  const IBasicTypeInfo<ALLOC>& getTypeInfo() const override
3153  {
3154  return m_reflectable->getTypeInfo();
3155  }
3156 
3157  bool isArray() const override
3158  {
3159  return m_reflectable->isArray();
3160  }
3161 
3162  void initializeChildren() override
3163  {
3164  m_reflectable->initializeChildren();
3165  }
3166 
3167  void initialize(const vector<AnyHolder<ALLOC>, ALLOC>& typeArguments) override
3168  {
3169  m_reflectable->initialize(typeArguments);
3170  }
3171 
3172  size_t initializeOffsets(size_t bitPosition) override
3173  {
3174  return m_reflectable->initializeOffsets(bitPosition);
3175  }
3176 
3177  size_t initializeOffsets() override
3178  {
3179  return initializeOffsets(0);
3180  }
3181 
3182  size_t bitSizeOf(size_t bitPosition) const override
3183  {
3184  return m_reflectable->bitSizeOf(bitPosition);
3185  }
3186 
3187  size_t bitSizeOf() const override
3188  {
3189  return bitSizeOf(0);
3190  }
3191 
3192  void write(BitStreamWriter& writer) const override
3193  {
3194  m_reflectable->write(writer);
3195  }
3196 
3198  {
3199  return m_reflectable->getField(name);
3200  }
3201 
3203  {
3204  return m_reflectable->getField(name);
3205  }
3206 
3208  {
3209  return m_reflectable->createField(name);
3210  }
3211 
3212  void setField(StringView name, const AnyHolder<ALLOC>& value) override
3213  {
3214  m_reflectable->setField(name, value);
3215  }
3216 
3218  {
3219  return m_reflectable->getParameter(name);
3220  }
3221 
3223  {
3224  return m_reflectable->getParameter(name);
3225  }
3226 
3228  {
3229  return m_reflectable->callFunction(name);
3230  }
3231 
3233  {
3234  return m_reflectable->callFunction(name);
3235  }
3236 
3237  StringView getChoice() const override
3238  {
3239  return m_reflectable->getChoice();
3240  }
3241 
3243  {
3244  return m_reflectable->find(path);
3245  }
3246 
3248  {
3249  return m_reflectable->find(path);
3250  }
3251 
3253  {
3254  return m_reflectable->operator[](path);
3255  }
3256 
3258  {
3259  return m_reflectable->operator[](path);
3260  }
3261 
3262  size_t size() const override
3263  {
3264  return m_reflectable->size();
3265  }
3266 
3267  void resize(size_t size) override
3268  {
3269  m_reflectable->resize(size);
3270  }
3271 
3272  IBasicReflectableConstPtr<ALLOC> at(size_t index) const override
3273  {
3274  return m_reflectable->at(index);
3275  }
3276 
3277  IBasicReflectablePtr<ALLOC> at(size_t index) override
3278  {
3279  return m_reflectable->at(index);
3280  }
3281 
3282  IBasicReflectableConstPtr<ALLOC> operator[](size_t index) const override
3283  {
3284  return m_reflectable->operator[](index);
3285  }
3286 
3288  {
3289  return m_reflectable->operator[](index);
3290  }
3291 
3292  void setAt(const AnyHolder<ALLOC>& value, size_t index) override
3293  {
3294  m_reflectable->setAt(value, index);
3295  }
3296 
3297  void append(const AnyHolder<ALLOC>& value) override
3298  {
3299  m_reflectable->append(value);
3300  }
3301 
3302  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) const override
3303  {
3304  return m_reflectable->getAnyValue(allocator);
3305  }
3306 
3307  AnyHolder<ALLOC> getAnyValue(const ALLOC& allocator) override
3308  {
3309  return m_reflectable->getAnyValue(allocator);
3310  }
3311 
3313  {
3314  return getAnyValue(ALLOC());
3315  }
3316 
3318  {
3319  return getAnyValue(ALLOC());
3320  }
3321 
3322  // exact checked getters
3323  bool getBool() const override
3324  {
3325  return m_reflectable->getBool();
3326  }
3327  int8_t getInt8() const override
3328  {
3329  return m_reflectable->getInt8();
3330  }
3331  int16_t getInt16() const override
3332  {
3333  return m_reflectable->getInt16();
3334  }
3335  int32_t getInt32() const override
3336  {
3337  return m_reflectable->getInt32();
3338  }
3339  int64_t getInt64() const override
3340  {
3341  return m_reflectable->getInt64();
3342  }
3343  uint8_t getUInt8() const override
3344  {
3345  return m_reflectable->getUInt8();
3346  }
3347  uint16_t getUInt16() const override
3348  {
3349  return m_reflectable->getUInt16();
3350  }
3351  uint32_t getUInt32() const override
3352  {
3353  return m_reflectable->getUInt32();
3354  }
3355  uint64_t getUInt64() const override
3356  {
3357  return m_reflectable->getUInt64();
3358  }
3359  float getFloat() const override
3360  {
3361  return m_reflectable->getFloat();
3362  }
3363  double getDouble() const override
3364  {
3365  return m_reflectable->getDouble();
3366  }
3368  {
3369  return m_reflectable->getBytes();
3370  }
3371  StringView getStringView() const override
3372  {
3373  return m_reflectable->getStringView();
3374  }
3375  const BasicBitBuffer<ALLOC>& getBitBuffer() const override
3376  {
3377  return m_reflectable->getBitBuffer();
3378  }
3379 
3380  // convenience conversions
3381  int64_t toInt() const override
3382  {
3383  return m_reflectable->toInt();
3384  }
3385  uint64_t toUInt() const override
3386  {
3387  return m_reflectable->toUInt();
3388  }
3389  double toDouble() const override
3390  {
3391  return m_reflectable->toDouble();
3392  }
3393  string<RebindAlloc<ALLOC, char>> toString(const ALLOC& allocator) const override
3394  {
3395  return m_reflectable->toString(allocator);
3396  }
3398  {
3399  return toString(ALLOC());
3400  }
3401 
3402  const ParsingInfo& parsingInfo() const override
3403  {
3404  return m_reflectable->parsingInfo();
3405  }
3406 
3407 private:
3408  T m_object;
3409  IBasicReflectablePtr<ALLOC> m_reflectable;
3410 };
3411 
3417 template <typename ALLOC>
3419 {
3420 public:
3421  static IBasicReflectablePtr<ALLOC> getBool(bool value, const ALLOC& allocator = ALLOC())
3422  {
3423  return std::allocate_shared<BoolReflectable<ALLOC>>(allocator, value);
3424  }
3425 
3426  static IBasicReflectablePtr<ALLOC> getInt8(int8_t value, const ALLOC& allocator = ALLOC())
3427  {
3428  return std::allocate_shared<Int8Reflectable<ALLOC>>(allocator, value);
3429  }
3430 
3431  static IBasicReflectablePtr<ALLOC> getInt16(int16_t value, const ALLOC& allocator = ALLOC())
3432  {
3433  return std::allocate_shared<Int16Reflectable<ALLOC>>(allocator, value);
3434  }
3435 
3436  static IBasicReflectablePtr<ALLOC> getInt32(int32_t value, const ALLOC& allocator = ALLOC())
3437  {
3438  return std::allocate_shared<Int32Reflectable<ALLOC>>(allocator, value);
3439  }
3440 
3441  static IBasicReflectablePtr<ALLOC> getInt64(int64_t value, const ALLOC& allocator = ALLOC())
3442  {
3443  return std::allocate_shared<Int64Reflectable<ALLOC>>(allocator, value);
3444  }
3445 
3446  static IBasicReflectablePtr<ALLOC> getUInt8(uint8_t value, const ALLOC& allocator = ALLOC())
3447  {
3448  return std::allocate_shared<UInt8Reflectable<ALLOC>>(allocator, value);
3449  }
3450 
3451  static IBasicReflectablePtr<ALLOC> getUInt16(uint16_t value, const ALLOC& allocator = ALLOC())
3452  {
3453  return std::allocate_shared<UInt16Reflectable<ALLOC>>(allocator, value);
3454  }
3455 
3456  static IBasicReflectablePtr<ALLOC> getUInt32(uint32_t value, const ALLOC& allocator = ALLOC())
3457  {
3458  return std::allocate_shared<UInt32Reflectable<ALLOC>>(allocator, value);
3459  }
3460 
3461  static IBasicReflectablePtr<ALLOC> getUInt64(uint64_t value, const ALLOC& allocator = ALLOC())
3462  {
3463  return std::allocate_shared<UInt64Reflectable<ALLOC>>(allocator, value);
3464  }
3465 
3466  template <typename T, typename std::enable_if<std::is_signed<T>::value, int>::type = 0>
3468  T value, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3469  {
3470  return std::allocate_shared<FixedSignedBitFieldReflectable<ALLOC, T>>(allocator, value, bitSize);
3471  }
3472 
3473  template <typename T, typename std::enable_if<std::is_unsigned<T>::value, int>::type = 0>
3475  T value, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3476  {
3477  return std::allocate_shared<FixedUnsignedBitFieldReflectable<ALLOC, T>>(allocator, value, bitSize);
3478  }
3479 
3480  template <typename T, typename std::enable_if<std::is_signed<T>::value, int>::type = 0>
3482  T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3483  {
3484  return std::allocate_shared<DynamicSignedBitFieldReflectable<ALLOC, T>>(
3485  allocator, value, maxBitSize, dynamicBitSize);
3486  }
3487 
3488  // for dynamic signed bit field given by a type reference (e.g. parameter, function return type)
3490  int64_t value, uint8_t maxBitSize, const ALLOC& allocator = ALLOC())
3491  {
3492  if (maxBitSize != 64)
3493  {
3494  throw CppRuntimeException("ReflectableFactory::getDynamicSignedBitField - ")
3495  << "maxBitSize != 64 for referenced dynamic bit field!";
3496  }
3497 
3498  return getDynamicSignedBitField(value, maxBitSize, maxBitSize, allocator);
3499  }
3500 
3501  template <typename T, typename std::enable_if<std::is_unsigned<T>::value, int>::type = 0>
3503  T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3504  {
3505  return std::allocate_shared<DynamicUnsignedBitFieldReflectable<ALLOC, T>>(
3506  allocator, value, maxBitSize, dynamicBitSize);
3507  }
3508 
3509  // for dynamic unsigned bit field given a by type reference (e.g. parameter, function return type)
3511  uint64_t value, uint8_t maxBitSize, const ALLOC& allocator = ALLOC())
3512  {
3513  if (maxBitSize != 64)
3514  {
3515  throw CppRuntimeException("ReflectableFactory::getDynamicUnsignedBitField - ")
3516  << "maxBitSize != 64 for referenced dynamic bit field!";
3517  }
3518 
3519  return getDynamicUnsignedBitField(value, maxBitSize, maxBitSize, allocator);
3520  }
3521 
3522  static IBasicReflectablePtr<ALLOC> getVarInt16(int16_t value, const ALLOC& allocator = ALLOC())
3523  {
3524  return std::allocate_shared<VarInt16Reflectable<ALLOC>>(allocator, value);
3525  }
3526 
3527  static IBasicReflectablePtr<ALLOC> getVarInt32(int32_t value, const ALLOC& allocator = ALLOC())
3528  {
3529  return std::allocate_shared<VarInt32Reflectable<ALLOC>>(allocator, value);
3530  }
3531 
3532  static IBasicReflectablePtr<ALLOC> getVarInt64(int64_t value, const ALLOC& allocator = ALLOC())
3533  {
3534  return std::allocate_shared<VarInt64Reflectable<ALLOC>>(allocator, value);
3535  }
3536 
3537  static IBasicReflectablePtr<ALLOC> getVarInt(int64_t value, const ALLOC& allocator = ALLOC())
3538  {
3539  return std::allocate_shared<VarIntReflectable<ALLOC>>(allocator, value);
3540  }
3541 
3542  static IBasicReflectablePtr<ALLOC> getVarUInt16(uint16_t value, const ALLOC& allocator = ALLOC())
3543  {
3544  return std::allocate_shared<VarUInt16Reflectable<ALLOC>>(allocator, value);
3545  }
3546 
3547  static IBasicReflectablePtr<ALLOC> getVarUInt32(uint32_t value, const ALLOC& allocator = ALLOC())
3548  {
3549  return std::allocate_shared<VarUInt32Reflectable<ALLOC>>(allocator, value);
3550  }
3551 
3552  static IBasicReflectablePtr<ALLOC> getVarUInt64(uint64_t value, const ALLOC& allocator = ALLOC())
3553  {
3554  return std::allocate_shared<VarUInt64Reflectable<ALLOC>>(allocator, value);
3555  }
3556 
3557  static IBasicReflectablePtr<ALLOC> getVarUInt(uint64_t value, const ALLOC& allocator = ALLOC())
3558  {
3559  return std::allocate_shared<VarUIntReflectable<ALLOC>>(allocator, value);
3560  }
3561 
3562  static IBasicReflectablePtr<ALLOC> getVarSize(uint32_t value, const ALLOC& allocator = ALLOC())
3563  {
3564  return std::allocate_shared<VarSizeReflectable<ALLOC>>(allocator, value);
3565  }
3566 
3567  static IBasicReflectablePtr<ALLOC> getFloat16(float value, const ALLOC& allocator = ALLOC())
3568  {
3569  return std::allocate_shared<Float16Reflectable<ALLOC>>(allocator, value);
3570  }
3571 
3572  static IBasicReflectablePtr<ALLOC> getFloat32(float value, const ALLOC& allocator = ALLOC())
3573  {
3574  return std::allocate_shared<Float32Reflectable<ALLOC>>(allocator, value);
3575  }
3576 
3577  static IBasicReflectablePtr<ALLOC> getFloat64(double value, const ALLOC& allocator = ALLOC())
3578  {
3579  return std::allocate_shared<Float64Reflectable<ALLOC>>(allocator, value);
3580  }
3581 
3582  static IBasicReflectablePtr<ALLOC> getBytes(Span<const uint8_t> value, const ALLOC& allocator = ALLOC())
3583  {
3584  return std::allocate_shared<BytesReflectable<ALLOC>>(allocator, value);
3585  }
3586 
3587  static IBasicReflectablePtr<ALLOC> getString(StringView value, const ALLOC& allocator = ALLOC())
3588  {
3589  return std::allocate_shared<StringReflectable<ALLOC>>(allocator, value);
3590  }
3591 
3593  const BasicBitBuffer<ALLOC>& value, const ALLOC& allocator = ALLOC())
3594  {
3595  return std::allocate_shared<BitBufferReflectable<ALLOC>>(allocator, value);
3596  }
3597 
3598  template <typename RAW_ARRAY>
3600  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3601  {
3602  return std::allocate_shared<BoolReflectableConstArray<ALLOC, RAW_ARRAY>>(
3603  allocator, allocator, rawArray);
3604  }
3605 
3606  template <typename RAW_ARRAY>
3607  static IBasicReflectablePtr<ALLOC> getBoolArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3608  {
3609  return std::allocate_shared<BoolReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3610  }
3611 
3612  template <typename RAW_ARRAY>
3614  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3615  {
3616  return std::allocate_shared<Int8ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3617  allocator, allocator, rawArray);
3618  }
3619 
3620  template <typename RAW_ARRAY>
3621  static IBasicReflectablePtr<ALLOC> getInt8Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3622  {
3623  return std::allocate_shared<Int8ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3624  }
3625 
3626  template <typename RAW_ARRAY>
3628  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3629  {
3630  return std::allocate_shared<Int16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3631  allocator, allocator, rawArray);
3632  }
3633 
3634  template <typename RAW_ARRAY>
3635  static IBasicReflectablePtr<ALLOC> getInt16Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3636  {
3637  return std::allocate_shared<Int16ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3638  }
3639 
3640  template <typename RAW_ARRAY>
3642  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3643  {
3644  return std::allocate_shared<Int32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3645  allocator, allocator, rawArray);
3646  }
3647 
3648  template <typename RAW_ARRAY>
3649  static IBasicReflectablePtr<ALLOC> getInt32Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3650  {
3651  return std::allocate_shared<Int32ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3652  }
3653 
3654  template <typename RAW_ARRAY>
3656  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3657  {
3658  return std::allocate_shared<Int64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3659  allocator, allocator, rawArray);
3660  }
3661 
3662  template <typename RAW_ARRAY>
3663  static IBasicReflectablePtr<ALLOC> getInt64Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3664  {
3665  return std::allocate_shared<Int64ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3666  }
3667 
3668  template <typename RAW_ARRAY>
3670  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3671  {
3672  return std::allocate_shared<UInt8ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3673  allocator, allocator, rawArray);
3674  }
3675 
3676  template <typename RAW_ARRAY>
3677  static IBasicReflectablePtr<ALLOC> getUInt8Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3678  {
3679  return std::allocate_shared<UInt8ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3680  }
3681 
3682  template <typename RAW_ARRAY>
3684  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3685  {
3686  return std::allocate_shared<UInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3687  allocator, allocator, rawArray);
3688  }
3689 
3690  template <typename RAW_ARRAY>
3691  static IBasicReflectablePtr<ALLOC> getUInt16Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3692  {
3693  return std::allocate_shared<UInt16ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3694  }
3695 
3696  template <typename RAW_ARRAY>
3698  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3699  {
3700  return std::allocate_shared<UInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3701  allocator, allocator, rawArray);
3702  }
3703 
3704  template <typename RAW_ARRAY>
3705  static IBasicReflectablePtr<ALLOC> getUInt32Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3706  {
3707  return std::allocate_shared<UInt32ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3708  }
3709 
3710  template <typename RAW_ARRAY>
3712  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3713  {
3714  return std::allocate_shared<UInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3715  allocator, allocator, rawArray);
3716  }
3717 
3718  template <typename RAW_ARRAY>
3719  static IBasicReflectablePtr<ALLOC> getUInt64Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3720  {
3721  return std::allocate_shared<UInt64ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3722  }
3723 
3724  template <typename RAW_ARRAY>
3726  const RAW_ARRAY& rawArray, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3727  {
3728  return std::allocate_shared<FixedSignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3729  allocator, allocator, rawArray, bitSize);
3730  }
3731 
3732  template <typename RAW_ARRAY>
3734  RAW_ARRAY& rawArray, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3735  {
3736  return std::allocate_shared<FixedSignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3737  allocator, allocator, rawArray, bitSize);
3738  }
3739 
3740  template <typename RAW_ARRAY>
3742  const RAW_ARRAY& rawArray, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3743  {
3744  return std::allocate_shared<FixedUnsignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3745  allocator, allocator, rawArray, bitSize);
3746  }
3747 
3748  template <typename RAW_ARRAY>
3750  RAW_ARRAY& rawArray, uint8_t bitSize, const ALLOC& allocator = ALLOC())
3751  {
3752  return std::allocate_shared<FixedUnsignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3753  allocator, allocator, rawArray, bitSize);
3754  }
3755 
3756  template <typename RAW_ARRAY>
3758  uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3759  {
3760  return std::allocate_shared<DynamicSignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3761  allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3762  }
3763 
3764  template <typename RAW_ARRAY>
3766  RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3767  {
3768  return std::allocate_shared<DynamicSignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3769  allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3770  }
3771 
3772  template <typename RAW_ARRAY>
3774  uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3775  {
3776  return std::allocate_shared<DynamicUnsignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3777  allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3778  }
3779 
3780  template <typename RAW_ARRAY>
3782  RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC& allocator = ALLOC())
3783  {
3784  return std::allocate_shared<DynamicUnsignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3785  allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3786  }
3787 
3788  template <typename RAW_ARRAY>
3790  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3791  {
3792  return std::allocate_shared<VarInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3793  allocator, allocator, rawArray);
3794  }
3795 
3796  template <typename RAW_ARRAY>
3797  static IBasicReflectablePtr<ALLOC> getVarInt16Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3798  {
3799  return std::allocate_shared<VarInt16ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3800  }
3801 
3802  template <typename RAW_ARRAY>
3804  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3805  {
3806  return std::allocate_shared<VarInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3807  allocator, allocator, rawArray);
3808  }
3809 
3810  template <typename RAW_ARRAY>
3811  static IBasicReflectablePtr<ALLOC> getVarInt32Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3812  {
3813  return std::allocate_shared<VarInt32ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3814  }
3815 
3816  template <typename RAW_ARRAY>
3818  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3819  {
3820  return std::allocate_shared<VarInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3821  allocator, allocator, rawArray);
3822  }
3823 
3824  template <typename RAW_ARRAY>
3825  static IBasicReflectablePtr<ALLOC> getVarInt64Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3826  {
3827  return std::allocate_shared<VarInt64ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3828  }
3829 
3830  template <typename RAW_ARRAY>
3832  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3833  {
3834  return std::allocate_shared<VarIntReflectableConstArray<ALLOC, RAW_ARRAY>>(
3835  allocator, allocator, rawArray);
3836  }
3837 
3838  template <typename RAW_ARRAY>
3839  static IBasicReflectablePtr<ALLOC> getVarIntArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3840  {
3841  return std::allocate_shared<VarIntReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3842  }
3843 
3844  template <typename RAW_ARRAY>
3846  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3847  {
3848  return std::allocate_shared<VarUInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3849  allocator, allocator, rawArray);
3850  }
3851 
3852  template <typename RAW_ARRAY>
3853  static IBasicReflectablePtr<ALLOC> getVarUInt16Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3854  {
3855  return std::allocate_shared<VarUInt16ReflectableArray<ALLOC, RAW_ARRAY>>(
3856  allocator, allocator, rawArray);
3857  }
3858 
3859  template <typename RAW_ARRAY>
3861  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3862  {
3863  return std::allocate_shared<VarUInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3864  allocator, allocator, rawArray);
3865  }
3866 
3867  template <typename RAW_ARRAY>
3868  static IBasicReflectablePtr<ALLOC> getVarUInt32Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3869  {
3870  return std::allocate_shared<VarUInt32ReflectableArray<ALLOC, RAW_ARRAY>>(
3871  allocator, allocator, rawArray);
3872  }
3873 
3874  template <typename RAW_ARRAY>
3876  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3877  {
3878  return std::allocate_shared<VarUInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3879  allocator, allocator, rawArray);
3880  }
3881 
3882  template <typename RAW_ARRAY>
3883  static IBasicReflectablePtr<ALLOC> getVarUInt64Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3884  {
3885  return std::allocate_shared<VarUInt64ReflectableArray<ALLOC, RAW_ARRAY>>(
3886  allocator, allocator, rawArray);
3887  }
3888 
3889  template <typename RAW_ARRAY>
3891  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3892  {
3893  return std::allocate_shared<VarUIntReflectableConstArray<ALLOC, RAW_ARRAY>>(
3894  allocator, allocator, rawArray);
3895  }
3896 
3897  template <typename RAW_ARRAY>
3898  static IBasicReflectablePtr<ALLOC> getVarUIntArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3899  {
3900  return std::allocate_shared<VarUIntReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3901  }
3902 
3903  template <typename RAW_ARRAY>
3905  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3906  {
3907  return std::allocate_shared<VarSizeReflectableConstArray<ALLOC, RAW_ARRAY>>(
3908  allocator, allocator, rawArray);
3909  }
3910 
3911  template <typename RAW_ARRAY>
3912  static IBasicReflectablePtr<ALLOC> getVarSizeArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3913  {
3914  return std::allocate_shared<VarSizeReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3915  }
3916 
3917  template <typename RAW_ARRAY>
3919  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3920  {
3921  return std::allocate_shared<Float16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3922  allocator, allocator, rawArray);
3923  }
3924 
3925  template <typename RAW_ARRAY>
3926  static IBasicReflectablePtr<ALLOC> getFloat16Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3927  {
3928  return std::allocate_shared<Float16ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3929  }
3930 
3931  template <typename RAW_ARRAY>
3933  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3934  {
3935  return std::allocate_shared<Float32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3936  allocator, allocator, rawArray);
3937  }
3938 
3939  template <typename RAW_ARRAY>
3940  static IBasicReflectablePtr<ALLOC> getFloat32Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3941  {
3942  return std::allocate_shared<Float32ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3943  }
3944 
3945  template <typename RAW_ARRAY>
3947  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3948  {
3949  return std::allocate_shared<Float64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3950  allocator, allocator, rawArray);
3951  }
3952 
3953  template <typename RAW_ARRAY>
3954  static IBasicReflectablePtr<ALLOC> getFloat64Array(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3955  {
3956  return std::allocate_shared<Float64ReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3957  }
3958 
3959  template <typename RAW_ARRAY>
3961  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3962  {
3963  return std::allocate_shared<BytesReflectableConstArray<ALLOC, RAW_ARRAY>>(
3964  allocator, allocator, rawArray);
3965  }
3966 
3967  template <typename RAW_ARRAY>
3968  static IBasicReflectablePtr<ALLOC> getBytesArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3969  {
3970  return std::allocate_shared<BytesReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3971  }
3972 
3973  template <typename RAW_ARRAY>
3975  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3976  {
3977  return std::allocate_shared<StringReflectableConstArray<ALLOC, RAW_ARRAY>>(
3978  allocator, allocator, rawArray);
3979  }
3980 
3981  template <typename RAW_ARRAY>
3982  static IBasicReflectablePtr<ALLOC> getStringArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3983  {
3984  return std::allocate_shared<StringReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3985  }
3986 
3987  template <typename RAW_ARRAY>
3989  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3990  {
3991  return std::allocate_shared<BitBufferReflectableConstArray<ALLOC, RAW_ARRAY>>(
3992  allocator, allocator, rawArray);
3993  }
3994 
3995  template <typename RAW_ARRAY>
3996  static IBasicReflectablePtr<ALLOC> getBitBufferArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
3997  {
3998  return std::allocate_shared<BitBufferReflectableArray<ALLOC, RAW_ARRAY>>(
3999  allocator, allocator, rawArray);
4000  }
4001 
4002  template <typename RAW_ARRAY>
4004  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4005  {
4006  return std::allocate_shared<CompoundReflectableConstArray<ALLOC, RAW_ARRAY>>(
4007  allocator, allocator, rawArray);
4008  }
4009 
4010  template <typename RAW_ARRAY>
4011  static IBasicReflectablePtr<ALLOC> getCompoundArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4012  {
4013  return std::allocate_shared<CompoundReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
4014  }
4015 
4016  template <typename RAW_ARRAY>
4018  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4019  {
4020  return std::allocate_shared<BitmaskReflectableConstArray<ALLOC, RAW_ARRAY>>(
4021  allocator, allocator, rawArray);
4022  }
4023 
4024  template <typename RAW_ARRAY>
4025  static IBasicReflectablePtr<ALLOC> getBitmaskArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4026  {
4027  return std::allocate_shared<BitmaskReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
4028  }
4029 
4030  template <typename RAW_ARRAY>
4032  const RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4033  {
4034  return std::allocate_shared<EnumReflectableConstArray<ALLOC, RAW_ARRAY>>(
4035  allocator, allocator, rawArray);
4036  }
4037 
4038  template <typename RAW_ARRAY>
4039  static IBasicReflectablePtr<ALLOC> getEnumArray(RAW_ARRAY& rawArray, const ALLOC& allocator = ALLOC())
4040  {
4041  return std::allocate_shared<EnumReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
4042  }
4043 };
4044 
4047 
4048 template <typename ALLOC>
4050  m_typeInfo(typeInfo)
4051 {}
4052 
4053 template <typename ALLOC>
4055 
4056 template <typename ALLOC>
4058 {
4059  return m_typeInfo;
4060 }
4061 
4062 template <typename ALLOC>
4064 {
4065  return false;
4066 }
4067 
4068 template <typename ALLOC>
4070 {
4071  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not a compound type!";
4072 }
4073 
4074 template <typename ALLOC>
4076 {
4077  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no type arguments!";
4078 }
4079 
4080 template <typename ALLOC>
4082 {
4083  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not a compound type!";
4084 }
4085 
4086 template <typename ALLOC>
4088 {
4089  return initializeOffsets(0);
4090 }
4091 
4092 template <typename ALLOC>
4094 {
4095  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not implemented!";
4096 }
4097 
4098 template <typename ALLOC>
4100 {
4101  return bitSizeOf(0);
4102 }
4103 
4104 template <typename ALLOC>
4106 {
4107  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not implemented!";
4108 }
4109 
4110 template <typename ALLOC>
4112 {
4113  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no fields to get!";
4114 }
4115 
4116 template <typename ALLOC>
4118 {
4119  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no fields to get!";
4120 }
4121 
4122 template <typename ALLOC>
4124 {
4125  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no fields to create!";
4126 }
4127 
4128 template <typename ALLOC>
4130 {
4131  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no fields to set!";
4132 }
4133 
4134 template <typename ALLOC>
4136 {
4137  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no parameters to get!";
4138 }
4139 
4140 template <typename ALLOC>
4142 {
4143  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no parameters to get!";
4144 }
4145 
4146 template <typename ALLOC>
4148 {
4149  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no functions to call!";
4150 }
4151 
4152 template <typename ALLOC>
4154 {
4155  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' has no functions to call!";
4156 }
4157 
4158 template <typename ALLOC>
4160 {
4161  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is neither choice nor union!";
4162 }
4163 
4164 template <typename ALLOC>
4166 {
4167  return detail::getFromObject(*this, path, 0);
4168 }
4169 
4170 template <typename ALLOC>
4172 {
4173  return detail::getFromObject(*this, path, 0);
4174 }
4175 
4176 template <typename ALLOC>
4178 {
4179  return find(path);
4180 }
4181 
4182 template <typename ALLOC>
4184 {
4185  return find(path);
4186 }
4187 
4188 template <typename ALLOC>
4190 {
4191  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4192 }
4193 
4194 template <typename ALLOC>
4196 {
4197  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4198 }
4199 
4200 template <typename ALLOC>
4202 {
4203  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4204 }
4205 
4206 template <typename ALLOC>
4208 {
4209  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4210 }
4211 
4212 template <typename ALLOC>
4214 {
4215  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4216 }
4217 
4218 template <typename ALLOC>
4220 {
4221  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4222 }
4223 
4224 template <typename ALLOC>
4226 {
4227  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4228 }
4229 
4230 template <typename ALLOC>
4232 {
4233  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not an array!";
4234 }
4235 
4236 template <typename ALLOC>
4238 {
4239  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not implemented!";
4240 }
4241 
4242 template <typename ALLOC>
4244 {
4245  throw CppRuntimeException("Type '") << getTypeInfo().getSchemaName() << "' is not implemented!";
4246 }
4247 
4248 template <typename ALLOC>
4250 {
4251  return getAnyValue(ALLOC());
4252 }
4253 
4254 template <typename ALLOC>
4256 {
4257  return getAnyValue(ALLOC());
4258 }
4259 
4260 template <typename ALLOC>
4262 {
4263  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not boolean type!";
4264 }
4265 
4266 template <typename ALLOC>
4268 {
4269  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not int8 type!";
4270 }
4271 
4272 template <typename ALLOC>
4274 {
4275  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not int16 type!";
4276 }
4277 
4278 template <typename ALLOC>
4280 {
4281  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not int32 type!";
4282 }
4283 
4284 template <typename ALLOC>
4286 {
4287  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not int64 type!";
4288 }
4289 
4290 template <typename ALLOC>
4292 {
4293  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not uint8 type!";
4294 }
4295 
4296 template <typename ALLOC>
4298 {
4299  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not uint16 type!";
4300 }
4301 
4302 template <typename ALLOC>
4304 {
4305  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not uint32 type!";
4306 }
4307 
4308 template <typename ALLOC>
4310 {
4311  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not uint64 type!";
4312 }
4313 
4314 template <typename ALLOC>
4316 {
4317  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not float type!";
4318 }
4319 
4320 template <typename ALLOC>
4322 {
4323  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not double type!";
4324 }
4325 
4326 template <typename ALLOC>
4328 {
4329  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not bytes type!";
4330 }
4331 
4332 template <typename ALLOC>
4334 {
4335  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not string type!";
4336 }
4337 
4338 template <typename ALLOC>
4340 {
4341  throw CppRuntimeException("'") << getTypeInfo().getSchemaName() << "' is not an extern type!";
4342 }
4343 
4344 template <typename ALLOC>
4346 {
4347  throw CppRuntimeException("Conversion from '")
4348  << getTypeInfo().getSchemaName() << "' to signed integer is not available!";
4349 }
4350 
4351 template <typename ALLOC>
4353 {
4354  throw CppRuntimeException("Conversion from '")
4355  << getTypeInfo().getSchemaName() << "' to unsigned integer is not available!";
4356 }
4357 
4358 template <typename ALLOC>
4360 {
4361  throw CppRuntimeException("Conversion from '")
4362  << getTypeInfo().getSchemaName() << "' to double is not available!";
4363 }
4364 
4365 template <typename ALLOC>
4367 {
4368  throw CppRuntimeException("Conversion from '")
4369  << getTypeInfo().getSchemaName() << "' to string is not available!";
4370 }
4371 
4372 template <typename ALLOC>
4374 {
4375  return toString(ALLOC());
4376 }
4377 
4378 template <typename ALLOC>
4380 {
4381  throw CppRuntimeException("Parsing information is not available for type '")
4382  << getTypeInfo().getSchemaName() << "'!";
4383 }
4384 
4385 template <typename ALLOC>
4387 {
4388  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4389 }
4390 
4391 template <typename ALLOC>
4393 {
4394  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4395 }
4396 
4397 template <typename ALLOC>
4399 {
4400  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4401 }
4402 
4403 template <typename ALLOC>
4405 {
4406  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4407 }
4408 
4409 template <typename ALLOC>
4411 {
4412  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4413 }
4414 
4415 template <typename ALLOC>
4417 {
4418  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4419 }
4420 
4421 template <typename ALLOC>
4423 {
4424  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4425 }
4426 
4427 template <typename ALLOC>
4429 {
4430  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is constant!";
4431 }
4432 
4433 template <typename ALLOC>
4435 {
4436  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4437 }
4438 
4439 template <typename ALLOC>
4441 {
4442  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4443 }
4444 
4445 template <typename ALLOC>
4447 {
4448  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4449 }
4450 
4451 template <typename ALLOC>
4453 {
4454  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4455 }
4456 
4457 template <typename ALLOC>
4459 {
4460  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4461 }
4462 
4463 template <typename ALLOC>
4465 {
4466  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4467 }
4468 
4469 template <typename ALLOC>
4471 {
4472  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4473 }
4474 
4475 template <typename ALLOC>
4477 {
4478  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4479 }
4480 
4481 template <typename ALLOC>
4483 {
4484  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4485 }
4486 
4487 template <typename ALLOC>
4489 {
4490  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4491 }
4492 
4493 template <typename ALLOC>
4495 {
4496  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4497 }
4498 
4499 template <typename ALLOC>
4501 {
4502  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4503 }
4504 
4505 template <typename ALLOC>
4507 {
4508  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4509 }
4510 
4511 template <typename ALLOC>
4513 {
4514  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4515 }
4516 
4517 template <typename ALLOC>
4519 {
4520  return this->at(index);
4521 }
4522 
4523 template <typename ALLOC>
4525 {
4526  return this->at(index);
4527 }
4528 
4529 template <typename ALLOC>
4531 {
4532  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4533 }
4534 
4535 template <typename ALLOC>
4537 {
4538  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4539 }
4540 
4541 template <typename ALLOC>
4543 {
4544  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4545 }
4546 
4547 template <typename ALLOC>
4549 {
4550  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4551 }
4552 
4553 template <typename ALLOC>
4555 {
4556  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4557 }
4558 
4559 template <typename ALLOC>
4561 {
4562  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4563 }
4564 
4565 template <typename ALLOC>
4567 {
4568  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4569 }
4570 
4571 template <typename ALLOC>
4573 {
4574  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4575 }
4576 
4577 template <typename ALLOC>
4579 {
4580  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4581 }
4582 
4583 template <typename ALLOC>
4585 {
4586  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4587 }
4588 
4589 template <typename ALLOC>
4591 {
4592  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4593 }
4594 
4595 template <typename ALLOC>
4597 {
4598  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4599 }
4600 
4601 template <typename ALLOC>
4603 {
4604  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4605 }
4606 
4607 template <typename ALLOC>
4609 {
4610  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4611 }
4612 
4613 template <typename ALLOC>
4615 {
4616  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4617 }
4618 
4619 template <typename ALLOC>
4621 {
4622  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4623 }
4624 
4625 template <typename ALLOC>
4627 {
4628  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4629 }
4630 
4631 template <typename ALLOC>
4633 {
4634  throw CppRuntimeException("Reflectable is an array '") << getTypeInfo().getSchemaName() << "[]'!";
4635 }
4636 
4637 template <typename ALLOC>
4639 {
4640  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4641 }
4642 
4643 template <typename ALLOC>
4645 {
4646  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4647 }
4648 
4649 template <typename ALLOC>
4651 {
4652  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4653 }
4654 
4655 template <typename ALLOC>
4657 {
4658  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4659 }
4660 
4661 template <typename ALLOC>
4663 {
4664  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4665 }
4666 
4667 template <typename ALLOC>
4669 {
4670  throw CppRuntimeException("Reflectable '") << getTypeInfo().getSchemaName() << "' is a constant array!";
4671 }
4672 
4673 } // namespace zserio
4674 
4675 #endif // ZSERIO_REFLECTABLE_H_INC
allocator_type get_allocator() const
static IBasicReflectablePtr< ALLOC > getFloat32(float value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3572
static IBasicReflectableConstPtr< ALLOC > getFloat32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3932
static IBasicReflectablePtr< ALLOC > getFixedUnsignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3749
static IBasicReflectablePtr< ALLOC > getFloat64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3954
static IBasicReflectableConstPtr< ALLOC > getStringArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3974
static IBasicReflectableConstPtr< ALLOC > getVarUInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3845
static IBasicReflectablePtr< ALLOC > getVarUIntArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3898
static IBasicReflectablePtr< ALLOC > getVarInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3797
static IBasicReflectableConstPtr< ALLOC > getVarUInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3860
static IBasicReflectableConstPtr< ALLOC > getVarInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3789
static IBasicReflectablePtr< ALLOC > getVarInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3811
static IBasicReflectablePtr< ALLOC > getBool(bool value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3421
static IBasicReflectablePtr< ALLOC > getInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3663
static IBasicReflectablePtr< ALLOC > getUInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3705
static IBasicReflectablePtr< ALLOC > getInt8Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3621
static IBasicReflectablePtr< ALLOC > getInt8(int8_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3426
static IBasicReflectableConstPtr< ALLOC > getDynamicSignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3757
static IBasicReflectableConstPtr< ALLOC > getVarIntArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3831
static IBasicReflectablePtr< ALLOC > getBitmaskArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4025
static IBasicReflectableConstPtr< ALLOC > getBytesArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3960
static IBasicReflectableConstPtr< ALLOC > getFixedUnsignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3741
static IBasicReflectablePtr< ALLOC > getString(StringView value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3587
static IBasicReflectableConstPtr< ALLOC > getFloat64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3946
static IBasicReflectableConstPtr< ALLOC > getUInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3683
static IBasicReflectableConstPtr< ALLOC > getVarInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3803
static IBasicReflectableConstPtr< ALLOC > getInt8Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3613
static IBasicReflectableConstPtr< ALLOC > getFloat16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3918
static IBasicReflectablePtr< ALLOC > getInt64(int64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3441
static IBasicReflectablePtr< ALLOC > getVarInt32(int32_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3527
static IBasicReflectablePtr< ALLOC > getVarInt16(int16_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3522
static IBasicReflectableConstPtr< ALLOC > getInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3655
static IBasicReflectableConstPtr< ALLOC > getFixedSignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3725
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitField(int64_t value, uint8_t maxBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3489
static IBasicReflectablePtr< ALLOC > getBytesArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3968
static IBasicReflectablePtr< ALLOC > getVarUInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3883
static IBasicReflectablePtr< ALLOC > getVarUInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3868
static IBasicReflectablePtr< ALLOC > getBitBuffer(const BasicBitBuffer< ALLOC > &value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3592
static IBasicReflectableConstPtr< ALLOC > getVarUIntArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3890
static IBasicReflectablePtr< ALLOC > getUInt16(uint16_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3451
static IBasicReflectablePtr< ALLOC > getCompoundArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4011
static IBasicReflectablePtr< ALLOC > getVarUInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3853
static IBasicReflectableConstPtr< ALLOC > getVarUInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3875
static IBasicReflectableConstPtr< ALLOC > getBitBufferArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3988
static IBasicReflectablePtr< ALLOC > getVarUInt(uint64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3557
static IBasicReflectablePtr< ALLOC > getUInt8(uint8_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3446
static IBasicReflectablePtr< ALLOC > getUInt32(uint32_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3456
static IBasicReflectablePtr< ALLOC > getInt32(int32_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3436
static IBasicReflectablePtr< ALLOC > getBytes(Span< const uint8_t > value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3582
static IBasicReflectableConstPtr< ALLOC > getCompoundArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4003
static IBasicReflectableConstPtr< ALLOC > getBitmaskArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4017
static IBasicReflectablePtr< ALLOC > getFixedSignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3733
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitField(uint64_t value, uint8_t maxBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3510
static IBasicReflectablePtr< ALLOC > getVarInt64(int64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3532
static IBasicReflectablePtr< ALLOC > getUInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3691
static IBasicReflectablePtr< ALLOC > getVarUInt16(uint16_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3542
static IBasicReflectableConstPtr< ALLOC > getBoolArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3599
static IBasicReflectableConstPtr< ALLOC > getUInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3697
static IBasicReflectableConstPtr< ALLOC > getUInt8Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3669
static IBasicReflectablePtr< ALLOC > getBitBufferArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3996
static IBasicReflectablePtr< ALLOC > getStringArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3982
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitField(T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3502
static IBasicReflectableConstPtr< ALLOC > getEnumArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4031
static IBasicReflectableConstPtr< ALLOC > getVarSizeArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3904
static IBasicReflectablePtr< ALLOC > getInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3635
static IBasicReflectablePtr< ALLOC > getVarSize(uint32_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3562
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitField(T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3481
static IBasicReflectablePtr< ALLOC > getVarSizeArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3912
static IBasicReflectablePtr< ALLOC > getUInt64(uint64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3461
static IBasicReflectablePtr< ALLOC > getFloat16(float value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3567
static IBasicReflectablePtr< ALLOC > getVarIntArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3839
static IBasicReflectablePtr< ALLOC > getVarUInt32(uint32_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3547
static IBasicReflectablePtr< ALLOC > getInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3649
static IBasicReflectablePtr< ALLOC > getBoolArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3607
static IBasicReflectablePtr< ALLOC > getInt16(int16_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3431
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3765
static IBasicReflectablePtr< ALLOC > getVarUInt64(uint64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3552
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3781
static IBasicReflectablePtr< ALLOC > getUInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3719
static IBasicReflectableConstPtr< ALLOC > getVarInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3817
static IBasicReflectableConstPtr< ALLOC > getUInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3711
static IBasicReflectablePtr< ALLOC > getEnumArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:4039
static IBasicReflectablePtr< ALLOC > getFixedSignedBitField(T value, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3467
static IBasicReflectablePtr< ALLOC > getFloat32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3940
static IBasicReflectableConstPtr< ALLOC > getDynamicUnsignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3773
static IBasicReflectablePtr< ALLOC > getVarInt(int64_t value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3537
static IBasicReflectableConstPtr< ALLOC > getInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3641
static IBasicReflectablePtr< ALLOC > getFloat64(double value, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3577
static IBasicReflectablePtr< ALLOC > getVarInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3825
static IBasicReflectablePtr< ALLOC > getUInt8Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3677
static IBasicReflectablePtr< ALLOC > getFixedUnsignedBitField(T value, uint8_t bitSize, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3474
static IBasicReflectableConstPtr< ALLOC > getInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3627
static IBasicReflectablePtr< ALLOC > getFloat16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
Definition: Reflectable.h:3926
BasicStringView substr(size_type pos=0, size_type count=npos) const
Definition: StringView.h:338
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1808
BitBufferReflectable(const BasicBitBuffer< ALLOC > &value)
Definition: Reflectable.h:1813
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1817
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1822
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
Definition: Reflectable.h:1827
void writeFloat64(double data)
void writeVarInt64(int64_t data)
void writeVarInt16(int16_t data)
void writeString(StringView data)
void writeSignedBits(int32_t data, uint8_t numBits=32)
void writeFloat32(float data)
void writeVarUInt64(uint64_t data)
void writeVarUInt16(uint16_t data)
void writeVarInt32(int32_t data)
void writeSignedBits64(int64_t data, uint8_t numBits=64)
void writeVarSize(uint32_t data)
void writeVarUInt32(uint32_t data)
void writeVarUInt(uint64_t data)
void writeVarInt(int64_t data)
void writeFloat16(float data)
void writeBits64(uint64_t data, uint8_t numBits=64)
void writeBytes(Span< const uint8_t > data)
void writeBitBuffer(const BasicBitBuffer< ALLOC > &bitBuffer)
void writeBits(uint32_t data, uint8_t numBits=32)
void resize(size_t size) override
Definition: Reflectable.h:2915
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:2944
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:2932
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:2980
BitmaskReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
Definition: Reflectable.h:2905
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2920
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:2963
size_t size() const override
Definition: Reflectable.h:2910
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2975
size_t size() const override
Definition: Reflectable.h:2867
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2884
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2872
BitmaskReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
Definition: Reflectable.h:2862
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:293
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:284
BoolReflectable(bool value)
Definition: Reflectable.h:289
bool getBool() const override
Definition: Reflectable.h:303
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:298
void resize(size_t size) override
Definition: Reflectable.h:2216
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2221
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:2267
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:2245
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2262
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:2257
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:2233
BuiltinReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
Definition: Reflectable.h:2206
size_t size() const override
Definition: Reflectable.h:2211
const T & getValue() const
Definition: Reflectable.h:138
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:149
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:144
BuiltinReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo, const T &value)
Definition: Reflectable.h:133
size_t size() const override
Definition: Reflectable.h:2169
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2174
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2186
BuiltinReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
Definition: Reflectable.h:2164
static const IBasicTypeInfo< ALLOC > & getDynamicUnsignedBitField(uint8_t maxBitSize)
Definition: TypeInfo.h:1225
static const IBasicTypeInfo< ALLOC > & getFloat32()
Definition: TypeInfo.h:1143
static const IBasicTypeInfo< ALLOC > & getVarUInt64()
Definition: TypeInfo.h:1113
static const IBasicTypeInfo< ALLOC > & getUInt32()
Definition: TypeInfo.h:1053
static const IBasicTypeInfo< ALLOC > & getBool()
Definition: TypeInfo.h:1011
static const IBasicTypeInfo< ALLOC > & getVarInt64()
Definition: TypeInfo.h:1081
static const IBasicTypeInfo< ALLOC > & getVarUInt()
Definition: TypeInfo.h:1121
static const IBasicTypeInfo< ALLOC > & getVarInt32()
Definition: TypeInfo.h:1073
static const IBasicTypeInfo< ALLOC > & getFixedUnsignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1184
static const IBasicTypeInfo< ALLOC > & getInt32()
Definition: TypeInfo.h:1029
static const IBasicTypeInfo< ALLOC > & getInt16()
Definition: TypeInfo.h:1023
static const IBasicTypeInfo< ALLOC > & getVarInt()
Definition: TypeInfo.h:1089
static const IBasicTypeInfo< ALLOC > & getString()
Definition: TypeInfo.h:1162
static const IBasicTypeInfo< ALLOC > & getInt8()
Definition: TypeInfo.h:1017
static const IBasicTypeInfo< ALLOC > & getVarInt16()
Definition: TypeInfo.h:1065
static const IBasicTypeInfo< ALLOC > & getUInt8()
Definition: TypeInfo.h:1041
static const IBasicTypeInfo< ALLOC > & getBitBuffer()
Definition: TypeInfo.h:1170
static const IBasicTypeInfo< ALLOC > & getUInt64()
Definition: TypeInfo.h:1059
static const IBasicTypeInfo< ALLOC > & getInt64()
Definition: TypeInfo.h:1035
static const IBasicTypeInfo< ALLOC > & getUInt16()
Definition: TypeInfo.h:1047
static const IBasicTypeInfo< ALLOC > & getVarSize()
Definition: TypeInfo.h:1129
static const IBasicTypeInfo< ALLOC > & getFloat16()
Definition: TypeInfo.h:1137
static const IBasicTypeInfo< ALLOC > & getVarUInt32()
Definition: TypeInfo.h:1105
static const IBasicTypeInfo< ALLOC > & getBytes()
Definition: TypeInfo.h:1155
static const IBasicTypeInfo< ALLOC > & getVarUInt16()
Definition: TypeInfo.h:1097
static const IBasicTypeInfo< ALLOC > & getDynamicSignedBitField(uint8_t maxBitSize)
Definition: TypeInfo.h:1190
static const IBasicTypeInfo< ALLOC > & getFixedSignedBitField(uint8_t bitSize)
Definition: TypeInfo.h:1178
static const IBasicTypeInfo< ALLOC > & getFloat64()
Definition: TypeInfo.h:1149
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1742
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1747
BytesReflectable(Span< const uint8_t > value)
Definition: Reflectable.h:1738
Span< const uint8_t > getBytes() const override
Definition: Reflectable.h:1752
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1733
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:2814
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2831
size_t size() const override
Definition: Reflectable.h:2780
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:2802
void resize(size_t size) override
Definition: Reflectable.h:2785
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:2826
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:2836
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2790
CompoundReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
Definition: Reflectable.h:2775
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2755
CompoundReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
Definition: Reflectable.h:2733
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2743
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2538
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:2543
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:2533
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:2508
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2495
void resize(size_t size) override
Definition: Reflectable.h:2490
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:2521
DynamicBitFieldReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:2477
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2455
DynamicBitFieldReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:2429
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2442
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1032
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1059
DynamicSignedBitFieldReflectable(int16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1037
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1102
DynamicSignedBitFieldReflectable(int32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1080
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1075
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1118
DynamicSignedBitFieldReflectable(int64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1123
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1145
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1016
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:989
DynamicSignedBitFieldReflectable(int8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:994
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1234
DynamicUnsignedBitFieldReflectable(uint16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1212
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1207
DynamicUnsignedBitFieldReflectable(uint32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1255
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1277
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1250
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1293
DynamicUnsignedBitFieldReflectable(uint64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1298
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1320
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1191
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Definition: Reflectable.h:1164
DynamicUnsignedBitFieldReflectable(uint8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
Definition: Reflectable.h:1169
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:3124
EnumReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
Definition: Reflectable.h:3049
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:3064
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:3076
void resize(size_t size) override
Definition: Reflectable.h:3059
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:3088
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:3107
size_t size() const override
Definition: Reflectable.h:3054
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:3119
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:3028
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:3016
size_t size() const override
Definition: Reflectable.h:3011
EnumReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
Definition: Reflectable.h:3006
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:2366
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:2391
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:2401
FixedBitFieldReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray, uint8_t bitSize)
Definition: Reflectable.h:2338
void resize(size_t size) override
Definition: Reflectable.h:2348
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:2379
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2353
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2396
FixedBitFieldReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray, uint8_t bitSize)
Definition: Reflectable.h:2295
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:2305
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:2318
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:772
FixedSignedBitFieldReflectable(int16_t value, uint8_t bitSize)
Definition: Reflectable.h:757
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:752
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:785
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:805
FixedSignedBitFieldReflectable(int32_t value, uint8_t bitSize)
Definition: Reflectable.h:790
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:838
FixedSignedBitFieldReflectable(int64_t value, uint8_t bitSize)
Definition: Reflectable.h:823
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:818
FixedSignedBitFieldReflectable(int8_t value, uint8_t bitSize)
Definition: Reflectable.h:724
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:719
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:739
FixedUnsignedBitFieldReflectable(uint16_t value, uint8_t bitSize)
Definition: Reflectable.h:892
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:907
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:887
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:920
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:940
FixedUnsignedBitFieldReflectable(uint32_t value, uint8_t bitSize)
Definition: Reflectable.h:925
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:953
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:973
FixedUnsignedBitFieldReflectable(uint64_t value, uint8_t bitSize)
Definition: Reflectable.h:958
FixedUnsignedBitFieldReflectable(uint8_t value, uint8_t bitSize)
Definition: Reflectable.h:859
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
Definition: Reflectable.h:854
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:874
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1628
Float16Reflectable(float value)
Definition: Reflectable.h:1633
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1642
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1637
float getFloat() const override
Definition: Reflectable.h:1647
Float32Reflectable(float value)
Definition: Reflectable.h:1668
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1663
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1672
float getFloat() const override
Definition: Reflectable.h:1682
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1677
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1698
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1707
Float64Reflectable(double value)
Definition: Reflectable.h:1703
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1712
double getDouble() const override
Definition: Reflectable.h:1717
double toDouble() const override
Definition: Reflectable.h:1612
virtual StringView getSchemaName() const =0
int16_t getInt16() const override
Definition: Reflectable.h:343
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:518
Int16Reflectable(int16_t value)
Definition: Reflectable.h:514
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:523
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:509
int32_t getInt32() const override
Definition: Reflectable.h:363
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:548
Int32Reflectable(int32_t value)
Definition: Reflectable.h:544
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:553
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:539
int64_t getInt64() const override
Definition: Reflectable.h:383
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:583
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:569
Int64Reflectable(int64_t value)
Definition: Reflectable.h:574
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:578
int8_t getInt8() const override
Definition: Reflectable.h:323
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:488
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:479
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:493
Int8Reflectable(int8_t value)
Definition: Reflectable.h:484
double toDouble() const override
Definition: Reflectable.h:219
string< ALLOC > toString(const ALLOC &allocator) const override
Definition: Reflectable.h:224
BuiltinReflectableBase< ALLOC, T > Base
Definition: Reflectable.h:212
IntegralReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo, T value)
Definition: Reflectable.h:215
ReflectableAllocatorHolderBase(const IBasicTypeInfo< ALLOC > &typeInfo, const ALLOC &allocator)
Definition: Reflectable.h:2028
void initializeChildren() override
Definition: Reflectable.h:4434
int32_t getInt32() const override
Definition: Reflectable.h:4548
uint8_t getUInt8() const override
Definition: Reflectable.h:4560
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
Definition: Reflectable.h:4500
Span< const uint8_t > getBytes() const override
Definition: Reflectable.h:4596
float getFloat() const override
Definition: Reflectable.h:4584
uint64_t toUInt() const override
Definition: Reflectable.h:4620
double toDouble() const override
Definition: Reflectable.h:4626
int16_t getInt16() const override
Definition: Reflectable.h:4542
int64_t toInt() const override
Definition: Reflectable.h:4614
StringView getChoice() const override
Definition: Reflectable.h:4512
uint64_t getUInt64() const override
Definition: Reflectable.h:4578
int8_t getInt8() const override
Definition: Reflectable.h:4536
uint32_t getUInt32() const override
Definition: Reflectable.h:4572
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
Definition: Reflectable.h:4440
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:4458
bool isArray() const override
Definition: Reflectable.h:2076
IBasicReflectableConstPtr< ALLOC > operator[](size_t index) const override
Definition: Reflectable.h:4518
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
Definition: Reflectable.h:4488
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
Definition: Reflectable.h:4464
int64_t getInt64() const override
Definition: Reflectable.h:4554
double getDouble() const override
Definition: Reflectable.h:4590
IBasicReflectablePtr< ALLOC > createField(StringView name) override
Definition: Reflectable.h:4476
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
Definition: Reflectable.h:4608
bool getBool() const override
Definition: Reflectable.h:4530
uint16_t getUInt16() const override
Definition: Reflectable.h:4566
void setField(StringView name, const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:4482
StringView getStringView() const override
Definition: Reflectable.h:4602
StringView getStringView() const override
Definition: Reflectable.h:4333
const IBasicTypeInfo< ALLOC > & getTypeInfo() const override
Definition: Reflectable.h:4057
void initializeChildren() override
Definition: Reflectable.h:4069
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
Definition: Reflectable.h:4339
int64_t toInt() const override
Definition: Reflectable.h:4345
IBasicReflectableConstPtr< ALLOC > operator[](StringView path) const override
Definition: Reflectable.h:4177
const ParsingInfo & parsingInfo() const override
Definition: Reflectable.h:4379
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:4201
ReflectableBase & operator=(const ReflectableBase &&)=delete
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
Definition: Reflectable.h:4147
int32_t getInt32() const override
Definition: Reflectable.h:4279
void resize(size_t size) override
Definition: Reflectable.h:4195
int16_t getInt16() const override
Definition: Reflectable.h:4273
void setField(StringView name, const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:4129
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
Definition: Reflectable.h:4135
ReflectableBase(const ReflectableBase &)=delete
IBasicReflectableConstPtr< ALLOC > find(StringView path) const override
Definition: Reflectable.h:4165
Span< const uint8_t > getBytes() const override
Definition: Reflectable.h:4327
ReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo)
Definition: Reflectable.h:4049
size_t size() const override
Definition: Reflectable.h:4189
float getFloat() const override
Definition: Reflectable.h:4315
double getDouble() const override
Definition: Reflectable.h:4321
uint64_t getUInt64() const override
Definition: Reflectable.h:4309
uint8_t getUInt8() const override
Definition: Reflectable.h:4291
uint16_t getUInt16() const override
Definition: Reflectable.h:4297
bool isArray() const override
Definition: Reflectable.h:4063
size_t bitSizeOf() const override
Definition: Reflectable.h:4099
ReflectableBase & operator=(const ReflectableBase &)=delete
AnyHolder< ALLOC > getAnyValue() const override
Definition: Reflectable.h:4249
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:4231
~ReflectableBase() override=0
uint64_t toUInt() const override
Definition: Reflectable.h:4352
IBasicReflectablePtr< ALLOC > createField(StringView name) override
Definition: Reflectable.h:4123
ReflectableBase(const ReflectableBase &&)=delete
string< ALLOC > toString() const override
Definition: Reflectable.h:4373
size_t initializeOffsets() override
Definition: Reflectable.h:4087
uint32_t getUInt32() const override
Definition: Reflectable.h:4303
bool getBool() const override
Definition: Reflectable.h:4261
int8_t getInt8() const override
Definition: Reflectable.h:4267
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
Definition: Reflectable.h:4111
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:4105
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:4225
StringView getChoice() const override
Definition: Reflectable.h:4159
int64_t getInt64() const override
Definition: Reflectable.h:4285
double toDouble() const override
Definition: Reflectable.h:4359
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
Definition: Reflectable.h:4075
IBasicReflectablePtr< ALLOC > getParameter(StringView name) override
Definition: Reflectable.h:4416
void setField(StringView name, const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:4410
IBasicReflectablePtr< ALLOC > getField(StringView name) override
Definition: Reflectable.h:4404
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
Definition: Reflectable.h:4392
IBasicReflectablePtr< ALLOC > callFunction(StringView name) override
Definition: Reflectable.h:4422
IBasicReflectablePtr< ALLOC > operator[](size_t index) override
Definition: Reflectable.h:4650
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:4656
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:4644
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:4662
void resize(size_t index) override
Definition: Reflectable.h:4638
IBasicReflectablePtr< ALLOC > operator[](size_t index) override
Definition: Reflectable.h:3287
IBasicReflectableConstPtr< ALLOC > find(StringView path) const override
Definition: Reflectable.h:3242
void resize(size_t size) override
Definition: Reflectable.h:3267
int32_t getInt32() const override
Definition: Reflectable.h:3335
int64_t getInt64() const override
Definition: Reflectable.h:3339
int16_t getInt16() const override
Definition: Reflectable.h:3331
AnyHolder< ALLOC > getAnyValue() override
Definition: Reflectable.h:3317
void initializeChildren() override
Definition: Reflectable.h:3162
Span< const uint8_t > getBytes() const override
Definition: Reflectable.h:3367
IBasicReflectablePtr< ALLOC > createField(StringView name) override
Definition: Reflectable.h:3207
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
Definition: Reflectable.h:3217
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
Definition: Reflectable.h:3375
IBasicReflectablePtr< ALLOC > callFunction(StringView name) override
Definition: Reflectable.h:3232
bool getBool() const override
Definition: Reflectable.h:3323
int64_t toInt() const override
Definition: Reflectable.h:3381
IBasicReflectableConstPtr< ALLOC > operator[](StringView path) const override
Definition: Reflectable.h:3252
int8_t getInt8() const override
Definition: Reflectable.h:3327
IBasicReflectablePtr< ALLOC > find(StringView path) override
Definition: Reflectable.h:3247
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
Definition: Reflectable.h:3227
uint16_t getUInt16() const override
Definition: Reflectable.h:3347
size_t bitSizeOf(size_t bitPosition) const override
Definition: Reflectable.h:3182
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Definition: Reflectable.h:3307
float getFloat() const override
Definition: Reflectable.h:3359
size_t initializeOffsets() override
Definition: Reflectable.h:3177
void setField(StringView name, const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:3212
bool isArray() const override
Definition: Reflectable.h:3157
IBasicReflectableConstPtr< ALLOC > operator[](size_t index) const override
Definition: Reflectable.h:3282
IBasicReflectablePtr< ALLOC > at(size_t index) override
Definition: Reflectable.h:3277
string< RebindAlloc< ALLOC, char > > toString(const ALLOC &allocator) const override
Definition: Reflectable.h:3393
void append(const AnyHolder< ALLOC > &value) override
Definition: Reflectable.h:3297
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
Definition: Reflectable.h:3292
size_t size() const override
Definition: Reflectable.h:3262
double toDouble() const override
Definition: Reflectable.h:3389
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
Definition: Reflectable.h:3197
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:3192
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Definition: Reflectable.h:3272
IBasicReflectablePtr< ALLOC > getField(StringView name) override
Definition: Reflectable.h:3202
IBasicReflectablePtr< ALLOC > operator[](StringView path) override
Definition: Reflectable.h:3257
string< RebindAlloc< ALLOC, char > > toString() const override
Definition: Reflectable.h:3397
uint64_t getUInt64() const override
Definition: Reflectable.h:3355
uint64_t toUInt() const override
Definition: Reflectable.h:3385
StringView getChoice() const override
Definition: Reflectable.h:3237
uint32_t getUInt32() const override
Definition: Reflectable.h:3351
double getDouble() const override
Definition: Reflectable.h:3363
IBasicReflectablePtr< ALLOC > getParameter(StringView name) override
Definition: Reflectable.h:3222
size_t bitSizeOf() const override
Definition: Reflectable.h:3187
ReflectableOwner(const ALLOC &allocator)
Definition: Reflectable.h:3147
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
Definition: Reflectable.h:3167
const IBasicTypeInfo< ALLOC > & getTypeInfo() const override
Definition: Reflectable.h:3152
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
Definition: Reflectable.h:3302
size_t initializeOffsets(size_t bitPosition) override
Definition: Reflectable.h:3172
uint8_t getUInt8() const override
Definition: Reflectable.h:3343
AnyHolder< ALLOC > getAnyValue() const override
Definition: Reflectable.h:3312
const ParsingInfo & parsingInfo() const override
Definition: Reflectable.h:3402
StringView getStringView() const override
Definition: Reflectable.h:3371
IntegralReflectableBase< ALLOC, int8_t > Base
Definition: Reflectable.h:241
int64_t toInt() const override
Definition: Reflectable.h:246
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1782
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1768
StringView getStringView() const override
Definition: Reflectable.h:1787
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1777
StringReflectable(StringView value)
Definition: Reflectable.h:1773
string< ALLOC > toString(const ALLOC &allocator) const override
Definition: Reflectable.h:1792
uint16_t getUInt16() const override
Definition: Reflectable.h:423
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:638
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:643
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:629
UInt16Reflectable(uint16_t value)
Definition: Reflectable.h:634
uint32_t getUInt32() const override
Definition: Reflectable.h:443
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:673
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:668
UInt32Reflectable(uint32_t value)
Definition: Reflectable.h:664
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:659
uint64_t getUInt64() const override
Definition: Reflectable.h:463
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:703
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:689
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:698
UInt64Reflectable(uint64_t value)
Definition: Reflectable.h:694
uint8_t getUInt8() const override
Definition: Reflectable.h:403
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:613
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:599
UInt8Reflectable(uint8_t value)
Definition: Reflectable.h:604
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:608
uint64_t toUInt() const override
Definition: Reflectable.h:268
IntegralReflectableBase< ALLOC, uint8_t > Base
Definition: Reflectable.h:263
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1348
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1353
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1339
VarInt16Reflectable(int16_t value)
Definition: Reflectable.h:1344
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1383
VarInt32Reflectable(int32_t value)
Definition: Reflectable.h:1374
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1378
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1369
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1413
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1399
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1408
VarInt64Reflectable(int64_t value)
Definition: Reflectable.h:1404
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1429
VarIntReflectable(int64_t value)
Definition: Reflectable.h:1434
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1438
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1443
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1588
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1593
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1579
VarSizeReflectable(uint32_t value)
Definition: Reflectable.h:1584
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1473
VarUInt16Reflectable(uint16_t value)
Definition: Reflectable.h:1464
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1459
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1468
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1498
VarUInt32Reflectable(uint32_t value)
Definition: Reflectable.h:1494
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1503
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1489
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1519
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1528
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1533
VarUInt64Reflectable(uint64_t value)
Definition: Reflectable.h:1524
static const IBasicTypeInfo< ALLOC > & typeInfo()
Definition: Reflectable.h:1549
void write(BitStreamWriter &writer) const override
Definition: Reflectable.h:1563
size_t bitSizeOf(size_t) const override
Definition: Reflectable.h:1558
VarUIntReflectable(uint64_t value)
Definition: Reflectable.h:1554
size_t bitSizeOfString(StringView stringValue)
size_t bitSizeOfVarInt32(int32_t value)
const IBasicTypeInfo< ALLOC > & enumTypeInfo()
size_t bitSizeOfVarUInt32(uint32_t value)
BasicStringView< char, std::char_traits< char > > StringView
Definition: StringView.h:968
size_t bitSizeOfVarInt64(int64_t value)
std::basic_string< char, std::char_traits< char >, RebindAlloc< ALLOC, char > > string
Definition: String.h:17
std::vector< T, RebindAlloc< ALLOC, T > > vector
Definition: Vector.h:17
IBasicReflectablePtr< ALLOC > enumReflectable(T value, const ALLOC &allocator=ALLOC())
size_t initializeOffsets(size_t bitPosition, T value)
size_t bitSizeOfVarUInt64(uint64_t value)
size_t bitSizeOfVarInt16(int16_t value)
size_t bitSizeOfBitBuffer(const BasicBitBuffer< ALLOC > &bitBuffer)
string< ALLOC > toString(T value, const ALLOC &allocator=ALLOC())
size_t bitSizeOfVarUInt(uint64_t value)
size_t bitSizeOfVarInt(int64_t value)
size_t bitSizeOfBytes(Span< const uint8_t > bytesValue)
typename IBasicReflectable< ALLOC >::Ptr IBasicReflectablePtr
Definition: IReflectable.h:531
size_t bitSizeOf(T value)
size_t bitSizeOfVarUInt16(uint16_t value)
typename IBasicReflectable< ALLOC >::ConstPtr IBasicReflectableConstPtr
Definition: IReflectable.h:534
static bool isCompound(SchemaType schemaType)
Definition: TypeInfoUtil.cpp:6