1 #ifndef ZSERIO_REFLECTABLE_H_INC 2 #define ZSERIO_REFLECTABLE_H_INC 26 template <
typename ALLOC>
60 size_t bitSizeOf(
size_t bitPosition)
const override;
80 size_t size()
const override;
81 void resize(
size_t size)
override;
96 int8_t
getInt8()
const override;
111 int64_t
toInt()
const override;
112 uint64_t
toUInt()
const override;
124 template <
typename ALLOC,
typename T,
typename =
void>
132 Base(typeInfo), m_value(value)
161 template <
typename ALLOC,
typename T>
163 typename std::enable_if<std::is_arithmetic<T>::value || std::is_same<T, StringView>::value ||
171 Base(typeInfo), m_value(value)
202 template <
typename ALLOC,
typename T>
206 static_assert(std::is_integral<T>::value,
"T must be a signed integral type!");
212 Base(typeInfo, value)
217 return static_cast<double>(Base::getValue());
222 return ::zserio::toString<ALLOC>(Base::getValue(), allocator);
231 template <
typename ALLOC,
typename T>
235 static_assert(std::is_signed<T>::value,
"T must be a signed integral type!");
244 return Base::getValue();
253 template <
typename ALLOC,
typename T>
257 static_assert(std::is_unsigned<T>::value,
"T must be an unsigned integral type!");
266 return Base::getValue();
273 template <
typename ALLOC>
286 Base(typeInfo(), value)
301 return Base::getValue();
310 template <
typename ALLOC>
321 return Base::getValue();
330 template <
typename ALLOC>
341 return Base::getValue();
350 template <
typename ALLOC>
361 return Base::getValue();
370 template <
typename ALLOC>
381 return Base::getValue();
390 template <
typename ALLOC>
401 return Base::getValue();
410 template <
typename ALLOC>
421 return Base::getValue();
430 template <
typename ALLOC>
441 return Base::getValue();
450 template <
typename ALLOC>
461 return Base::getValue();
468 template <
typename ALLOC>
481 Base(typeInfo(), value)
498 template <
typename ALLOC>
511 Base(typeInfo(), value)
528 template <
typename ALLOC>
541 Base(typeInfo(), value)
558 template <
typename ALLOC>
571 Base(typeInfo(), value)
588 template <
typename ALLOC>
601 Base(typeInfo(), value)
618 template <
typename ALLOC>
631 Base(typeInfo(), value)
648 template <
typename ALLOC>
661 Base(typeInfo(), value)
678 template <
typename ALLOC>
691 Base(typeInfo(), value)
705 template <
typename ALLOC,
typename T>
708 template <
typename ALLOC>
721 Base(typeInfo(bitSize), value)
726 " - invalid bit size '" << bitSize <<
"' for 'int8_t' value!";
732 return Base::getTypeInfo().getBitSize();
737 writer.
writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
741 template <
typename ALLOC>
754 Base(typeInfo(bitSize), value)
756 if (bitSize <= 8 || bitSize > 16)
759 " - invalid bit size '" << bitSize <<
"' for 'int16_t' value!";
765 return Base::getTypeInfo().getBitSize();
770 writer.
writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
774 template <
typename ALLOC>
787 Base(typeInfo(bitSize), value)
789 if (bitSize <= 16 || bitSize > 32)
792 " - invalid bit size '" << bitSize <<
"' for 'int32_t' value!";
798 return Base::getTypeInfo().getBitSize();
803 writer.
writeSignedBits(Base::getValue(), Base::getTypeInfo().getBitSize());
807 template <
typename ALLOC>
820 Base(typeInfo(bitSize), value)
825 " - invalid bit size '" << bitSize <<
"' for 'int64_t' value!";
831 return Base::getTypeInfo().getBitSize();
840 template <
typename ALLOC,
typename T>
843 template <
typename ALLOC>
856 Base(typeInfo(bitSize), value)
861 " - invalid bit size '" << bitSize <<
"' for 'uint8_t' value!";
867 return Base::getTypeInfo().getBitSize();
872 writer.
writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
876 template <
typename ALLOC>
889 Base(typeInfo(bitSize), value)
891 if (bitSize <= 8 || bitSize > 16)
894 " - invalid bit size '" << bitSize <<
"' for 'uint16_t' value!";
900 return Base::getTypeInfo().getBitSize();
905 writer.
writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
909 template <
typename ALLOC>
922 Base(typeInfo(bitSize), value)
924 if (bitSize <= 16 || bitSize > 32)
927 " - invalid bit size '" << bitSize <<
"' for 'uint32_t' value!";
933 return Base::getTypeInfo().getBitSize();
938 writer.
writeBits(Base::getValue(), Base::getTypeInfo().getBitSize());
942 template <
typename ALLOC>
955 Base(typeInfo(bitSize), value)
960 " - invalid bit size '" << bitSize <<
"' for 'uint64_t' value!";
966 return Base::getTypeInfo().getBitSize();
971 writer.
writeBits64(Base::getValue(), Base::getTypeInfo().getBitSize());
975 template <
typename ALLOC,
typename T>
978 template <
typename ALLOC>
991 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
996 " - invalid max bit size '" << maxBitSize <<
"' for 'int8_t' value!";
999 if (dynamicBitSize > maxBitSize)
1002 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1008 return m_dynamicBitSize;
1017 uint8_t m_dynamicBitSize;
1020 template <
typename ALLOC>
1033 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1035 if (maxBitSize <= 8 || maxBitSize > 16)
1038 " - invalid max bit size '" << maxBitSize <<
"' for 'int16_t' value!";
1041 if (dynamicBitSize > maxBitSize)
1044 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1050 return m_dynamicBitSize;
1059 uint8_t m_dynamicBitSize;
1062 template <
typename ALLOC>
1075 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1077 if (maxBitSize <= 16 || maxBitSize > 32)
1080 " - invalid max bit size '" << maxBitSize <<
"' for 'int32_t' value!";
1083 if (dynamicBitSize > maxBitSize)
1086 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1092 return m_dynamicBitSize;
1101 uint8_t m_dynamicBitSize;
1104 template <
typename ALLOC>
1117 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1119 if (maxBitSize <= 32)
1122 " - invalid max bit size '" << maxBitSize <<
"' for 'int64_t' value!";
1125 if (dynamicBitSize > maxBitSize)
1128 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1134 return m_dynamicBitSize;
1143 uint8_t m_dynamicBitSize;
1146 template <
typename ALLOC,
typename T>
1149 template <
typename ALLOC>
1162 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1167 " - invalid max bit size '" << maxBitSize <<
"' for 'uint8_t' value!";
1170 if (dynamicBitSize > maxBitSize)
1173 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1179 return m_dynamicBitSize;
1184 writer.
writeBits(Base::getValue(), m_dynamicBitSize);
1188 uint8_t m_dynamicBitSize;
1191 template <
typename ALLOC>
1204 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1206 if (maxBitSize <= 8 || maxBitSize > 16)
1209 " - invalid max bit size '" << maxBitSize <<
"' for 'uint16_t' value!";
1212 if (dynamicBitSize > maxBitSize)
1215 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1221 return m_dynamicBitSize;
1226 writer.
writeBits(Base::getValue(), m_dynamicBitSize);
1230 uint8_t m_dynamicBitSize;
1233 template <
typename ALLOC>
1246 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1248 if (maxBitSize <= 16 || maxBitSize > 32)
1251 " - invalid max bit size '" << maxBitSize <<
"' for 'uint32_t' value!";
1254 if (dynamicBitSize > maxBitSize)
1257 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1263 return m_dynamicBitSize;
1268 writer.
writeBits(Base::getValue(), m_dynamicBitSize);
1272 uint8_t m_dynamicBitSize;
1275 template <
typename ALLOC>
1288 Base(typeInfo(maxBitSize), value), m_dynamicBitSize(dynamicBitSize)
1290 if (maxBitSize <= 32)
1293 " - invalid max bit size '" << maxBitSize <<
"' for 'uint64_t' value!";
1296 if (dynamicBitSize > maxBitSize)
1299 dynamicBitSize <<
"' is greater than max bit size '" << maxBitSize <<
"'!";
1305 return m_dynamicBitSize;
1310 writer.
writeBits64(Base::getValue(), m_dynamicBitSize);
1314 uint8_t m_dynamicBitSize;
1320 template <
typename ALLOC>
1333 Base(typeInfo(), value)
1350 template <
typename ALLOC>
1363 Base(typeInfo(), value)
1380 template <
typename ALLOC>
1393 Base(typeInfo(), value)
1410 template <
typename ALLOC>
1423 Base(typeInfo(), value)
1440 template <
typename ALLOC>
1453 Base(typeInfo(), value)
1470 template <
typename ALLOC>
1483 Base(typeInfo(), value)
1500 template <
typename ALLOC>
1513 Base(typeInfo(), value)
1530 template <
typename ALLOC>
1543 Base(typeInfo(), value)
1560 template <
typename ALLOC>
1573 Base(typeInfo(), value)
1590 template <
typename ALLOC,
typename T>
1594 static_assert(std::is_floating_point<T>::value,
"T must be a floating point type!");
1602 return static_cast<double>(getValue());
1609 template <
typename ALLOC>
1622 Base(typeInfo(), value)
1637 return Base::getValue();
1644 template <
typename ALLOC>
1657 Base(typeInfo(), value)
1672 return Base::getValue();
1679 template <
typename ALLOC>
1692 Base(typeInfo(), value)
1707 return Base::getValue();
1714 template <
typename ALLOC>
1727 Base(typeInfo(), value)
1742 return Base::getValue();
1749 template <
typename ALLOC>
1762 Base(typeInfo(), value)
1777 return Base::getValue();
1789 template <
typename ALLOC>
1802 Base(typeInfo(), value)
1817 return Base::getValue();
1824 template <
typename ALLOC>
1827 const auto& typeInfo =
object.getTypeInfo();
1830 const auto& fields = typeInfo.getFields();
1831 auto fieldsIt = std::find_if(fields.begin(), fields.end(),
1833 if (fieldsIt != fields.end())
1840 template <
typename ALLOC>
1843 const auto& typeInfo =
object.getTypeInfo();
1846 const auto& fields = typeInfo.getFields();
1847 auto fieldsIt = std::find_if(fields.begin(), fields.end(),
1849 if (fieldsIt != fields.end())
1856 template <
typename ALLOC>
1859 const auto& typeInfo =
object.getTypeInfo();
1862 const auto& parameters = typeInfo.getParameters();
1863 auto parametersIt = std::find_if(parameters.begin(), parameters.end(),
1865 {
return parameterInfo.schemaName == name; });
1866 if (parametersIt != parameters.end())
1873 template <
typename ALLOC>
1876 const auto& typeInfo =
object.getTypeInfo();
1879 const auto& parameters = typeInfo.getParameters();
1880 auto parametersIt = std::find_if(parameters.begin(), parameters.end(),
1882 {
return parameterInfo.schemaName == name; });
1883 if (parametersIt != parameters.end())
1890 template <
typename ALLOC>
1893 const auto& typeInfo =
object.getTypeInfo();
1896 const auto& functions = typeInfo.getFunctions();
1897 auto functionsIt = std::find_if(functions.begin(), functions.end(),
1899 {
return functionInfo.schemaName == name; });
1900 if (functionsIt != functions.end())
1907 template <
typename ALLOC>
1910 const auto& typeInfo =
object.getTypeInfo();
1913 const auto& functions = typeInfo.getFunctions();
1914 auto functionsIt = std::find_if(functions.begin(), functions.end(),
1917 return functionInfo.schemaName == name;
1920 if (functionsIt != functions.end())
1927 template <
typename ALLOC>
1933 const size_t dotPos = path.
find(
'.', pos);
1937 auto field = getFieldFromObject(
object, name);
1939 return isLast ? field : getFromObject(*field, path, dotPos + 1);
1941 auto parameter = getParameterFromObject(
object, name);
1943 return isLast ? parameter : getFromObject(*parameter, path, dotPos + 1);
1945 auto functionResult = callFunctionInObject(
object, name);
1947 return isLast ? functionResult : getFromObject(*functionResult, path, dotPos + 1);
1955 template <
typename ALLOC>
1960 const size_t dotPos = path.
find(
'.', pos);
1964 auto field = getFieldFromObject(
object, name);
1966 return isLast ? field : getFromObject(*field, path, dotPos + 1);
1968 auto parameter = getParameterFromObject(
object, name);
1970 return isLast ? parameter : getFromObject(*parameter, path, dotPos + 1);
1972 auto functionResult = callFunctionInObject(
object, name);
1974 return isLast ? functionResult : getFromObject(*functionResult, path, dotPos + 1);
1987 template <
typename ALLOC>
2001 template <
typename ALLOC>
2009 using Base::getTypeInfo;
2028 template <
typename ALLOC>
2036 using Base::getTypeInfo;
2046 size_t bitSizeOf(
size_t bitPosition)
const override;
2063 bool getBool()
const override;
2064 int8_t
getInt8()
const override;
2078 int64_t
toInt()
const override;
2079 uint64_t
toUInt()
const override;
2089 template <
typename ALLOC>
2097 using Base::getTypeInfo;
2099 void resize(
size_t index)
override;
2112 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2118 using ElementReflectable = ELEMENT_REFLECTABLE;
2121 using Base::getTypeInfo;
2123 using Base::operator[];
2124 using Base::getAnyValue;
2127 Base(ElementReflectable::typeInfo(), allocator), m_rawArray(rawArray)
2132 return m_rawArray.size();
2137 if (index >=
size())
2139 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2143 return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2152 const RAW_ARRAY& m_rawArray;
2155 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2161 using ElementReflectable = ELEMENT_REFLECTABLE;
2164 using Base::getTypeInfo;
2167 Base(ElementReflectable::typeInfo(), allocator), m_rawArray(rawArray)
2172 return m_rawArray.size();
2177 m_rawArray.resize(size);
2182 if (index >=
size())
2184 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2188 return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2193 if (index >=
size())
2195 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2199 return std::allocate_shared<ElementReflectable>(Base::get_allocator(), m_rawArray[index]);
2204 if (index >=
size())
2206 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2210 m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2215 m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2229 RAW_ARRAY& m_rawArray;
2237 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2243 using ElementReflectable = ELEMENT_REFLECTABLE;
2246 using Base::getTypeInfo;
2248 using Base::operator[];
2249 using Base::getAnyValue;
2252 Base(ElementReflectable::typeInfo(bitSize), allocator), m_rawArray(rawArray)
2257 return m_rawArray.size();
2262 if (index >=
size())
2264 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2268 return std::allocate_shared<ElementReflectable>(
2269 Base::get_allocator(), m_rawArray[index],
getTypeInfo().getBitSize());
2278 const RAW_ARRAY& m_rawArray;
2281 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2287 using ElementReflectable = ELEMENT_REFLECTABLE;
2290 using Base::getTypeInfo;
2293 Base(ElementReflectable::typeInfo(bitSize), allocator), m_rawArray(rawArray)
2298 return m_rawArray.size();
2303 m_rawArray.resize(size);
2308 if (index >=
size())
2310 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2314 return std::allocate_shared<ElementReflectable>(
2315 Base::get_allocator(), m_rawArray[index],
getTypeInfo().getBitSize());
2320 if (index >=
size())
2322 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2326 return std::allocate_shared<ElementReflectable>(
2327 Base::get_allocator(), m_rawArray[index],
getTypeInfo().getBitSize());
2332 if (index >=
size())
2334 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2338 m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2343 m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2357 RAW_ARRAY& m_rawArray;
2365 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2371 using ElementReflectable = ELEMENT_REFLECTABLE;
2374 using Base::getTypeInfo;
2376 using Base::operator[];
2377 using Base::getAnyValue;
2380 const RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize) :
2381 Base(ElementReflectable::typeInfo(maxBitSize), allocator),
2382 m_rawArray(rawArray), m_maxBitSize(maxBitSize), m_dynamicBitSize(dynamicBitSize)
2387 return m_rawArray.size();
2392 if (index >=
size())
2394 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2398 return std::allocate_shared<ElementReflectable>(
2399 Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2408 const RAW_ARRAY& m_rawArray;
2409 const uint8_t m_maxBitSize;
2410 const uint8_t m_dynamicBitSize;
2413 template <
typename ALLOC,
typename RAW_ARRAY,
typename ELEMENT_REFLECTABLE>
2419 using ElementReflectable = ELEMENT_REFLECTABLE;
2422 using Base::getTypeInfo;
2425 RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize) :
2426 Base(ElementReflectable::typeInfo(maxBitSize), allocator),
2427 m_rawArray(rawArray), m_maxBitSize(maxBitSize), m_dynamicBitSize(dynamicBitSize)
2432 return m_rawArray.size();
2437 m_rawArray.resize(size);
2442 if (index >=
size())
2444 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2448 return std::allocate_shared<ElementReflectable>(
2449 Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2454 if (index >=
size())
2456 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2460 return std::allocate_shared<ElementReflectable>(
2461 Base::get_allocator(), m_rawArray[index], m_maxBitSize, m_dynamicBitSize);
2466 if (index >=
size())
2468 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2472 m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2477 m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2491 RAW_ARRAY& m_rawArray;
2492 const uint8_t m_maxBitSize;
2493 const uint8_t m_dynamicBitSize;
2501 template <
typename ALLOC,
typename RAW_ARRAY>
2503 template <
typename ALLOC,
typename RAW_ARRAY>
2506 template <
typename ALLOC,
typename RAW_ARRAY>
2508 template <
typename ALLOC,
typename RAW_ARRAY>
2511 template <
typename ALLOC,
typename RAW_ARRAY>
2513 template <
typename ALLOC,
typename RAW_ARRAY>
2516 template <
typename ALLOC,
typename RAW_ARRAY>
2518 template <
typename ALLOC,
typename RAW_ARRAY>
2521 template <
typename ALLOC,
typename RAW_ARRAY>
2523 template <
typename ALLOC,
typename RAW_ARRAY>
2526 template <
typename ALLOC,
typename RAW_ARRAY>
2528 template <
typename ALLOC,
typename RAW_ARRAY>
2531 template <
typename ALLOC,
typename RAW_ARRAY>
2533 template <
typename ALLOC,
typename RAW_ARRAY>
2536 template <
typename ALLOC,
typename RAW_ARRAY>
2538 template <
typename ALLOC,
typename RAW_ARRAY>
2541 template <
typename ALLOC,
typename RAW_ARRAY>
2543 template <
typename ALLOC,
typename RAW_ARRAY>
2546 template <
typename ALLOC,
typename RAW_ARRAY>
2549 template <
typename ALLOC,
typename RAW_ARRAY>
2553 template <
typename ALLOC,
typename RAW_ARRAY>
2556 template <
typename ALLOC,
typename RAW_ARRAY>
2560 template <
typename ALLOC,
typename RAW_ARRAY>
2563 template <
typename ALLOC,
typename RAW_ARRAY>
2567 template <
typename ALLOC,
typename RAW_ARRAY>
2570 template <
typename ALLOC,
typename RAW_ARRAY>
2574 template <
typename ALLOC,
typename RAW_ARRAY>
2577 template <
typename ALLOC,
typename RAW_ARRAY>
2580 template <
typename ALLOC,
typename RAW_ARRAY>
2583 template <
typename ALLOC,
typename RAW_ARRAY>
2586 template <
typename ALLOC,
typename RAW_ARRAY>
2589 template <
typename ALLOC,
typename RAW_ARRAY>
2592 template <
typename ALLOC,
typename RAW_ARRAY>
2594 template <
typename ALLOC,
typename RAW_ARRAY>
2597 template <
typename ALLOC,
typename RAW_ARRAY>
2600 template <
typename ALLOC,
typename RAW_ARRAY>
2603 template <
typename ALLOC,
typename RAW_ARRAY>
2606 template <
typename ALLOC,
typename RAW_ARRAY>
2609 template <
typename ALLOC,
typename RAW_ARRAY>
2612 template <
typename ALLOC,
typename RAW_ARRAY>
2615 template <
typename ALLOC,
typename RAW_ARRAY>
2618 template <
typename ALLOC,
typename RAW_ARRAY>
2621 template <
typename ALLOC,
typename RAW_ARRAY>
2624 template <
typename ALLOC,
typename RAW_ARRAY>
2627 template <
typename ALLOC,
typename RAW_ARRAY>
2630 template <
typename ALLOC,
typename RAW_ARRAY>
2633 template <
typename ALLOC,
typename RAW_ARRAY>
2636 template <
typename ALLOC,
typename RAW_ARRAY>
2639 template <
typename ALLOC,
typename RAW_ARRAY>
2642 template <
typename ALLOC,
typename RAW_ARRAY>
2645 template <
typename ALLOC,
typename RAW_ARRAY>
2648 template <
typename ALLOC,
typename RAW_ARRAY>
2651 template <
typename ALLOC,
typename RAW_ARRAY>
2654 template <
typename ALLOC,
typename RAW_ARRAY>
2657 template <
typename ALLOC,
typename RAW_ARRAY>
2660 template <
typename ALLOC,
typename RAW_ARRAY>
2668 template <
typename ALLOC,
typename RAW_ARRAY>
2674 using ElementType =
typename RAW_ARRAY::value_type;
2677 using Base::getTypeInfo;
2679 using Base::operator[];
2680 using Base::getAnyValue;
2683 Base(ElementType::typeInfo(), allocator), m_rawArray(rawArray)
2688 return m_rawArray.size();
2693 if (index >=
size())
2695 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2699 return m_rawArray[index].reflectable(Base::get_allocator());
2708 const RAW_ARRAY& m_rawArray;
2711 template <
typename ALLOC,
typename RAW_ARRAY>
2717 using ElementType =
typename RAW_ARRAY::value_type;
2720 using Base::getTypeInfo;
2723 Base(ElementType::typeInfo(), allocator), m_rawArray(rawArray)
2728 return m_rawArray.size();
2733 m_rawArray.resize(size);
2738 if (index >=
size())
2740 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2744 return m_rawArray[index].reflectable(Base::get_allocator());
2749 if (index >=
size())
2751 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2755 return m_rawArray[index].reflectable(Base::get_allocator());
2760 if (index >=
size())
2762 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2766 m_rawArray[index] = value.template get<typename RAW_ARRAY::value_type>();
2771 m_rawArray.push_back(value.template get<typename RAW_ARRAY::value_type>());
2785 RAW_ARRAY& m_rawArray;
2791 template <
typename ALLOC,
typename RAW_ARRAY>
2797 using ElementType =
typename RAW_ARRAY::value_type;
2800 using Base::getTypeInfo;
2802 using Base::operator[];
2803 using Base::getAnyValue;
2806 Base(ElementType::typeInfo(), allocator), m_rawArray(rawArray)
2811 return m_rawArray.size();
2816 if (index >=
size())
2818 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2822 return m_rawArray[index].reflectable(Base::get_allocator());
2831 const RAW_ARRAY& m_rawArray;
2834 template <
typename ALLOC,
typename RAW_ARRAY>
2840 using ElementType =
typename RAW_ARRAY::value_type;
2841 using UnderlyingElementType =
typename ElementType::underlying_type;
2844 using Base::getTypeInfo;
2847 Base(ElementType::typeInfo(), allocator), m_rawArray(rawArray)
2852 return m_rawArray.size();
2857 m_rawArray.resize(size);
2862 if (index >=
size())
2864 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2868 return m_rawArray[index].reflectable(Base::get_allocator());
2873 if (index >=
size())
2875 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2879 return m_rawArray[index].reflectable(Base::get_allocator());
2884 if (index >=
size())
2886 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2890 if (value.template isType<ElementType>())
2891 m_rawArray[index] = value.template get<ElementType>();
2893 m_rawArray[index] = ElementType(value.template get<UnderlyingElementType>());
2898 if (value.template isType<ElementType>())
2899 m_rawArray.push_back(value.template get<ElementType>());
2901 m_rawArray.push_back(ElementType(value.template get<UnderlyingElementType>()));
2915 RAW_ARRAY& m_rawArray;
2921 template <
typename ALLOC,
typename RAW_ARRAY>
2927 using ElementType =
typename RAW_ARRAY::value_type;
2930 using Base::getTypeInfo;
2932 using Base::operator[];
2933 using Base::getAnyValue;
2941 return m_rawArray.size();
2946 if (index >=
size())
2948 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
2961 const RAW_ARRAY& m_rawArray;
2964 template <
typename ALLOC,
typename RAW_ARRAY>
2970 using ElementType =
typename RAW_ARRAY::value_type;
2971 using UnderlyingElementType =
typename std::underlying_type<ElementType>::type;
2974 using Base::getTypeInfo;
2982 return m_rawArray.size();
2987 m_rawArray.resize(size);
2992 if (index >=
size())
2994 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
3003 if (index >=
size())
3005 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
3014 if (index >=
size())
3016 throw CppRuntimeException(
"Index ") << index <<
" out of range for reflectable array '" <<
3020 if (value.template isType<ElementType>())
3021 m_rawArray[index] = value.template get<ElementType>();
3023 m_rawArray[index] = valueToEnum<ElementType>(value.template get<UnderlyingElementType>());
3028 if (value.template isType<ElementType>())
3029 m_rawArray.push_back(value.template get<ElementType>());
3031 m_rawArray.push_back(valueToEnum<ElementType>(value.template get<UnderlyingElementType>()));
3045 RAW_ARRAY& m_rawArray;
3054 template <
typename T,
typename ALLOC =
typename T::allocator_type>
3063 m_object(allocator),
3064 m_reflectable(m_object.reflectable(allocator))
3069 return m_reflectable->getTypeInfo();
3074 return m_reflectable->isArray();
3079 m_reflectable->initializeChildren();
3084 m_reflectable->initialize(typeArguments);
3089 return m_reflectable->initializeOffsets(bitPosition);
3099 return m_reflectable->bitSizeOf(bitPosition);
3109 m_reflectable->write(writer);
3114 return m_reflectable->getField(name);
3119 return m_reflectable->getField(name);
3124 return m_reflectable->createField(name);
3129 m_reflectable->setField(name, value);
3134 return m_reflectable->getParameter(name);
3139 return m_reflectable->getParameter(name);
3144 return m_reflectable->callFunction(name);
3149 return m_reflectable->callFunction(name);
3154 return m_reflectable->getChoice();
3159 return m_reflectable->find(path);
3164 return m_reflectable->find(path);
3169 return m_reflectable->operator[](path);
3174 return m_reflectable->operator[](path);
3179 return m_reflectable->size();
3184 m_reflectable->resize(size);
3189 return m_reflectable->at(index);
3194 return m_reflectable->at(index);
3199 return m_reflectable->operator[](index);
3204 return m_reflectable->operator[](index);
3209 m_reflectable->setAt(value, index);
3214 m_reflectable->append(value);
3219 return m_reflectable->getAnyValue(allocator);
3224 return m_reflectable->getAnyValue(allocator);
3238 bool getBool()
const override {
return m_reflectable->getBool(); }
3239 int8_t
getInt8()
const override {
return m_reflectable->getInt8(); }
3240 int16_t
getInt16()
const override {
return m_reflectable->getInt16(); }
3241 int32_t
getInt32()
const override {
return m_reflectable->getInt32(); }
3242 int64_t
getInt64()
const override {
return m_reflectable->getInt64(); }
3243 uint8_t
getUInt8()
const override {
return m_reflectable->getUInt8(); }
3244 uint16_t
getUInt16()
const override {
return m_reflectable->getUInt16(); }
3245 uint32_t
getUInt32()
const override {
return m_reflectable->getUInt32(); }
3246 uint64_t
getUInt64()
const override {
return m_reflectable->getUInt64(); }
3247 float getFloat()
const override {
return m_reflectable->getFloat(); }
3248 double getDouble()
const override {
return m_reflectable->getDouble(); }
3254 int64_t
toInt()
const override {
return m_reflectable->toInt(); }
3255 uint64_t
toUInt()
const override {
return m_reflectable->toUInt(); }
3256 double toDouble()
const override {
return m_reflectable->toDouble(); }
3259 return m_reflectable->toString(allocator);
3276 template <
typename ALLOC>
3282 return std::allocate_shared<BoolReflectable<ALLOC>>(allocator, value);
3287 return std::allocate_shared<Int8Reflectable<ALLOC>>(allocator, value);
3292 return std::allocate_shared<Int16Reflectable<ALLOC>>(allocator, value);
3297 return std::allocate_shared<Int32Reflectable<ALLOC>>(allocator, value);
3302 return std::allocate_shared<Int64Reflectable<ALLOC>>(allocator, value);
3307 return std::allocate_shared<UInt8Reflectable<ALLOC>>(allocator, value);
3312 return std::allocate_shared<UInt16Reflectable<ALLOC>>(allocator, value);
3317 return std::allocate_shared<UInt32Reflectable<ALLOC>>(allocator, value);
3322 return std::allocate_shared<UInt64Reflectable<ALLOC>>(allocator, value);
3325 template <typename T, typename std::enable_if<std::is_signed<T>::value,
int>::type = 0>
3327 T value, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3329 return std::allocate_shared<FixedSignedBitFieldReflectable<ALLOC, T>>(allocator, value, bitSize);
3332 template <typename T, typename std::enable_if<std::is_unsigned<T>::value,
int>::type = 0>
3334 T value, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3336 return std::allocate_shared<FixedUnsignedBitFieldReflectable<ALLOC, T>>(allocator, value, bitSize);
3339 template <typename T, typename std::enable_if<std::is_signed<T>::value,
int>::type = 0>
3341 T value, uint8_t maxBitSize, uint8_t dynamicBitSize,
const ALLOC& allocator = ALLOC())
3343 return std::allocate_shared<DynamicSignedBitFieldReflectable<ALLOC, T>>(
3344 allocator, value, maxBitSize, dynamicBitSize);
3349 int64_t value, uint8_t maxBitSize,
const ALLOC& allocator = ALLOC())
3351 if (maxBitSize != 64)
3354 "maxBitSize != 64 for referenced dynamic bit field!";
3357 return getDynamicSignedBitField(value, maxBitSize, maxBitSize, allocator);
3360 template <typename T, typename std::enable_if<std::is_unsigned<T>::value,
int>::type = 0>
3362 T value, uint8_t maxBitSize, uint8_t dynamicBitSize,
const ALLOC& allocator = ALLOC())
3364 return std::allocate_shared<DynamicUnsignedBitFieldReflectable<ALLOC, T>>(
3365 allocator, value, maxBitSize, dynamicBitSize);
3370 uint64_t value, uint8_t maxBitSize,
const ALLOC& allocator = ALLOC())
3372 if (maxBitSize != 64)
3375 "maxBitSize != 64 for referenced dynamic bit field!";
3378 return getDynamicUnsignedBitField(value, maxBitSize, maxBitSize, allocator);
3382 int16_t value,
const ALLOC& allocator = ALLOC())
3384 return std::allocate_shared<VarInt16Reflectable<ALLOC>>(allocator, value);
3388 int32_t value,
const ALLOC& allocator = ALLOC())
3390 return std::allocate_shared<VarInt32Reflectable<ALLOC>>(allocator, value);
3394 int64_t value,
const ALLOC& allocator = ALLOC())
3396 return std::allocate_shared<VarInt64Reflectable<ALLOC>>(allocator, value);
3401 return std::allocate_shared<VarIntReflectable<ALLOC>>(allocator, value);
3405 uint16_t value,
const ALLOC& allocator = ALLOC())
3407 return std::allocate_shared<VarUInt16Reflectable<ALLOC>>(allocator, value);
3411 uint32_t value,
const ALLOC& allocator = ALLOC())
3413 return std::allocate_shared<VarUInt32Reflectable<ALLOC>>(allocator, value);
3417 uint64_t value,
const ALLOC& allocator = ALLOC())
3419 return std::allocate_shared<VarUInt64Reflectable<ALLOC>>(allocator, value);
3423 uint64_t value,
const ALLOC& allocator = ALLOC())
3425 return std::allocate_shared<VarUIntReflectable<ALLOC>>(allocator, value);
3429 uint32_t value,
const ALLOC& allocator = ALLOC())
3431 return std::allocate_shared<VarSizeReflectable<ALLOC>>(allocator, value);
3436 return std::allocate_shared<Float16Reflectable<ALLOC>>(allocator, value);
3441 return std::allocate_shared<Float32Reflectable<ALLOC>>(allocator, value);
3446 return std::allocate_shared<Float64Reflectable<ALLOC>>(allocator, value);
3451 return std::allocate_shared<BytesReflectable<ALLOC>>(allocator, value);
3456 return std::allocate_shared<StringReflectable<ALLOC>>(allocator, value);
3462 return std::allocate_shared<BitBufferReflectable<ALLOC>>(allocator, value);
3465 template <
typename RAW_ARRAY>
3467 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3469 return std::allocate_shared<BoolReflectableConstArray<ALLOC, RAW_ARRAY>>(
3470 allocator, allocator, rawArray);
3473 template <
typename RAW_ARRAY>
3476 return std::allocate_shared<BoolReflectableArray<ALLOC, RAW_ARRAY>>(
3477 allocator, allocator, rawArray);
3480 template <
typename RAW_ARRAY>
3482 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3484 return std::allocate_shared<Int8ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3485 allocator, allocator, rawArray);
3488 template <
typename RAW_ARRAY>
3491 return std::allocate_shared<Int8ReflectableArray<ALLOC, RAW_ARRAY>>(
3492 allocator, allocator, rawArray);
3495 template <
typename RAW_ARRAY>
3497 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3499 return std::allocate_shared<Int16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3500 allocator, allocator, rawArray);
3503 template <
typename RAW_ARRAY>
3506 return std::allocate_shared<Int16ReflectableArray<ALLOC, RAW_ARRAY>>(
3507 allocator, allocator, rawArray);
3510 template <
typename RAW_ARRAY>
3512 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3514 return std::allocate_shared<Int32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3515 allocator, allocator, rawArray);
3518 template <
typename RAW_ARRAY>
3521 return std::allocate_shared<Int32ReflectableArray<ALLOC, RAW_ARRAY>>(
3522 allocator, allocator, rawArray);
3525 template <
typename RAW_ARRAY>
3527 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3529 return std::allocate_shared<Int64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3530 allocator, allocator, rawArray);
3533 template <
typename RAW_ARRAY>
3536 return std::allocate_shared<Int64ReflectableArray<ALLOC, RAW_ARRAY>>(
3537 allocator, allocator, rawArray);
3540 template <
typename RAW_ARRAY>
3542 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3544 return std::allocate_shared<UInt8ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3545 allocator, allocator, rawArray);
3548 template <
typename RAW_ARRAY>
3551 return std::allocate_shared<UInt8ReflectableArray<ALLOC, RAW_ARRAY>>(
3552 allocator, allocator, rawArray);
3555 template <
typename RAW_ARRAY>
3557 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3559 return std::allocate_shared<UInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3560 allocator, allocator, rawArray);
3563 template <
typename RAW_ARRAY>
3566 return std::allocate_shared<UInt16ReflectableArray<ALLOC, RAW_ARRAY>>(
3567 allocator, allocator, rawArray);
3570 template <
typename RAW_ARRAY>
3572 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3574 return std::allocate_shared<UInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3575 allocator, allocator, rawArray);
3578 template <
typename RAW_ARRAY>
3581 return std::allocate_shared<UInt32ReflectableArray<ALLOC, RAW_ARRAY>>(
3582 allocator, allocator, rawArray);
3585 template <
typename RAW_ARRAY>
3587 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3589 return std::allocate_shared<UInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3590 allocator, allocator, rawArray);
3593 template <
typename RAW_ARRAY>
3596 return std::allocate_shared<UInt64ReflectableArray<ALLOC, RAW_ARRAY>>(
3597 allocator, allocator, rawArray);
3600 template <
typename RAW_ARRAY>
3602 const RAW_ARRAY& rawArray, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3604 return std::allocate_shared<FixedSignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3605 allocator, allocator, rawArray, bitSize);
3608 template <
typename RAW_ARRAY>
3610 RAW_ARRAY& rawArray, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3612 return std::allocate_shared<FixedSignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3613 allocator, allocator, rawArray, bitSize);
3616 template <
typename RAW_ARRAY>
3618 const RAW_ARRAY& rawArray, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3620 return std::allocate_shared<FixedUnsignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3621 allocator, allocator, rawArray, bitSize);
3624 template <
typename RAW_ARRAY>
3626 RAW_ARRAY& rawArray, uint8_t bitSize,
const ALLOC& allocator = ALLOC())
3628 return std::allocate_shared<FixedUnsignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3629 allocator, allocator, rawArray, bitSize);
3632 template <
typename RAW_ARRAY>
3634 const RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize,
3635 const ALLOC& allocator = ALLOC())
3637 return std::allocate_shared<DynamicSignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3638 allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3641 template <
typename RAW_ARRAY>
3643 RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize,
const ALLOC& allocator = ALLOC())
3645 return std::allocate_shared<DynamicSignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3646 allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3649 template <
typename RAW_ARRAY>
3651 const RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize,
3652 const ALLOC& allocator = ALLOC())
3654 return std::allocate_shared<DynamicUnsignedBitFieldReflectableConstArray<ALLOC, RAW_ARRAY>>(
3655 allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3658 template <
typename RAW_ARRAY>
3660 RAW_ARRAY& rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize,
const ALLOC& allocator = ALLOC())
3662 return std::allocate_shared<DynamicUnsignedBitFieldReflectableArray<ALLOC, RAW_ARRAY>>(
3663 allocator, allocator, rawArray, maxBitSize, dynamicBitSize);
3666 template <
typename RAW_ARRAY>
3668 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3670 return std::allocate_shared<VarInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3671 allocator, allocator, rawArray);
3674 template <
typename RAW_ARRAY>
3677 return std::allocate_shared<VarInt16ReflectableArray<ALLOC, RAW_ARRAY>>(
3678 allocator, allocator, rawArray);
3681 template <
typename RAW_ARRAY>
3683 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3685 return std::allocate_shared<VarInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3686 allocator, allocator, rawArray);
3689 template <
typename RAW_ARRAY>
3692 return std::allocate_shared<VarInt32ReflectableArray<ALLOC, RAW_ARRAY>>(
3693 allocator, allocator, rawArray);
3696 template <
typename RAW_ARRAY>
3698 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3700 return std::allocate_shared<VarInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3701 allocator, allocator, rawArray);
3704 template <
typename RAW_ARRAY>
3707 return std::allocate_shared<VarInt64ReflectableArray<ALLOC, RAW_ARRAY>>(
3708 allocator, allocator, rawArray);
3711 template <
typename RAW_ARRAY>
3713 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3715 return std::allocate_shared<VarIntReflectableConstArray<ALLOC, RAW_ARRAY>>(
3716 allocator, allocator, rawArray);
3719 template <
typename RAW_ARRAY>
3722 return std::allocate_shared<VarIntReflectableArray<ALLOC, RAW_ARRAY>>(
3723 allocator, allocator, rawArray);
3726 template <
typename RAW_ARRAY>
3728 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3730 return std::allocate_shared<VarUInt16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3731 allocator, allocator, rawArray);
3734 template <
typename RAW_ARRAY>
3737 return std::allocate_shared<VarUInt16ReflectableArray<ALLOC, RAW_ARRAY>>(
3738 allocator, allocator, rawArray);
3741 template <
typename RAW_ARRAY>
3743 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3745 return std::allocate_shared<VarUInt32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3746 allocator, allocator, rawArray);
3749 template <
typename RAW_ARRAY>
3752 return std::allocate_shared<VarUInt32ReflectableArray<ALLOC, RAW_ARRAY>>(
3753 allocator, allocator, rawArray);
3756 template <
typename RAW_ARRAY>
3758 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3760 return std::allocate_shared<VarUInt64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3761 allocator, allocator, rawArray);
3764 template <
typename RAW_ARRAY>
3767 return std::allocate_shared<VarUInt64ReflectableArray<ALLOC, RAW_ARRAY>>(
3768 allocator, allocator, rawArray);
3771 template <
typename RAW_ARRAY>
3773 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3775 return std::allocate_shared<VarUIntReflectableConstArray<ALLOC, RAW_ARRAY>>(
3776 allocator, allocator, rawArray);
3779 template <
typename RAW_ARRAY>
3782 return std::allocate_shared<VarUIntReflectableArray<ALLOC, RAW_ARRAY>>(
3783 allocator, allocator, rawArray);
3786 template <
typename RAW_ARRAY>
3788 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3790 return std::allocate_shared<VarSizeReflectableConstArray<ALLOC, RAW_ARRAY>>(
3791 allocator, allocator, rawArray);
3794 template <
typename RAW_ARRAY>
3797 return std::allocate_shared<VarSizeReflectableArray<ALLOC, RAW_ARRAY>>(
3798 allocator, allocator, rawArray);
3801 template <
typename RAW_ARRAY>
3803 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3805 return std::allocate_shared<Float16ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3806 allocator, allocator, rawArray);
3809 template <
typename RAW_ARRAY>
3812 return std::allocate_shared<Float16ReflectableArray<ALLOC, RAW_ARRAY>>(
3813 allocator, allocator, rawArray);
3816 template <
typename RAW_ARRAY>
3818 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3820 return std::allocate_shared<Float32ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3821 allocator, allocator, rawArray);
3824 template <
typename RAW_ARRAY>
3827 return std::allocate_shared<Float32ReflectableArray<ALLOC, RAW_ARRAY>>(
3828 allocator, allocator, rawArray);
3831 template <
typename RAW_ARRAY>
3833 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3835 return std::allocate_shared<Float64ReflectableConstArray<ALLOC, RAW_ARRAY>>(
3836 allocator, allocator, rawArray);
3839 template <
typename RAW_ARRAY>
3842 return std::allocate_shared<Float64ReflectableArray<ALLOC, RAW_ARRAY>>(
3843 allocator, allocator, rawArray);
3846 template <
typename RAW_ARRAY>
3848 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3850 return std::allocate_shared<BytesReflectableConstArray<ALLOC, RAW_ARRAY>>(
3851 allocator, allocator, rawArray);
3854 template <
typename RAW_ARRAY>
3857 return std::allocate_shared<BytesReflectableArray<ALLOC, RAW_ARRAY>>(
3858 allocator, allocator, rawArray);
3861 template <
typename RAW_ARRAY>
3863 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3865 return std::allocate_shared<StringReflectableConstArray<ALLOC, RAW_ARRAY>>(
3866 allocator, allocator, rawArray);
3869 template <
typename RAW_ARRAY>
3872 return std::allocate_shared<StringReflectableArray<ALLOC, RAW_ARRAY>>(
3873 allocator, allocator, rawArray);
3876 template <
typename RAW_ARRAY>
3878 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3880 return std::allocate_shared<BitBufferReflectableConstArray<ALLOC, RAW_ARRAY>>(
3881 allocator, allocator, rawArray);
3884 template <
typename RAW_ARRAY>
3887 return std::allocate_shared<BitBufferReflectableArray<ALLOC, RAW_ARRAY>>(
3888 allocator, allocator, rawArray);
3891 template <
typename RAW_ARRAY>
3893 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3895 return std::allocate_shared<CompoundReflectableConstArray<ALLOC, RAW_ARRAY>>(
3896 allocator, allocator, rawArray);
3899 template <
typename RAW_ARRAY>
3902 return std::allocate_shared<CompoundReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3905 template <
typename RAW_ARRAY>
3907 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3909 return std::allocate_shared<BitmaskReflectableConstArray<ALLOC, RAW_ARRAY>>(
3910 allocator, allocator, rawArray);
3913 template <
typename RAW_ARRAY>
3916 return std::allocate_shared<BitmaskReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3919 template <
typename RAW_ARRAY>
3921 const RAW_ARRAY& rawArray,
const ALLOC& allocator = ALLOC())
3923 return std::allocate_shared<EnumReflectableConstArray<ALLOC, RAW_ARRAY>>(
3924 allocator, allocator, rawArray);
3927 template <
typename RAW_ARRAY>
3930 return std::allocate_shared<EnumReflectableArray<ALLOC, RAW_ARRAY>>(allocator, allocator, rawArray);
3937 template <
typename ALLOC>
3939 m_typeInfo(typeInfo)
3942 template <
typename ALLOC>
3945 template <
typename ALLOC>
3951 template <
typename ALLOC>
3957 template <
typename ALLOC>
3963 template <
typename ALLOC>
3969 template <
typename ALLOC>
3975 template <
typename ALLOC>
3981 template <
typename ALLOC>
3987 template <
typename ALLOC>
3993 template <
typename ALLOC>
3999 template <
typename ALLOC>
4005 template <
typename ALLOC>
4011 template <
typename ALLOC>
4017 template <
typename ALLOC>
4023 template <
typename ALLOC>
4029 template <
typename ALLOC>
4035 template <
typename ALLOC>
4041 template <
typename ALLOC>
4047 template <
typename ALLOC>
4053 template <
typename ALLOC>
4056 return detail::getFromObject(*
this, path, 0);
4059 template <
typename ALLOC>
4062 return detail::getFromObject(*
this, path, 0);
4065 template <
typename ALLOC>
4071 template <
typename ALLOC>
4077 template <
typename ALLOC>
4083 template <
typename ALLOC>
4089 template <
typename ALLOC>
4095 template <
typename ALLOC>
4101 template <
typename ALLOC>
4107 template <
typename ALLOC>
4113 template <
typename ALLOC>
4119 template <
typename ALLOC>
4125 template <
typename ALLOC>
4131 template <
typename ALLOC>
4137 template <
typename ALLOC>
4143 template <
typename ALLOC>
4149 template <
typename ALLOC>
4155 template <
typename ALLOC>
4161 template <
typename ALLOC>
4167 template <
typename ALLOC>
4173 template <
typename ALLOC>
4179 template <
typename ALLOC>
4185 template <
typename ALLOC>
4191 template <
typename ALLOC>
4197 template <
typename ALLOC>
4203 template <
typename ALLOC>
4209 template <
typename ALLOC>
4215 template <
typename ALLOC>
4221 template <
typename ALLOC>
4227 template <
typename ALLOC>
4233 template <
typename ALLOC>
4237 "' to signed integer is not available!";
4240 template <
typename ALLOC>
4244 "' to unsigned integer is not available!";
4247 template <
typename ALLOC>
4251 "' to double is not available!";
4254 template <
typename ALLOC>
4258 "' to string is not available!";
4261 template <
typename ALLOC>
4267 template <
typename ALLOC>
4273 template <
typename ALLOC>
4279 template <
typename ALLOC>
4285 template <
typename ALLOC>
4291 template <
typename ALLOC>
4297 template <
typename ALLOC>
4303 template <
typename ALLOC>
4309 template <
typename ALLOC>
4315 template <
typename ALLOC>
4321 template <
typename ALLOC>
4327 template <
typename ALLOC>
4333 template <
typename ALLOC>
4339 template <
typename ALLOC>
4345 template <
typename ALLOC>
4351 template <
typename ALLOC>
4357 template <
typename ALLOC>
4363 template <
typename ALLOC>
4369 template <
typename ALLOC>
4375 template <
typename ALLOC>
4381 template <
typename ALLOC>
4387 template <
typename ALLOC>
4393 template <
typename ALLOC>
4399 template <
typename ALLOC>
4402 return this->
at(index);
4405 template <
typename ALLOC>
4408 return this->
at(index);
4411 template <
typename ALLOC>
4417 template <
typename ALLOC>
4423 template <
typename ALLOC>
4429 template <
typename ALLOC>
4435 template <
typename ALLOC>
4441 template <
typename ALLOC>
4447 template <
typename ALLOC>
4453 template <
typename ALLOC>
4459 template <
typename ALLOC>
4465 template <
typename ALLOC>
4471 template <
typename ALLOC>
4477 template <
typename ALLOC>
4483 template <
typename ALLOC>
4489 template <
typename ALLOC>
4495 template <
typename ALLOC>
4501 template <
typename ALLOC>
4507 template <
typename ALLOC>
4513 template <
typename ALLOC>
4519 template <
typename ALLOC>
4525 template <
typename ALLOC>
4531 template <
typename ALLOC>
4537 template <
typename ALLOC>
4543 template <
typename ALLOC>
4549 template <
typename ALLOC>
4557 #endif // ZSERIO_REFLECTABLE_H_INC static const IBasicTypeInfo< ALLOC > & typeInfo()
typename IBasicReflectable< ALLOC >::ConstPtr IBasicReflectableConstPtr
static const IBasicTypeInfo< ALLOC > & typeInfo()
DynamicUnsignedBitFieldReflectable(uint64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
void writeVarInt64(int64_t data)
uint32_t getUInt32() const override
static IBasicReflectableConstPtr< ALLOC > getFloat16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
void write(BitStreamWriter &writer) const override
static IBasicReflectableConstPtr< ALLOC > getUInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
void writeVarUInt16(uint16_t data)
static const IBasicTypeInfo< ALLOC > & getBool()
static IBasicReflectablePtr< ALLOC > getFixedUnsignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
FixedSignedBitFieldReflectable(int32_t value, uint8_t bitSize)
uint64_t getUInt64() const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
static const IBasicTypeInfo< ALLOC > & getVarInt16()
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
size_t size() const override
void setField(StringView name, const AnyHolder< ALLOC > &value) override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
size_t bitSizeOf(size_t) const override
int32_t getInt32() const override
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
void write(BitStreamWriter &writer) const override
void writeBytes(Span< const uint8_t > data)
size_t bitSizeOf(size_t) const override
VarInt16Reflectable(int16_t value)
CompoundReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
void initializeChildren() override
size_t bitSizeOf(size_t) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
void writeFloat16(float data)
static IBasicReflectablePtr< ALLOC > getFixedSignedBitField(T value, uint8_t bitSize, const ALLOC &allocator=ALLOC())
BitmaskReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
static IBasicReflectablePtr< ALLOC > getInt64(int64_t value, const ALLOC &allocator=ALLOC())
Float32Reflectable(float value)
ReflectableBase & operator=(const ReflectableBase &)=delete
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
IBasicReflectablePtr< ALLOC > callFunction(StringView name) override
static IBasicReflectablePtr< ALLOC > getFloat64(double value, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
static const IBasicTypeInfo< ALLOC > & getInt32()
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
void writeVarUInt64(uint64_t data)
void append(const AnyHolder< ALLOC > &value) override
double toDouble() const override
void writeVarInt16(int16_t data)
size_t bitSizeOfVarUInt64(uint64_t value)
string< ALLOC > toString() const override
int64_t toInt() const override
void setField(StringView name, const AnyHolder< ALLOC > &value) override
size_t bitSizeOf(size_t) const override
size_t bitSizeOf(size_t) const override
IBasicReflectablePtr< ALLOC > at(size_t index) override
void write(BitStreamWriter &writer) const override
double toDouble() const override
typename IBasicReflectable< ALLOC >::Ptr IBasicReflectablePtr
static IBasicReflectablePtr< ALLOC > getVarInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
void write(BitStreamWriter &writer) const override
int64_t getInt64() const override
IBasicReflectablePtr< ALLOC > createField(StringView name) override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
void write(BitStreamWriter &writer) const override
UInt8Reflectable(uint8_t value)
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
uint8_t getUInt8() const override
static IBasicReflectablePtr< ALLOC > getFloat32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
static IBasicReflectableConstPtr< ALLOC > getInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
FixedUnsignedBitFieldReflectable(uint16_t value, uint8_t bitSize)
size_t size() const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
void append(const AnyHolder< ALLOC > &value) override
void initializeChildren() override
int8_t getInt8() const override
static IBasicReflectableConstPtr< ALLOC > getStringArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
BoolReflectable(bool value)
size_t size() const override
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
static IBasicReflectableConstPtr< ALLOC > getUInt8Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
size_t bitSizeOf() const override
static IBasicReflectablePtr< ALLOC > getStringArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getBytesArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
StringView getStringView() const override
StringView getChoice() const override
size_type find(BasicStringView str, size_type pos=0) const noexcept
static IBasicReflectablePtr< ALLOC > getInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
string< ALLOC > toString(T value, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
string< RebindAlloc< ALLOC, char > > toString(const ALLOC &allocator) const override
void writeFloat32(float data)
static const IBasicTypeInfo< ALLOC > & typeInfo()
static const IBasicTypeInfo< ALLOC > & getVarUInt16()
BuiltinReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo, T value)
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getVarUInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
bool getBool() const override
float getFloat() const override
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
uint64_t getUInt64() const override
IBasicReflectablePtr< ALLOC > createField(StringView name) override
void write(BitStreamWriter &writer) const override
bool isArray() const override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
Int64Reflectable(int64_t value)
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getVarInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitField(T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getFixedUnsignedBitField(T value, uint8_t bitSize, const ALLOC &allocator=ALLOC())
DynamicUnsignedBitFieldReflectable(uint32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
void initializeChildren() override
static IBasicReflectableConstPtr< ALLOC > getEnumArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
IBasicReflectablePtr< ALLOC > getParameter(StringView name) override
IBasicReflectablePtr< ALLOC > at(size_t index) override
VarUIntReflectable(uint64_t value)
static IBasicReflectablePtr< ALLOC > getVarInt(int64_t value, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
void append(const AnyHolder< ALLOC > &value) override
void write(BitStreamWriter &writer) const override
StringView getChoice() const override
static const IBasicTypeInfo< ALLOC > & getUInt64()
FixedBitFieldReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray, uint8_t bitSize)
~ReflectableBase() override=0
static IBasicReflectableConstPtr< ALLOC > getVarUInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getFloat64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
int16_t getInt16() const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
void writeBitBuffer(const BasicBitBuffer< ALLOC > &bitBuffer)
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
size_t size() const override
BitmaskReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
static IBasicReflectablePtr< ALLOC > getInt16(int16_t value, const ALLOC &allocator=ALLOC())
void writeVarInt(int64_t data)
static IBasicReflectablePtr< ALLOC > getUInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > operator[](StringView path) const override
void writeVarInt32(int32_t data)
size_t bitSizeOf() const override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getVarUInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getVarSizeArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitField(uint64_t value, uint8_t maxBitSize, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
void initializeChildren() override
size_t size() const override
uint8_t getUInt8() const override
void write(BitStreamWriter &writer) const override
int8_t getInt8() const override
uint64_t toUInt() const override
IntegralReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo, T value)
void writeVarUInt32(uint32_t data)
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & getFloat16()
const T & getValue() const
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
size_t bitSizeOf(size_t bitPosition) const override
DynamicSignedBitFieldReflectable(int8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
static const IBasicTypeInfo< ALLOC > & typeInfo()
void write(BitStreamWriter &writer) const override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getVarUInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getVarInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
DynamicUnsignedBitFieldReflectable(uint8_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
static IBasicReflectablePtr< ALLOC > getUInt8(uint8_t value, const ALLOC &allocator=ALLOC())
string< RebindAlloc< ALLOC, char > > toString() const override
IBasicReflectablePtr< ALLOC > at(size_t index) override
void writeString(StringView data)
size_t size() const override
void write(BitStreamWriter &writer) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
FixedUnsignedBitFieldReflectable(uint8_t value, uint8_t bitSize)
DynamicSignedBitFieldReflectable(int32_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
IBasicReflectablePtr< ALLOC > callFunction(StringView name) override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getUInt32(uint32_t value, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
static IBasicReflectablePtr< ALLOC > getVarUInt16(uint16_t value, const ALLOC &allocator=ALLOC())
DynamicSignedBitFieldReflectable(int64_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
size_t bitSizeOfBytes(Span< const uint8_t > bytesValue)
void writeVarSize(uint32_t data)
void writeSignedBits(int32_t data, uint8_t numBits=32)
static IBasicReflectableConstPtr< ALLOC > getBytesArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void resize(size_t size) override
void write(BitStreamWriter &writer) const override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
int64_t toInt() const override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
size_t size() const override
static IBasicReflectableConstPtr< ALLOC > getFixedUnsignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getCompoundArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
StringView getStringView() const override
IBasicReflectablePtr< ALLOC > getParameter(StringView name) override
StringView getStringView() const override
static const IBasicTypeInfo< ALLOC > & getBytes()
void resize(size_t size) override
size_t bitSizeOfVarInt64(int64_t value)
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
int64_t toInt() const override
EnumReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
IBasicReflectablePtr< ALLOC > find(StringView path) override
FixedUnsignedBitFieldReflectable(uint64_t value, uint8_t bitSize)
void write(BitStreamWriter &writer) const override
BuiltinReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitField(int64_t value, uint8_t maxBitSize, const ALLOC &allocator=ALLOC())
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
size_t bitSizeOfVarInt16(int16_t value)
IBasicReflectablePtr< ALLOC > operator[](size_t index) override
void resize(size_t size) override
UInt32Reflectable(uint32_t value)
size_t bitSizeOf(size_t) const override
uint16_t getUInt16() const override
void append(const AnyHolder< ALLOC > &value) override
size_t initializeOffsets() override
IBasicReflectablePtr< ALLOC > at(size_t index) override
bool getBool() const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
IBasicReflectableConstPtr< ALLOC > operator[](size_t index) const override
int64_t getInt64() const override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getFloat16(float value, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
size_t bitSizeOfVarUInt16(uint16_t value)
static IBasicReflectablePtr< ALLOC > getVarUIntArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
float getFloat() const override
size_t bitSizeOf(size_t) const override
UInt16Reflectable(uint16_t value)
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
size_t bitSizeOf(size_t) const override
IBasicReflectablePtr< ALLOC > operator[](StringView path) override
static IBasicReflectablePtr< ALLOC > getVarInt32(int32_t value, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
size_t size() const override
void write(BitStreamWriter &writer) const override
EnumReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
static IBasicReflectableConstPtr< ALLOC > getDynamicSignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
uint64_t toUInt() const override
static const IBasicTypeInfo< ALLOC > & getFixedUnsignedBitField(uint8_t bitSize)
IBasicReflectablePtr< ALLOC > at(size_t index) override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
size_t bitSizeOfBitBuffer(const BasicBitBuffer< ALLOC > &bitBuffer)
static IBasicReflectablePtr< ALLOC > getBitBuffer(const BasicBitBuffer< ALLOC > &value, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
size_t bitSizeOf(size_t) const override
BuiltinReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray)
static const IBasicTypeInfo< ALLOC > & getDynamicSignedBitField(uint8_t maxBitSize)
static const IBasicTypeInfo< ALLOC > & getFloat64()
size_t bitSizeOf(size_t) const override
uint16_t getUInt16() const override
static IBasicReflectablePtr< ALLOC > getUInt64(uint64_t value, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getUInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
const IBasicTypeInfo< ALLOC > & getTypeInfo() const override
int32_t getInt32() const override
static IBasicReflectableConstPtr< ALLOC > getVarInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
Float16Reflectable(float value)
void write(BitStreamWriter &writer) const override
IBasicReflectablePtr< ALLOC > at(size_t index) override
void write(BitStreamWriter &writer) const override
Span< const uint8_t > getBytes() const override
int8_t getInt8() const override
void write(BitStreamWriter &writer) const override
static IBasicReflectableConstPtr< ALLOC > getVarUIntArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getVarIntArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
void writeFloat64(double data)
static IBasicReflectablePtr< ALLOC > getVarInt16(int16_t value, const ALLOC &allocator=ALLOC())
double getDouble() const override
size_t size() const override
float getFloat() const override
BytesReflectable(Span< const uint8_t > value)
size_t bitSizeOf(size_t) const override
size_t bitSizeOf(size_t) const override
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
IBasicReflectablePtr< ALLOC > at(size_t index) override
size_t bitSizeOfVarUInt32(uint32_t value)
static bool isCompound(SchemaType schemaType)
void write(BitStreamWriter &writer) const override
uint64_t getUInt64() const override
int64_t getInt64() const override
DynamicBitFieldReflectableArray(const ALLOC &allocator, RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize)
Int16Reflectable(int16_t value)
static IBasicReflectableConstPtr< ALLOC > getVarInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getVarSizeArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getVarInt64(int64_t value, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
static IBasicReflectableConstPtr< ALLOC > getVarInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
FixedBitFieldReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray, uint8_t bitSize)
double getDouble() const override
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
void writeBits(uint32_t data, uint8_t numBits=32)
const IBasicTypeInfo< ALLOC > & getTypeInfo() const override
static const IBasicTypeInfo< ALLOC > & getInt16()
ReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo)
static const IBasicTypeInfo< ALLOC > & typeInfo()
void writeVarUInt(uint64_t data)
static IBasicReflectablePtr< ALLOC > getEnumArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
FixedSignedBitFieldReflectable(int8_t value, uint8_t bitSize)
IBasicReflectableConstPtr< ALLOC > operator[](StringView path) const override
size_t bitSizeOf(size_t) const override
int32_t getInt32() const override
static const IBasicTypeInfo< ALLOC > & getInt64()
void resize(size_t index) override
int8_t getInt8() const override
Span< const uint8_t > getBytes() const override
Int8Reflectable(int8_t value)
static const IBasicTypeInfo< ALLOC > & getVarUInt()
uint16_t getUInt16() const override
AnyHolder< ALLOC > getAnyValue() override
static IBasicReflectableConstPtr< ALLOC > getBoolArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t size() const override
static IBasicReflectablePtr< ALLOC > getUInt8Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
bool getBool() const override
size_t bitSizeOf(size_t) const override
static IBasicReflectablePtr< ALLOC > getBitmaskArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
void write(BitStreamWriter &writer) const override
void write(BitStreamWriter &writer) const override
uint8_t getUInt8() const override
StringReflectable(StringView value)
float getFloat() const override
VarInt64Reflectable(int64_t value)
StringView getChoice() const override
IBasicReflectablePtr< ALLOC > getField(StringView name) override
void resize(size_t size) override
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
CompoundReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray)
static const IBasicTypeInfo< ALLOC > & getVarInt64()
static IBasicReflectablePtr< ALLOC > getInt8Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
std::vector< T, RebindAlloc< ALLOC, T >> vector
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
const IBasicTypeInfo< ALLOC > & enumTypeInfo()
static const IBasicTypeInfo< ALLOC > & getFloat32()
static IBasicReflectableConstPtr< ALLOC > getBitmaskArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitField(T value, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
IBasicReflectablePtr< ALLOC > enumReflectable(T value, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
VarSizeReflectable(uint32_t value)
int64_t getInt64() const override
size_t bitSizeOfVarUInt(uint64_t value)
size_t bitSizeOf(size_t) const override
void write(BitStreamWriter &writer) const override
void write(BitStreamWriter &writer) const override
static IBasicReflectablePtr< ALLOC > getBitBufferArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
size_t bitSizeOf(size_t) const override
static IBasicReflectableConstPtr< ALLOC > getVarUInt16Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
AnyHolder< ALLOC > getAnyValue() const override
void write(BitStreamWriter &writer) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
void write(BitStreamWriter &writer) const override
static const IBasicTypeInfo< ALLOC > & getVarInt()
void write(BitStreamWriter &writer) const override
size_t bitSizeOf(size_t) const override
void append(const AnyHolder< ALLOC > &value) override
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
BuiltinReflectableBase(const IBasicTypeInfo< ALLOC > &typeInfo, const T &value)
static const IBasicTypeInfo< ALLOC > & typeInfo()
VarIntReflectable(int64_t value)
uint8_t getUInt8() const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
static const IBasicTypeInfo< ALLOC > & getDynamicUnsignedBitField(uint8_t maxBitSize)
IBasicReflectableConstPtr< ALLOC > operator[](size_t index) const override
static IBasicReflectablePtr< ALLOC > getDynamicUnsignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
void append(const AnyHolder< ALLOC > &value) override
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
Span< const uint8_t > getBytes() const override
uint32_t getUInt32() const override
VarUInt64Reflectable(uint64_t value)
uint32_t getUInt32() const override
size_t bitSizeOfVarInt(int64_t value)
DynamicUnsignedBitFieldReflectable(uint16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
bool isArray() const override
void setAt(const AnyHolder< ALLOC > &value, size_t index) override
void setField(StringView name, const AnyHolder< ALLOC > &value) override
size_t size() const override
size_t bitSizeOf(size_t) const override
size_t bitSizeOf(size_t) const override
void write(BitStreamWriter &writer) const override
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
void write(BitStreamWriter &writer) const override
size_t initializeOffsets() override
size_t bitSizeOf(size_t) const override
void resize(size_t size) override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
IBasicReflectablePtr< ALLOC > at(size_t index) override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
FixedSignedBitFieldReflectable(int64_t value, uint8_t bitSize)
BasicStringView substr(size_type pos=0, size_type count=npos) const
IBasicReflectableConstPtr< ALLOC > find(StringView path) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
void write(BitStreamWriter &writer) const override
static const IBasicTypeInfo< ALLOC > & getVarSize()
size_t bitSizeOfString(StringView stringValue)
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
static IBasicReflectablePtr< ALLOC > getUInt64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getVarIntArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
VarUInt32Reflectable(uint32_t value)
static IBasicReflectableConstPtr< ALLOC > getInt8Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void append(const AnyHolder< ALLOC > &value) override
double getDouble() const override
static constexpr const size_type npos
static const IBasicTypeInfo< ALLOC > & getString()
size_t bitSizeOf(size_t) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
static IBasicReflectablePtr< ALLOC > getVarUInt(uint64_t value, const ALLOC &allocator=ALLOC())
static IBasicReflectableConstPtr< ALLOC > getVarUInt64Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
static const IBasicTypeInfo< ALLOC > & getUInt8()
double getDouble() const override
static const IBasicTypeInfo< ALLOC > & getUInt16()
double toDouble() const override
bool getBool() const override
size_t bitSizeOf(size_t) const override
static IBasicReflectablePtr< ALLOC > getBoolArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
string< ALLOC > toString(const ALLOC &allocator) const override
void append(const AnyHolder< ALLOC > &value) override
static IBasicReflectablePtr< ALLOC > getFloat64Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void write(BitStreamWriter &writer) const override
Span< const uint8_t > getBytes() const override
Float64Reflectable(double value)
static IBasicReflectablePtr< ALLOC > getCompoundArray(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
size_t bitSizeOf(size_t) const override
ReflectableAllocatorHolderBase(const IBasicTypeInfo< ALLOC > &typeInfo, const ALLOC &allocator)
uint32_t getUInt32() const override
const BasicBitBuffer< ALLOC > & getBitBuffer() const override
IBasicReflectableConstPtr< ALLOC > callFunction(StringView name) const override
static IBasicReflectablePtr< ALLOC > getInt32(int32_t value, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
void writeBool(bool data)
static IBasicReflectablePtr< ALLOC > getFloat32(float value, const ALLOC &allocator=ALLOC())
void initialize(const vector< AnyHolder< ALLOC >, ALLOC > &typeArguments) override
void write(BitStreamWriter &writer) const override
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) override
Int32Reflectable(int32_t value)
AnyHolder< ALLOC > getAnyValue() const override
int16_t getInt16() const override
double toDouble() const override
void write(BitStreamWriter &writer) const override
std::basic_string< char, std::char_traits< char >, RebindAlloc< ALLOC, char >> string
IBasicReflectablePtr< ALLOC > getField(StringView name) override
size_t bitSizeOf(size_t) const override
static IBasicReflectablePtr< ALLOC > getUInt16(uint16_t value, const ALLOC &allocator=ALLOC())
IBasicReflectablePtr< ALLOC > operator[](size_t index) override
int64_t toInt() const override
static IBasicReflectablePtr< ALLOC > getBool(bool value, const ALLOC &allocator=ALLOC())
bool isArray() const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
static const IBasicTypeInfo< ALLOC > & getVarUInt32()
static IBasicReflectableConstPtr< ALLOC > getFloat32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()
FixedSignedBitFieldReflectable(int16_t value, uint8_t bitSize)
StringView getStringView() const override
static IBasicReflectableConstPtr< ALLOC > getFixedSignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
size_t bitSizeOf(size_t) const override
static IBasicReflectablePtr< ALLOC > getFixedSignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t bitSize, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getVarUInt32(uint32_t value, const ALLOC &allocator=ALLOC())
int32_t getInt32() const override
UInt64Reflectable(uint64_t value)
void write(BitStreamWriter &writer) const override
void write(BitStreamWriter &writer) const override
void write(BitStreamWriter &writer) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
void write(BitStreamWriter &writer) const override
void writeSignedBits64(int64_t data, uint8_t numBits=64)
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
double toDouble() const override
float getFloat() const override
static const IBasicTypeInfo< ALLOC > & getUInt32()
static IBasicReflectableConstPtr< ALLOC > getUInt32Array(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getInt8(int8_t value, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > getParameter(StringView name) const override
static IBasicReflectablePtr< ALLOC > getDynamicSignedBitFieldArray(RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
DynamicBitFieldReflectableConstArray(const ALLOC &allocator, const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize)
void setField(StringView name, const AnyHolder< ALLOC > &value) override
size_t bitSizeOfVarInt32(int32_t value)
uint64_t toUInt() const override
static IBasicReflectablePtr< ALLOC > getBytes(Span< const uint8_t > value, const ALLOC &allocator=ALLOC())
IBasicReflectableConstPtr< ALLOC > at(size_t index) const override
BitBufferReflectable(const BasicBitBuffer< ALLOC > &value)
static IBasicReflectableConstPtr< ALLOC > getDynamicUnsignedBitFieldArray(const RAW_ARRAY &rawArray, uint8_t maxBitSize, uint8_t dynamicBitSize, const ALLOC &allocator=ALLOC())
static IBasicReflectablePtr< ALLOC > getUInt16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
void resize(size_t size) override
IBasicReflectableConstPtr< ALLOC > getField(StringView name) const override
static const IBasicTypeInfo< ALLOC > & typeInfo()
void resize(size_t size) override
IBasicReflectableConstPtr< ALLOC > find(StringView path) const override
DynamicSignedBitFieldReflectable(int16_t value, uint8_t maxBitSize, uint8_t dynamicBitSize)
void resize(size_t size) override
size_t size() const override
size_t bitSizeOf(size_t) const override
static IBasicReflectablePtr< ALLOC > getString(StringView value, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & getInt8()
uint16_t getUInt16() const override
static IBasicReflectablePtr< ALLOC > getVarUInt64(uint64_t value, const ALLOC &allocator=ALLOC())
FixedUnsignedBitFieldReflectable(uint32_t value, uint8_t bitSize)
ReflectableOwner(const ALLOC &allocator)
static const IBasicTypeInfo< ALLOC > & getBitBuffer()
size_t size() const override
static IBasicReflectablePtr< ALLOC > getInt32Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
size_t size() const override
VarUInt16Reflectable(uint16_t value)
void append(const AnyHolder< ALLOC > &value) override
void write(BitStreamWriter &writer) const override
IBasicReflectablePtr< ALLOC > createField(StringView name) override
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
static const IBasicTypeInfo< ALLOC > & getVarInt32()
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t bitSize)
AnyHolder< ALLOC > getAnyValue(const ALLOC &allocator) const override
static const IBasicTypeInfo< ALLOC > & getFixedSignedBitField(uint8_t bitSize)
size_t bitSizeOf(size_t) const override
size_t initializeOffsets(size_t bitPosition) override
uint64_t getUInt64() const override
int16_t getInt16() const override
size_t bitSizeOf(size_t) const override
static const IBasicTypeInfo< ALLOC > & getVarUInt64()
static IBasicReflectableConstPtr< ALLOC > getBitBufferArray(const RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
VarInt32Reflectable(int32_t value)
static const IBasicTypeInfo< ALLOC > & typeInfo(uint8_t maxBitSize)
string< ALLOC > toString(const ALLOC &allocator) const override
void write(BitStreamWriter &writer) const override
void writeBits64(uint64_t data, uint8_t numBits=64)
int16_t getInt16() const override
static IBasicReflectablePtr< ALLOC > getVarSize(uint32_t value, const ALLOC &allocator=ALLOC())
uint64_t toUInt() const override
static IBasicReflectablePtr< ALLOC > getFloat16Array(RAW_ARRAY &rawArray, const ALLOC &allocator=ALLOC())
static const IBasicTypeInfo< ALLOC > & typeInfo()