* Check if the struct value is valid * @this {!FieldModelEnums} * @param {!boolean} fbeVerifyType Verify model type flag, defaults is true * @returns {!boolean} Field model valid state
(fbeVerifyType = true)
| 3973 | * @returns {!boolean} Field model valid state |
| 3974 | */ |
| 3975 | verify (fbeVerifyType = true) { |
| 3976 | if ((this._buffer.offset + this.fbeOffset + this.fbeSize) > this._buffer.size) { |
| 3977 | return true |
| 3978 | } |
| 3979 | |
| 3980 | let fbeStructOffset = this.readUInt32(this.fbeOffset) |
| 3981 | if ((fbeStructOffset === 0) || ((this._buffer.offset + fbeStructOffset + 4 + 4) > this._buffer.size)) { |
| 3982 | return false |
| 3983 | } |
| 3984 | |
| 3985 | let fbeStructSize = this.readUInt32(fbeStructOffset) |
| 3986 | if (fbeStructSize < (4 + 4)) { |
| 3987 | return false |
| 3988 | } |
| 3989 | |
| 3990 | let fbeStructType = this.readUInt32(fbeStructOffset + 4) |
| 3991 | if (fbeVerifyType && (fbeStructType !== this.fbeType)) { |
| 3992 | return false |
| 3993 | } |
| 3994 | |
| 3995 | this._buffer.shift(fbeStructOffset) |
| 3996 | let fbeResult = this.verifyFields(fbeStructSize) |
| 3997 | this._buffer.unshift(fbeStructOffset) |
| 3998 | return fbeResult |
| 3999 | } |
| 4000 | |
| 4001 | /** |
| 4002 | * Check if the struct fields are valid |
nothing calls this directly
no test coverage detected