| 860 | template <typename Container, typename StructT, size_t Index, int8_t NodeIndex, |
| 861 | int8_t ElemNode> |
| 862 | void write_configured_list_data(const Container &coll, WriteContext &ctx) { |
| 863 | using Elem = element_type_t<Container>; |
| 864 | ctx.write_var_uint32(static_cast<uint32_t>(coll.size())); |
| 865 | if (coll.empty()) { |
| 866 | return; |
| 867 | } |
| 868 | uint8_t header = COLL_DECL_ELEMENT_TYPE | COLL_IS_SAME_TYPE; |
| 869 | bool has_null = false; |
| 870 | if constexpr (is_nullable_v<Elem>) { |
| 871 | for (const auto &elem : coll) { |
| 872 | if (is_null_value(elem)) { |
| 873 | has_null = true; |
| 874 | break; |
| 875 | } |
| 876 | } |
| 877 | if (has_null) { |
| 878 | header |= COLL_HAS_NULL; |
| 879 | } |
| 880 | } |
| 881 | ctx.write_uint8(header); |
| 882 | const RefMode elem_ref_mode = has_null ? RefMode::NullOnly : RefMode::None; |
| 883 | for (const auto &elem : coll) { |
| 884 | if constexpr (ElemNode >= 0) { |
| 885 | write_configured_value<Elem, StructT, Index, ElemNode>( |
| 886 | elem, ctx, elem_ref_mode, false, true); |
| 887 | } else { |
| 888 | Serializer<Elem>::write(elem, ctx, elem_ref_mode, false); |
| 889 | } |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | template <typename Container, typename StructT, size_t Index, int8_t NodeIndex, |
| 894 | int8_t ElemNode> |
nothing calls this directly
no test coverage detected