1// automatically generated by the FlatBuffers compiler, do not modify 2 3/** 4 * @enum 5 */ 6export namespace NamespaceA.NamespaceB{ 7export enum EnumInNestedNS{ 8 A= 0, 9 B= 1, 10 C= 2 11}}; 12 13/** 14 * @constructor 15 */ 16export namespace NamespaceA.NamespaceB{ 17export class TableInNestedNS { 18 bb: flatbuffers.ByteBuffer|null = null; 19 20 bb_pos:number = 0; 21/** 22 * @param number i 23 * @param flatbuffers.ByteBuffer bb 24 * @returns TableInNestedNS 25 */ 26__init(i:number, bb:flatbuffers.ByteBuffer):TableInNestedNS { 27 this.bb_pos = i; 28 this.bb = bb; 29 return this; 30}; 31 32/** 33 * @param flatbuffers.ByteBuffer bb 34 * @param TableInNestedNS= obj 35 * @returns TableInNestedNS 36 */ 37static getRootAsTableInNestedNS(bb:flatbuffers.ByteBuffer, obj?:TableInNestedNS):TableInNestedNS { 38 return (obj || new TableInNestedNS).__init(bb.readInt32(bb.position()) + bb.position(), bb); 39}; 40 41/** 42 * @returns number 43 */ 44foo():number { 45 var offset = this.bb!.__offset(this.bb_pos, 4); 46 return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0; 47}; 48 49/** 50 * @param number value 51 * @returns boolean 52 */ 53mutate_foo(value:number):boolean { 54 var offset = this.bb!.__offset(this.bb_pos, 4); 55 56 if (offset === 0) { 57 return false; 58 } 59 60 this.bb!.writeInt32(this.bb_pos + offset, value); 61 return true; 62}; 63 64/** 65 * @param flatbuffers.Builder builder 66 */ 67static startTableInNestedNS(builder:flatbuffers.Builder) { 68 builder.startObject(1); 69}; 70 71/** 72 * @param flatbuffers.Builder builder 73 * @param number foo 74 */ 75static addFoo(builder:flatbuffers.Builder, foo:number) { 76 builder.addFieldInt32(0, foo, 0); 77}; 78 79/** 80 * @param flatbuffers.Builder builder 81 * @returns flatbuffers.Offset 82 */ 83static endTableInNestedNS(builder:flatbuffers.Builder):flatbuffers.Offset { 84 var offset = builder.endObject(); 85 return offset; 86}; 87 88static createTableInNestedNS(builder:flatbuffers.Builder, foo:number):flatbuffers.Offset { 89 TableInNestedNS.startTableInNestedNS(builder); 90 TableInNestedNS.addFoo(builder, foo); 91 return TableInNestedNS.endTableInNestedNS(builder); 92} 93} 94} 95/** 96 * @constructor 97 */ 98export namespace NamespaceA.NamespaceB{ 99export class StructInNestedNS { 100 bb: flatbuffers.ByteBuffer|null = null; 101 102 bb_pos:number = 0; 103/** 104 * @param number i 105 * @param flatbuffers.ByteBuffer bb 106 * @returns StructInNestedNS 107 */ 108__init(i:number, bb:flatbuffers.ByteBuffer):StructInNestedNS { 109 this.bb_pos = i; 110 this.bb = bb; 111 return this; 112}; 113 114/** 115 * @returns number 116 */ 117a():number { 118 return this.bb!.readInt32(this.bb_pos); 119}; 120 121/** 122 * @param number value 123 * @returns boolean 124 */ 125mutate_a(value:number):boolean { 126 var offset = this.bb!.__offset(this.bb_pos, 0); 127 128 if (offset === 0) { 129 return false; 130 } 131 132 this.bb!.writeInt32(this.bb_pos + offset, value); 133 return true; 134}; 135 136/** 137 * @returns number 138 */ 139b():number { 140 return this.bb!.readInt32(this.bb_pos + 4); 141}; 142 143/** 144 * @param number value 145 * @returns boolean 146 */ 147mutate_b(value:number):boolean { 148 var offset = this.bb!.__offset(this.bb_pos, 4); 149 150 if (offset === 0) { 151 return false; 152 } 153 154 this.bb!.writeInt32(this.bb_pos + offset, value); 155 return true; 156}; 157 158/** 159 * @param flatbuffers.Builder builder 160 * @param number a 161 * @param number b 162 * @returns flatbuffers.Offset 163 */ 164static createStructInNestedNS(builder:flatbuffers.Builder, a: number, b: number):flatbuffers.Offset { 165 builder.prep(4, 8); 166 builder.writeInt32(b); 167 builder.writeInt32(a); 168 return builder.offset(); 169}; 170 171} 172} 173