2017-04-10 17:01:13 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
|
2017-08-07 21:55:05 +00:00
|
|
|
import * as NS9459827973991502386 from "./namespace_test1_generated";
|
2017-04-10 17:01:13 +00:00
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
export namespace NamespaceA{
|
|
|
|
export class TableInFirstNS {
|
|
|
|
/**
|
|
|
|
* @type {flatbuffers.ByteBuffer}
|
|
|
|
*/
|
2017-05-01 23:05:53 +00:00
|
|
|
bb: flatbuffers.ByteBuffer;
|
2017-04-10 17:01:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {number}
|
|
|
|
*/
|
|
|
|
bb_pos:number = 0;
|
|
|
|
/**
|
|
|
|
* @param {number} i
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @returns {TableInFirstNS}
|
|
|
|
*/
|
|
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):TableInFirstNS {
|
|
|
|
this.bb_pos = i;
|
|
|
|
this.bb = bb;
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @param {TableInFirstNS=} obj
|
|
|
|
* @returns {TableInFirstNS}
|
|
|
|
*/
|
|
|
|
static getRootAsTableInFirstNS(bb:flatbuffers.ByteBuffer, obj?:TableInFirstNS):TableInFirstNS {
|
|
|
|
return (obj || new TableInFirstNS).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceA.NamespaceB.TableInNestedNS=} obj
|
2017-05-10 20:25:51 +00:00
|
|
|
* @returns {NamespaceA.NamespaceB.TableInNestedNS|null}
|
2017-04-10 17:01:13 +00:00
|
|
|
*/
|
2017-08-07 21:55:05 +00:00
|
|
|
fooTable(obj?:NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS):NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS|null {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 4);
|
2017-08-07 21:55:05 +00:00
|
|
|
return offset ? (obj || new NS9459827973991502386.NamespaceA.NamespaceB.TableInNestedNS).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
2017-04-10 17:01:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @returns {NamespaceA.NamespaceB.EnumInNestedNS}
|
|
|
|
*/
|
2017-08-07 21:55:05 +00:00
|
|
|
fooEnum():NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 6);
|
2017-08-07 21:55:05 +00:00
|
|
|
return offset ? /** @type {NamespaceA.NamespaceB.EnumInNestedNS} */ (this.bb.readInt8(this.bb_pos + offset)) : NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS.A;
|
2017-04-10 17:01:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceA.NamespaceB.EnumInNestedNS} value
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
2017-08-07 21:55:05 +00:00
|
|
|
mutate_foo_enum(value:NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS):boolean {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
|
|
|
|
|
|
if (offset === 0) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.bb.writeInt8(this.bb_pos + offset, value);
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceA.NamespaceB.StructInNestedNS=} obj
|
2017-05-10 20:25:51 +00:00
|
|
|
* @returns {NamespaceA.NamespaceB.StructInNestedNS|null}
|
2017-04-10 17:01:13 +00:00
|
|
|
*/
|
2017-08-07 21:55:05 +00:00
|
|
|
fooStruct(obj?:NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS):NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS|null {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 8);
|
2017-08-07 21:55:05 +00:00
|
|
|
return offset ? (obj || new NS9459827973991502386.NamespaceA.NamespaceB.StructInNestedNS).__init(this.bb_pos + offset, this.bb) : null;
|
2017-04-10 17:01:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
*/
|
|
|
|
static startTableInFirstNS(builder:flatbuffers.Builder) {
|
|
|
|
builder.startObject(3);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {flatbuffers.Offset} fooTableOffset
|
|
|
|
*/
|
|
|
|
static addFooTable(builder:flatbuffers.Builder, fooTableOffset:flatbuffers.Offset) {
|
|
|
|
builder.addFieldOffset(0, fooTableOffset, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {NamespaceA.NamespaceB.EnumInNestedNS} fooEnum
|
|
|
|
*/
|
2017-08-07 21:55:05 +00:00
|
|
|
static addFooEnum(builder:flatbuffers.Builder, fooEnum:NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS) {
|
|
|
|
builder.addFieldInt8(1, fooEnum, NS9459827973991502386.NamespaceA.NamespaceB.EnumInNestedNS.A);
|
2017-04-10 17:01:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {flatbuffers.Offset} fooStructOffset
|
|
|
|
*/
|
|
|
|
static addFooStruct(builder:flatbuffers.Builder, fooStructOffset:flatbuffers.Offset) {
|
|
|
|
builder.addFieldStruct(2, fooStructOffset, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @returns {flatbuffers.Offset}
|
|
|
|
*/
|
|
|
|
static endTableInFirstNS(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
|
|
var offset = builder.endObject();
|
|
|
|
return offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
export namespace NamespaceC{
|
|
|
|
export class TableInC {
|
|
|
|
/**
|
|
|
|
* @type {flatbuffers.ByteBuffer}
|
|
|
|
*/
|
2017-05-01 23:05:53 +00:00
|
|
|
bb: flatbuffers.ByteBuffer;
|
2017-04-10 17:01:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {number}
|
|
|
|
*/
|
|
|
|
bb_pos:number = 0;
|
|
|
|
/**
|
|
|
|
* @param {number} i
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @returns {TableInC}
|
|
|
|
*/
|
|
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):TableInC {
|
|
|
|
this.bb_pos = i;
|
|
|
|
this.bb = bb;
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @param {TableInC=} obj
|
|
|
|
* @returns {TableInC}
|
|
|
|
*/
|
|
|
|
static getRootAsTableInC(bb:flatbuffers.ByteBuffer, obj?:TableInC):TableInC {
|
|
|
|
return (obj || new TableInC).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceA.TableInFirstNS=} obj
|
2017-05-10 20:25:51 +00:00
|
|
|
* @returns {NamespaceA.TableInFirstNS|null}
|
2017-04-10 17:01:13 +00:00
|
|
|
*/
|
2017-05-10 20:25:51 +00:00
|
|
|
referToA1(obj?:NamespaceA.TableInFirstNS):NamespaceA.TableInFirstNS|null {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
|
|
return offset ? (obj || new NamespaceA.TableInFirstNS).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceA.SecondTableInA=} obj
|
2017-05-10 20:25:51 +00:00
|
|
|
* @returns {NamespaceA.SecondTableInA|null}
|
2017-04-10 17:01:13 +00:00
|
|
|
*/
|
2017-05-10 20:25:51 +00:00
|
|
|
referToA2(obj?:NamespaceA.SecondTableInA):NamespaceA.SecondTableInA|null {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 6);
|
|
|
|
return offset ? (obj || new NamespaceA.SecondTableInA).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
*/
|
|
|
|
static startTableInC(builder:flatbuffers.Builder) {
|
|
|
|
builder.startObject(2);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {flatbuffers.Offset} referToA1Offset
|
|
|
|
*/
|
|
|
|
static addReferToA1(builder:flatbuffers.Builder, referToA1Offset:flatbuffers.Offset) {
|
|
|
|
builder.addFieldOffset(0, referToA1Offset, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {flatbuffers.Offset} referToA2Offset
|
|
|
|
*/
|
|
|
|
static addReferToA2(builder:flatbuffers.Builder, referToA2Offset:flatbuffers.Offset) {
|
|
|
|
builder.addFieldOffset(1, referToA2Offset, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @returns {flatbuffers.Offset}
|
|
|
|
*/
|
|
|
|
static endTableInC(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
|
|
var offset = builder.endObject();
|
|
|
|
return offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
export namespace NamespaceA{
|
|
|
|
export class SecondTableInA {
|
|
|
|
/**
|
|
|
|
* @type {flatbuffers.ByteBuffer}
|
|
|
|
*/
|
2017-05-01 23:05:53 +00:00
|
|
|
bb: flatbuffers.ByteBuffer;
|
2017-04-10 17:01:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {number}
|
|
|
|
*/
|
|
|
|
bb_pos:number = 0;
|
|
|
|
/**
|
|
|
|
* @param {number} i
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @returns {SecondTableInA}
|
|
|
|
*/
|
|
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):SecondTableInA {
|
|
|
|
this.bb_pos = i;
|
|
|
|
this.bb = bb;
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.ByteBuffer} bb
|
|
|
|
* @param {SecondTableInA=} obj
|
|
|
|
* @returns {SecondTableInA}
|
|
|
|
*/
|
|
|
|
static getRootAsSecondTableInA(bb:flatbuffers.ByteBuffer, obj?:SecondTableInA):SecondTableInA {
|
|
|
|
return (obj || new SecondTableInA).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {NamespaceC.TableInC=} obj
|
2017-05-10 20:25:51 +00:00
|
|
|
* @returns {NamespaceC.TableInC|null}
|
2017-04-10 17:01:13 +00:00
|
|
|
*/
|
2017-05-10 20:25:51 +00:00
|
|
|
referToC(obj?:NamespaceC.TableInC):NamespaceC.TableInC|null {
|
2017-04-10 17:01:13 +00:00
|
|
|
var offset = this.bb.__offset(this.bb_pos, 4);
|
|
|
|
return offset ? (obj || new NamespaceC.TableInC).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
*/
|
|
|
|
static startSecondTableInA(builder:flatbuffers.Builder) {
|
|
|
|
builder.startObject(1);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @param {flatbuffers.Offset} referToCOffset
|
|
|
|
*/
|
|
|
|
static addReferToC(builder:flatbuffers.Builder, referToCOffset:flatbuffers.Offset) {
|
|
|
|
builder.addFieldOffset(0, referToCOffset, 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {flatbuffers.Builder} builder
|
|
|
|
* @returns {flatbuffers.Offset}
|
|
|
|
*/
|
|
|
|
static endSecondTableInA(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
|
|
var offset = builder.endObject();
|
|
|
|
return offset;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|