| 57 | } |
| 58 | |
| 59 | bool Tuple::TryDeepCopy(uint8_t** dst_start, const uint8_t* dst_end, int* offset_start, |
| 60 | const TupleDescriptor& desc, bool convert_ptrs) const { |
| 61 | uint8_t* dst = *dst_start; |
| 62 | int offset = *offset_start; |
| 63 | if (!TryMemCopy(dst, dst_end, desc.byte_size(), this)) return false; |
| 64 | Tuple* dst_tuple = reinterpret_cast<Tuple*>(dst); |
| 65 | dst += desc.byte_size(); |
| 66 | offset += desc.byte_size(); |
| 67 | if (!dst_tuple->TryDeepCopyStrings(&dst, dst_end, &offset, desc, convert_ptrs)) { |
| 68 | return false; |
| 69 | } |
| 70 | if (!dst_tuple->TryDeepCopyCollections(&dst, dst_end, &offset, desc, convert_ptrs)) { |
| 71 | return false; |
| 72 | } |
| 73 | *dst_start = dst; |
| 74 | *offset_start = offset; |
| 75 | return true; |
| 76 | } |
| 77 | |
| 78 | bool Tuple::TryDeepCopyStrings(uint8_t** data, const uint8_t* data_end, int* offset, |
| 79 | const TupleDescriptor& desc, bool convert_ptrs) { |
no test coverage detected