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

Method deserialize

proto/proto_final_models.cpp:215–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215size_t OrderFinalModel::deserialize(::proto::Order& value) const noexcept
216{
217 assert(((this->buffer().offset() + _model.fbe_offset()) <= this->buffer().size()) && "Model is broken!");
218 if ((this->buffer().offset() + _model.fbe_offset()) > this->buffer().size())
219 return 0;
220
221 size_t fbe_struct_size = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 8));
222 size_t fbe_struct_type = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 4));
223 assert(((fbe_struct_size > 0) && (fbe_struct_type == fbe_type())) && "Model is broken!");
224 if ((fbe_struct_size == 0) || (fbe_struct_type != fbe_type()))
225 return 8;
226
227 return 8 + _model.get(value);
228}
229
230} // namespace proto
231

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