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

Method deserialize

proto/protoex_final_models.cpp:251–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251size_t OrderFinalModel::deserialize(::protoex::Order& value) const noexcept
252{
253 assert(((this->buffer().offset() + _model.fbe_offset()) <= this->buffer().size()) && "Model is broken!");
254 if ((this->buffer().offset() + _model.fbe_offset()) > this->buffer().size())
255 return 0;
256
257 size_t fbe_struct_size = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 8));
258 size_t fbe_struct_type = *((const uint32_t*)(this->buffer().data() + this->buffer().offset() + _model.fbe_offset() - 4));
259 assert(((fbe_struct_size > 0) && (fbe_struct_type == fbe_type())) && "Model is broken!");
260 if ((fbe_struct_size == 0) || (fbe_struct_type != fbe_type()))
261 return 8;
262
263 return 8 + _model.get(value);
264}
265
266} // namespace protoex
267

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