22 static std::shared_ptr<BaseType>
Read(
24 std::vector<unsigned char>::const_iterator& iter,
26#ifdef PROTOCOLCRAFT_DETAILED_PARSING
28 typename OffsetType<std::shared_ptr<BaseType>>::type* start_offset =
nullptr,
29 typename OffsetType<std::shared_ptr<BaseType>>::type* end_offset =
nullptr
34#ifdef PROTOCOLCRAFT_DETAILED_PARSING
35 if (start_offset !=
nullptr)
37 *start_offset = length;
40 std::shared_ptr<BaseType> data = Factory(c->*TypeField);
43 data->Read(iter, length);
45#ifdef PROTOCOLCRAFT_DETAILED_PARSING
46 if (end_offset !=
nullptr)
71 const std::shared_ptr<BaseType>& val
72#ifdef PROTOCOLCRAFT_DETAILED_PARSING
74 const typename OffsetType<std::shared_ptr<BaseType>>::type* start_offset =
nullptr,
75 const typename OffsetType<std::shared_ptr<BaseType>>::type* end_offset =
nullptr
79 return SerializeType<std::shared_ptr<BaseType>>(val
80#ifdef PROTOCOLCRAFT_DETAILED_PARSING
81 , start_offset, end_offset