* Deserialize the struct value * @this {!StructMapModel} * @param {!StructMap} value StructMap value, defaults is new StructMap() * @return {!object} Deserialized StructMap value and its size
(value = new StructMap())
| 20680 | * @return {!object} Deserialized StructMap value and its size |
| 20681 | */ |
| 20682 | deserialize (value = new StructMap()) { |
| 20683 | if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) { |
| 20684 | return { value: new StructMap(), size: 0 } |
| 20685 | } |
| 20686 | |
| 20687 | let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4) |
| 20688 | console.assert((fbeFullSize >= this.model.fbeSize), 'Model is broken!') |
| 20689 | if (fbeFullSize < this.model.fbeSize) { |
| 20690 | return { value: new StructMap(), size: 0 } |
| 20691 | } |
| 20692 | |
| 20693 | this.model.get(value) |
| 20694 | return { value: value, size: fbeFullSize } |
| 20695 | } |
| 20696 | |
| 20697 | /** |
| 20698 | * Move to the next struct value |
no test coverage detected