1// automatically generated by the FlatBuffers compiler, do not modify 2 3/** 4 * @const 5 * @namespace 6 */ 7var NamespaceA = NamespaceA || {}; 8 9/** 10 * @const 11 * @namespace 12 */ 13NamespaceA.NamespaceB = NamespaceA.NamespaceB || {}; 14 15/** 16 * @const 17 * @namespace 18 */ 19var NamespaceC = NamespaceC || {}; 20 21/** 22 * @constructor 23 */ 24NamespaceA.TableInFirstNS = function() { 25 /** 26 * @type {flatbuffers.ByteBuffer} 27 */ 28 this.bb = null; 29 30 /** 31 * @type {number} 32 */ 33 this.bb_pos = 0; 34}; 35 36/** 37 * @param {number} i 38 * @param {flatbuffers.ByteBuffer} bb 39 * @returns {NamespaceA.TableInFirstNS} 40 */ 41NamespaceA.TableInFirstNS.prototype.__init = function(i, bb) { 42 this.bb_pos = i; 43 this.bb = bb; 44 return this; 45}; 46 47/** 48 * @param {flatbuffers.ByteBuffer} bb 49 * @param {NamespaceA.TableInFirstNS=} obj 50 * @returns {NamespaceA.TableInFirstNS} 51 */ 52NamespaceA.TableInFirstNS.getRootAsTableInFirstNS = function(bb, obj) { 53 return (obj || new NamespaceA.TableInFirstNS).__init(bb.readInt32(bb.position()) + bb.position(), bb); 54}; 55 56/** 57 * @param {NamespaceA.NamespaceB.TableInNestedNS=} obj 58 * @returns {NamespaceA.NamespaceB.TableInNestedNS} 59 */ 60NamespaceA.TableInFirstNS.prototype.fooTable = function(obj) { 61 var offset = this.bb.__offset(this.bb_pos, 4); 62 return offset ? (obj || new NamespaceA.NamespaceB.TableInNestedNS).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; 63}; 64 65/** 66 * @returns {NamespaceA.NamespaceB.EnumInNestedNS} 67 */ 68NamespaceA.TableInFirstNS.prototype.fooEnum = function() { 69 var offset = this.bb.__offset(this.bb_pos, 6); 70 return offset ? /** @type {NamespaceA.NamespaceB.EnumInNestedNS} */ (this.bb.readInt8(this.bb_pos + offset)) : NamespaceA.NamespaceB.EnumInNestedNS.A; 71}; 72 73/** 74 * @param {NamespaceA.NamespaceB.EnumInNestedNS} value 75 * @returns {boolean} 76 */ 77NamespaceA.TableInFirstNS.prototype.mutate_foo_enum = function(value) { 78 var offset = this.bb.__offset(this.bb_pos, 6); 79 80 if (offset === 0) { 81 return false; 82 } 83 84 this.bb.writeInt8(this.bb_pos + offset, value); 85 return true; 86}; 87 88/** 89 * @param {NamespaceA.NamespaceB.StructInNestedNS=} obj 90 * @returns {NamespaceA.NamespaceB.StructInNestedNS} 91 */ 92NamespaceA.TableInFirstNS.prototype.fooStruct = function(obj) { 93 var offset = this.bb.__offset(this.bb_pos, 8); 94 return offset ? (obj || new NamespaceA.NamespaceB.StructInNestedNS).__init(this.bb_pos + offset, this.bb) : null; 95}; 96 97/** 98 * @param {flatbuffers.Builder} builder 99 */ 100NamespaceA.TableInFirstNS.startTableInFirstNS = function(builder) { 101 builder.startObject(3); 102}; 103 104/** 105 * @param {flatbuffers.Builder} builder 106 * @param {flatbuffers.Offset} fooTableOffset 107 */ 108NamespaceA.TableInFirstNS.addFooTable = function(builder, fooTableOffset) { 109 builder.addFieldOffset(0, fooTableOffset, 0); 110}; 111 112/** 113 * @param {flatbuffers.Builder} builder 114 * @param {NamespaceA.NamespaceB.EnumInNestedNS} fooEnum 115 */ 116NamespaceA.TableInFirstNS.addFooEnum = function(builder, fooEnum) { 117 builder.addFieldInt8(1, fooEnum, NamespaceA.NamespaceB.EnumInNestedNS.A); 118}; 119 120/** 121 * @param {flatbuffers.Builder} builder 122 * @param {flatbuffers.Offset} fooStructOffset 123 */ 124NamespaceA.TableInFirstNS.addFooStruct = function(builder, fooStructOffset) { 125 builder.addFieldStruct(2, fooStructOffset, 0); 126}; 127 128/** 129 * @param {flatbuffers.Builder} builder 130 * @returns {flatbuffers.Offset} 131 */ 132NamespaceA.TableInFirstNS.endTableInFirstNS = function(builder) { 133 var offset = builder.endObject(); 134 return offset; 135}; 136 137/** 138 * @constructor 139 */ 140NamespaceC.TableInC = function() { 141 /** 142 * @type {flatbuffers.ByteBuffer} 143 */ 144 this.bb = null; 145 146 /** 147 * @type {number} 148 */ 149 this.bb_pos = 0; 150}; 151 152/** 153 * @param {number} i 154 * @param {flatbuffers.ByteBuffer} bb 155 * @returns {NamespaceC.TableInC} 156 */ 157NamespaceC.TableInC.prototype.__init = function(i, bb) { 158 this.bb_pos = i; 159 this.bb = bb; 160 return this; 161}; 162 163/** 164 * @param {flatbuffers.ByteBuffer} bb 165 * @param {NamespaceC.TableInC=} obj 166 * @returns {NamespaceC.TableInC} 167 */ 168NamespaceC.TableInC.getRootAsTableInC = function(bb, obj) { 169 return (obj || new NamespaceC.TableInC).__init(bb.readInt32(bb.position()) + bb.position(), bb); 170}; 171 172/** 173 * @param {NamespaceA.TableInFirstNS=} obj 174 * @returns {NamespaceA.TableInFirstNS} 175 */ 176NamespaceC.TableInC.prototype.referToA1 = function(obj) { 177 var offset = this.bb.__offset(this.bb_pos, 4); 178 return offset ? (obj || new NamespaceA.TableInFirstNS).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; 179}; 180 181/** 182 * @param {NamespaceA.SecondTableInA=} obj 183 * @returns {NamespaceA.SecondTableInA} 184 */ 185NamespaceC.TableInC.prototype.referToA2 = function(obj) { 186 var offset = this.bb.__offset(this.bb_pos, 6); 187 return offset ? (obj || new NamespaceA.SecondTableInA).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; 188}; 189 190/** 191 * @param {flatbuffers.Builder} builder 192 */ 193NamespaceC.TableInC.startTableInC = function(builder) { 194 builder.startObject(2); 195}; 196 197/** 198 * @param {flatbuffers.Builder} builder 199 * @param {flatbuffers.Offset} referToA1Offset 200 */ 201NamespaceC.TableInC.addReferToA1 = function(builder, referToA1Offset) { 202 builder.addFieldOffset(0, referToA1Offset, 0); 203}; 204 205/** 206 * @param {flatbuffers.Builder} builder 207 * @param {flatbuffers.Offset} referToA2Offset 208 */ 209NamespaceC.TableInC.addReferToA2 = function(builder, referToA2Offset) { 210 builder.addFieldOffset(1, referToA2Offset, 0); 211}; 212 213/** 214 * @param {flatbuffers.Builder} builder 215 * @returns {flatbuffers.Offset} 216 */ 217NamespaceC.TableInC.endTableInC = function(builder) { 218 var offset = builder.endObject(); 219 return offset; 220}; 221 222/** 223 * @constructor 224 */ 225NamespaceA.SecondTableInA = function() { 226 /** 227 * @type {flatbuffers.ByteBuffer} 228 */ 229 this.bb = null; 230 231 /** 232 * @type {number} 233 */ 234 this.bb_pos = 0; 235}; 236 237/** 238 * @param {number} i 239 * @param {flatbuffers.ByteBuffer} bb 240 * @returns {NamespaceA.SecondTableInA} 241 */ 242NamespaceA.SecondTableInA.prototype.__init = function(i, bb) { 243 this.bb_pos = i; 244 this.bb = bb; 245 return this; 246}; 247 248/** 249 * @param {flatbuffers.ByteBuffer} bb 250 * @param {NamespaceA.SecondTableInA=} obj 251 * @returns {NamespaceA.SecondTableInA} 252 */ 253NamespaceA.SecondTableInA.getRootAsSecondTableInA = function(bb, obj) { 254 return (obj || new NamespaceA.SecondTableInA).__init(bb.readInt32(bb.position()) + bb.position(), bb); 255}; 256 257/** 258 * @param {NamespaceC.TableInC=} obj 259 * @returns {NamespaceC.TableInC} 260 */ 261NamespaceA.SecondTableInA.prototype.referToC = function(obj) { 262 var offset = this.bb.__offset(this.bb_pos, 4); 263 return offset ? (obj || new NamespaceC.TableInC).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; 264}; 265 266/** 267 * @param {flatbuffers.Builder} builder 268 */ 269NamespaceA.SecondTableInA.startSecondTableInA = function(builder) { 270 builder.startObject(1); 271}; 272 273/** 274 * @param {flatbuffers.Builder} builder 275 * @param {flatbuffers.Offset} referToCOffset 276 */ 277NamespaceA.SecondTableInA.addReferToC = function(builder, referToCOffset) { 278 builder.addFieldOffset(0, referToCOffset, 0); 279}; 280 281/** 282 * @param {flatbuffers.Builder} builder 283 * @returns {flatbuffers.Offset} 284 */ 285NamespaceA.SecondTableInA.endSecondTableInA = function(builder) { 286 var offset = builder.endObject(); 287 return offset; 288}; 289 290// Exports for Node.js and RequireJS 291this.NamespaceA = NamespaceA; 292this.NamespaceC = NamespaceC; 293