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