| 895 | } |
| 896 | |
| 897 | size_t StructSimpleFinalModel::serialize(const ::test::StructSimple& value) |
| 898 | { |
| 899 | size_t fbe_initial_size = this->buffer().size(); |
| 900 | |
| 901 | uint32_t fbe_struct_type = (uint32_t)fbe_type(); |
| 902 | uint32_t fbe_struct_size = (uint32_t)(8 + _model.fbe_allocation_size(value)); |
| 903 | uint32_t fbe_struct_offset = (uint32_t)(this->buffer().allocate(fbe_struct_size) - this->buffer().offset()); |
| 904 | assert(((this->buffer().offset() + fbe_struct_offset + fbe_struct_size) <= this->buffer().size()) && "Model is broken!"); |
| 905 | if ((this->buffer().offset() + fbe_struct_offset + fbe_struct_size) > this->buffer().size()) |
| 906 | return 0; |
| 907 | |
| 908 | fbe_struct_size = (uint32_t)(8 + _model.set(value)); |
| 909 | this->buffer().resize(fbe_initial_size + fbe_struct_size); |
| 910 | |
| 911 | *((uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 8)) = fbe_struct_size; |
| 912 | *((uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 4)) = fbe_struct_type; |
| 913 | |
| 914 | return fbe_struct_size; |
| 915 | } |
| 916 | |
| 917 | size_t StructSimpleFinalModel::deserialize(::test::StructSimple& value) const noexcept |
| 918 | { |
nothing calls this directly
no test coverage detected