* Deserialize the struct value * @this {!StructHashModel} * @param {!StructHash} value StructHash value, defaults is new StructHash() * @return {!object} Deserialized StructHash value and its size
(value = new StructHash())
| 22425 | * @return {!object} Deserialized StructHash value and its size |
| 22426 | */ |
| 22427 | deserialize (value = new StructHash()) { |
| 22428 | if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) { |
| 22429 | return { value: new StructHash(), size: 0 } |
| 22430 | } |
| 22431 | |
| 22432 | let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4) |
| 22433 | console.assert((fbeFullSize >= this.model.fbeSize), 'Model is broken!') |
| 22434 | if (fbeFullSize < this.model.fbeSize) { |
| 22435 | return { value: new StructHash(), size: 0 } |
| 22436 | } |
| 22437 | |
| 22438 | this.model.get(value) |
| 22439 | return { value: value, size: fbeFullSize } |
| 22440 | } |
| 22441 | |
| 22442 | /** |
| 22443 | * Move to the next struct value |
no test coverage detected