|
| 1 | +// automatically generated by the FlatBuffers compiler, do not modify |
| 2 | + |
| 3 | +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ |
| 4 | + |
| 5 | +import * as flatbuffers from 'flatbuffers'; |
| 6 | + |
| 7 | +import { DucBlockDuplicationArray } from '../duc/duc-block-duplication-array'; |
| 8 | +import { StringValueEntry } from '../duc/string-value-entry'; |
| 9 | + |
| 10 | + |
| 11 | +export class DucBlockInstance { |
| 12 | + bb: flatbuffers.ByteBuffer|null = null; |
| 13 | + bb_pos = 0; |
| 14 | + __init(i:number, bb:flatbuffers.ByteBuffer):DucBlockInstance { |
| 15 | + this.bb_pos = i; |
| 16 | + this.bb = bb; |
| 17 | + return this; |
| 18 | +} |
| 19 | + |
| 20 | +static getRootAsDucBlockInstance(bb:flatbuffers.ByteBuffer, obj?:DucBlockInstance):DucBlockInstance { |
| 21 | + return (obj || new DucBlockInstance()).__init(bb.readInt32(bb.position()) + bb.position(), bb); |
| 22 | +} |
| 23 | + |
| 24 | +static getSizePrefixedRootAsDucBlockInstance(bb:flatbuffers.ByteBuffer, obj?:DucBlockInstance):DucBlockInstance { |
| 25 | + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); |
| 26 | + return (obj || new DucBlockInstance()).__init(bb.readInt32(bb.position()) + bb.position(), bb); |
| 27 | +} |
| 28 | + |
| 29 | +id():string|null |
| 30 | +id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null |
| 31 | +id(optionalEncoding?:any):string|Uint8Array|null { |
| 32 | + const offset = this.bb!.__offset(this.bb_pos, 4); |
| 33 | + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; |
| 34 | +} |
| 35 | + |
| 36 | +blockId():string|null |
| 37 | +blockId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null |
| 38 | +blockId(optionalEncoding?:any):string|Uint8Array|null { |
| 39 | + const offset = this.bb!.__offset(this.bb_pos, 6); |
| 40 | + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; |
| 41 | +} |
| 42 | + |
| 43 | +elementOverrides(index: number, obj?:StringValueEntry):StringValueEntry|null { |
| 44 | + const offset = this.bb!.__offset(this.bb_pos, 8); |
| 45 | + return offset ? (obj || new StringValueEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; |
| 46 | +} |
| 47 | + |
| 48 | +elementOverridesLength():number { |
| 49 | + const offset = this.bb!.__offset(this.bb_pos, 8); |
| 50 | + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; |
| 51 | +} |
| 52 | + |
| 53 | +attributeValues(index: number, obj?:StringValueEntry):StringValueEntry|null { |
| 54 | + const offset = this.bb!.__offset(this.bb_pos, 10); |
| 55 | + return offset ? (obj || new StringValueEntry()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; |
| 56 | +} |
| 57 | + |
| 58 | +attributeValuesLength():number { |
| 59 | + const offset = this.bb!.__offset(this.bb_pos, 10); |
| 60 | + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; |
| 61 | +} |
| 62 | + |
| 63 | +duplicationArray(obj?:DucBlockDuplicationArray):DucBlockDuplicationArray|null { |
| 64 | + const offset = this.bb!.__offset(this.bb_pos, 12); |
| 65 | + return offset ? (obj || new DucBlockDuplicationArray()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; |
| 66 | +} |
| 67 | + |
| 68 | +version():number { |
| 69 | + const offset = this.bb!.__offset(this.bb_pos, 14); |
| 70 | + return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0; |
| 71 | +} |
| 72 | + |
| 73 | +static startDucBlockInstance(builder:flatbuffers.Builder) { |
| 74 | + builder.startObject(6); |
| 75 | +} |
| 76 | + |
| 77 | +static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { |
| 78 | + builder.addFieldOffset(0, idOffset, 0); |
| 79 | +} |
| 80 | + |
| 81 | +static addBlockId(builder:flatbuffers.Builder, blockIdOffset:flatbuffers.Offset) { |
| 82 | + builder.addFieldOffset(1, blockIdOffset, 0); |
| 83 | +} |
| 84 | + |
| 85 | +static addElementOverrides(builder:flatbuffers.Builder, elementOverridesOffset:flatbuffers.Offset) { |
| 86 | + builder.addFieldOffset(2, elementOverridesOffset, 0); |
| 87 | +} |
| 88 | + |
| 89 | +static createElementOverridesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { |
| 90 | + builder.startVector(4, data.length, 4); |
| 91 | + for (let i = data.length - 1; i >= 0; i--) { |
| 92 | + builder.addOffset(data[i]!); |
| 93 | + } |
| 94 | + return builder.endVector(); |
| 95 | +} |
| 96 | + |
| 97 | +static startElementOverridesVector(builder:flatbuffers.Builder, numElems:number) { |
| 98 | + builder.startVector(4, numElems, 4); |
| 99 | +} |
| 100 | + |
| 101 | +static addAttributeValues(builder:flatbuffers.Builder, attributeValuesOffset:flatbuffers.Offset) { |
| 102 | + builder.addFieldOffset(3, attributeValuesOffset, 0); |
| 103 | +} |
| 104 | + |
| 105 | +static createAttributeValuesVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { |
| 106 | + builder.startVector(4, data.length, 4); |
| 107 | + for (let i = data.length - 1; i >= 0; i--) { |
| 108 | + builder.addOffset(data[i]!); |
| 109 | + } |
| 110 | + return builder.endVector(); |
| 111 | +} |
| 112 | + |
| 113 | +static startAttributeValuesVector(builder:flatbuffers.Builder, numElems:number) { |
| 114 | + builder.startVector(4, numElems, 4); |
| 115 | +} |
| 116 | + |
| 117 | +static addDuplicationArray(builder:flatbuffers.Builder, duplicationArrayOffset:flatbuffers.Offset) { |
| 118 | + builder.addFieldOffset(4, duplicationArrayOffset, 0); |
| 119 | +} |
| 120 | + |
| 121 | +static addVersion(builder:flatbuffers.Builder, version:number) { |
| 122 | + builder.addFieldInt32(5, version, 0); |
| 123 | +} |
| 124 | + |
| 125 | +static endDucBlockInstance(builder:flatbuffers.Builder):flatbuffers.Offset { |
| 126 | + const offset = builder.endObject(); |
| 127 | + return offset; |
| 128 | +} |
| 129 | + |
| 130 | +} |
0 commit comments