* 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())
| 3621 | * @return {!object} Deserialized Account value and its size |
| 3622 | */ |
| 3623 | deserialize (value = new Account()) { |
| 3624 | if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) { |
| 3625 | return { value: new Account(), size: 0 } |
| 3626 | } |
| 3627 | |
| 3628 | let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4) |
| 3629 | console.assert((fbeFullSize >= this.model.fbeSize), 'Model is broken!') |
| 3630 | if (fbeFullSize < this.model.fbeSize) { |
| 3631 | return { value: new Account(), size: 0 } |
| 3632 | } |
| 3633 | |
| 3634 | this.model.get(value) |
| 3635 | return { value: value, size: fbeFullSize } |
| 3636 | } |
| 3637 | |
| 3638 | /** |
| 3639 | * Move to the next struct value |
no test coverage detected