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 * @enum
17 */
18NamespaceA.NamespaceB.EnumInNestedNS = {
19  A: 0, 0: 'A',
20  B: 1, 1: 'B',
21  C: 2, 2: 'C'
22};
23
24/**
25 * @constructor
26 */
27NamespaceA.NamespaceB.TableInNestedNS = function() {
28  /**
29   * @type {flatbuffers.ByteBuffer}
30   */
31  this.bb = null;
32
33  /**
34   * @type {number}
35   */
36  this.bb_pos = 0;
37};
38
39/**
40 * @param {number} i
41 * @param {flatbuffers.ByteBuffer} bb
42 * @returns {NamespaceA.NamespaceB.TableInNestedNS}
43 */
44NamespaceA.NamespaceB.TableInNestedNS.prototype.__init = function(i, bb) {
45  this.bb_pos = i;
46  this.bb = bb;
47  return this;
48};
49
50/**
51 * @param {flatbuffers.ByteBuffer} bb
52 * @param {NamespaceA.NamespaceB.TableInNestedNS=} obj
53 * @returns {NamespaceA.NamespaceB.TableInNestedNS}
54 */
55NamespaceA.NamespaceB.TableInNestedNS.getRootAsTableInNestedNS = function(bb, obj) {
56  return (obj || new NamespaceA.NamespaceB.TableInNestedNS).__init(bb.readInt32(bb.position()) + bb.position(), bb);
57};
58
59/**
60 * @returns {number}
61 */
62NamespaceA.NamespaceB.TableInNestedNS.prototype.foo = function() {
63  var offset = this.bb.__offset(this.bb_pos, 4);
64  return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
65};
66
67/**
68 * @param {number} value
69 * @returns {boolean}
70 */
71NamespaceA.NamespaceB.TableInNestedNS.prototype.mutate_foo = function(value) {
72  var offset = this.bb.__offset(this.bb_pos, 4);
73
74  if (offset === 0) {
75    return false;
76  }
77
78  this.bb.writeInt32(this.bb_pos + offset, value);
79  return true;
80};
81
82/**
83 * @param {flatbuffers.Builder} builder
84 */
85NamespaceA.NamespaceB.TableInNestedNS.startTableInNestedNS = function(builder) {
86  builder.startObject(1);
87};
88
89/**
90 * @param {flatbuffers.Builder} builder
91 * @param {number} foo
92 */
93NamespaceA.NamespaceB.TableInNestedNS.addFoo = function(builder, foo) {
94  builder.addFieldInt32(0, foo, 0);
95};
96
97/**
98 * @param {flatbuffers.Builder} builder
99 * @returns {flatbuffers.Offset}
100 */
101NamespaceA.NamespaceB.TableInNestedNS.endTableInNestedNS = function(builder) {
102  var offset = builder.endObject();
103  return offset;
104};
105
106/**
107 * @param {flatbuffers.Builder} builder
108 * @param {number} foo
109 * @returns {flatbuffers.Offset}
110 */
111NamespaceA.NamespaceB.TableInNestedNS.createTableInNestedNS = function(builder, foo) {
112  NamespaceA.NamespaceB.TableInNestedNS.startTableInNestedNS(builder);
113  NamespaceA.NamespaceB.TableInNestedNS.addFoo(builder, foo);
114  return NamespaceA.NamespaceB.TableInNestedNS.endTableInNestedNS(builder);
115}
116
117/**
118 * @constructor
119 */
120NamespaceA.NamespaceB.StructInNestedNS = function() {
121  /**
122   * @type {flatbuffers.ByteBuffer}
123   */
124  this.bb = null;
125
126  /**
127   * @type {number}
128   */
129  this.bb_pos = 0;
130};
131
132/**
133 * @param {number} i
134 * @param {flatbuffers.ByteBuffer} bb
135 * @returns {NamespaceA.NamespaceB.StructInNestedNS}
136 */
137NamespaceA.NamespaceB.StructInNestedNS.prototype.__init = function(i, bb) {
138  this.bb_pos = i;
139  this.bb = bb;
140  return this;
141};
142
143/**
144 * @returns {number}
145 */
146NamespaceA.NamespaceB.StructInNestedNS.prototype.a = function() {
147  return this.bb.readInt32(this.bb_pos);
148};
149
150/**
151 * @param {number} value
152 * @returns {boolean}
153 */
154NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_a = function(value) {
155  var offset = this.bb.__offset(this.bb_pos, 0);
156
157  if (offset === 0) {
158    return false;
159  }
160
161  this.bb.writeInt32(this.bb_pos + offset, value);
162  return true;
163};
164
165/**
166 * @returns {number}
167 */
168NamespaceA.NamespaceB.StructInNestedNS.prototype.b = function() {
169  return this.bb.readInt32(this.bb_pos + 4);
170};
171
172/**
173 * @param {number} value
174 * @returns {boolean}
175 */
176NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_b = function(value) {
177  var offset = this.bb.__offset(this.bb_pos, 4);
178
179  if (offset === 0) {
180    return false;
181  }
182
183  this.bb.writeInt32(this.bb_pos + offset, value);
184  return true;
185};
186
187/**
188 * @param {flatbuffers.Builder} builder
189 * @param {number} a
190 * @param {number} b
191 * @returns {flatbuffers.Offset}
192 */
193NamespaceA.NamespaceB.StructInNestedNS.createStructInNestedNS = function(builder, a, b) {
194  builder.prep(4, 8);
195  builder.writeInt32(b);
196  builder.writeInt32(a);
197  return builder.offset();
198};
199
200// Exports for Node.js and RequireJS
201this.NamespaceA = NamespaceA;
202