MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / deserialize

Method deserialize

proto/test_final_models.cpp:917–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915}
916
917size_t StructSimpleFinalModel::deserialize(::test::StructSimple& value) const noexcept
918{
919 assert(((this->buffer().offset() + _model.fbe_offset()) <= this->buffer().size()) && "Model is broken!");
920 if ((this->buffer().offset() + _model.fbe_offset()) > this->buffer().size())
921 return 0;
922
923 size_t fbe_struct_size = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 8));
924 size_t fbe_struct_type = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 4));
925 assert(((fbe_struct_size > 0) && (fbe_struct_type == fbe_type())) && "Model is broken!");
926 if ((fbe_struct_size == 0) || (fbe_struct_type != fbe_type()))
927 return 8;
928
929 return 8 + _model.get(value);
930}
931
932} // namespace test
933

Callers

nothing calls this directly

Calls 6

offsetMethod · 0.45
bufferMethod · 0.45
fbe_offsetMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected