* Deserialize the struct value * @this {!AccountModel} * @param {!Account} value Account value, defaults is new Account() * @return {!object} Deserialized Account value and its size
(value = new Account())
| 3470 | * @return {!object} Deserialized Account value and its size |
| 3471 | */ |
| 3472 | deserialize (value = new Account()) { |
| 3473 | if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) { |
| 3474 | return { value: new Account(), size: 0 } |
| 3475 | } |
| 3476 | |
| 3477 | let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4) |
| 3478 | console.assert((fbeFullSize >= this.model.fbeSize), 'Model is broken!') |
| 3479 | if (fbeFullSize < this.model.fbeSize) { |
| 3480 | return { value: new Account(), size: 0 } |
| 3481 | } |
| 3482 | |
| 3483 | this.model.get(value) |
| 3484 | return { value: value, size: fbeFullSize } |
| 3485 | } |
| 3486 | |
| 3487 | /** |
| 3488 | * Move to the next struct value |
no test coverage detected