James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | package MyGame.Example; |
| 4 | |
| 5 | import java.nio.*; |
| 6 | import java.lang.*; |
| 7 | import java.util.*; |
| 8 | import com.google.flatbuffers.*; |
| 9 | |
| 10 | public class MonsterT { |
| 11 | private MyGame.Example.Vec3T pos; |
| 12 | private short mana; |
| 13 | private short hp; |
| 14 | private String name; |
| 15 | private int[] inventory; |
| 16 | private int color; |
| 17 | private MyGame.Example.AnyUnion test; |
| 18 | private MyGame.Example.TestT[] test4; |
| 19 | private String[] testarrayofstring; |
| 20 | private MyGame.Example.MonsterT[] testarrayoftables; |
| 21 | private MyGame.Example.MonsterT enemy; |
| 22 | private int[] testnestedflatbuffer; |
| 23 | private MyGame.Example.StatT testempty; |
| 24 | private boolean testbool; |
| 25 | private int testhashs32Fnv1; |
| 26 | private long testhashu32Fnv1; |
| 27 | private long testhashs64Fnv1; |
| 28 | private long testhashu64Fnv1; |
| 29 | private int testhashs32Fnv1a; |
| 30 | private long testhashu32Fnv1a; |
| 31 | private long testhashs64Fnv1a; |
| 32 | private long testhashu64Fnv1a; |
| 33 | private boolean[] testarrayofbools; |
| 34 | private float testf; |
| 35 | private float testf2; |
| 36 | private float testf3; |
| 37 | private String[] testarrayofstring2; |
| 38 | private MyGame.Example.AbilityT[] testarrayofsortedstruct; |
| 39 | private int[] flex; |
| 40 | private MyGame.Example.TestT[] test5; |
| 41 | private long[] vectorOfLongs; |
| 42 | private double[] vectorOfDoubles; |
| 43 | private MyGame.InParentNamespaceT parentNamespaceTest; |
| 44 | private MyGame.Example.ReferrableT[] vectorOfReferrables; |
| 45 | private long singleWeakReference; |
| 46 | private long[] vectorOfWeakReferences; |
| 47 | private MyGame.Example.ReferrableT[] vectorOfStrongReferrables; |
| 48 | private long coOwningReference; |
| 49 | private long[] vectorOfCoOwningReferences; |
| 50 | private long nonOwningReference; |
| 51 | private long[] vectorOfNonOwningReferences; |
| 52 | private MyGame.Example.AnyUniqueAliasesUnion anyUnique; |
| 53 | private MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous; |
| 54 | private int[] vectorOfEnums; |
| 55 | private byte signedEnum; |
| 56 | private int[] testrequirednestedflatbuffer; |
| 57 | private MyGame.Example.StatT[] scalarKeySortedTables; |
| 58 | private MyGame.Example.TestT nativeInline; |
| 59 | private long longEnumNonEnumDefault; |
| 60 | private long longEnumNormalDefault; |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 61 | private float nanDefault; |
| 62 | private float infDefault; |
| 63 | private float positiveInfDefault; |
| 64 | private float infinityDefault; |
| 65 | private float positiveInfinityDefault; |
| 66 | private float negativeInfDefault; |
| 67 | private float negativeInfinityDefault; |
| 68 | private double doubleInfDefault; |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 69 | |
| 70 | public MyGame.Example.Vec3T getPos() { return pos; } |
| 71 | |
| 72 | public void setPos(MyGame.Example.Vec3T pos) { this.pos = pos; } |
| 73 | |
| 74 | public short getMana() { return mana; } |
| 75 | |
| 76 | public void setMana(short mana) { this.mana = mana; } |
| 77 | |
| 78 | public short getHp() { return hp; } |
| 79 | |
| 80 | public void setHp(short hp) { this.hp = hp; } |
| 81 | |
| 82 | public String getName() { return name; } |
| 83 | |
| 84 | public void setName(String name) { this.name = name; } |
| 85 | |
| 86 | public int[] getInventory() { return inventory; } |
| 87 | |
| 88 | public void setInventory(int[] inventory) { this.inventory = inventory; } |
| 89 | |
| 90 | public int getColor() { return color; } |
| 91 | |
| 92 | public void setColor(int color) { this.color = color; } |
| 93 | |
| 94 | public MyGame.Example.AnyUnion getTest() { return test; } |
| 95 | |
| 96 | public void setTest(MyGame.Example.AnyUnion test) { this.test = test; } |
| 97 | |
| 98 | public MyGame.Example.TestT[] getTest4() { return test4; } |
| 99 | |
| 100 | public void setTest4(MyGame.Example.TestT[] test4) { this.test4 = test4; } |
| 101 | |
| 102 | public String[] getTestarrayofstring() { return testarrayofstring; } |
| 103 | |
| 104 | public void setTestarrayofstring(String[] testarrayofstring) { this.testarrayofstring = testarrayofstring; } |
| 105 | |
| 106 | public MyGame.Example.MonsterT[] getTestarrayoftables() { return testarrayoftables; } |
| 107 | |
| 108 | public void setTestarrayoftables(MyGame.Example.MonsterT[] testarrayoftables) { this.testarrayoftables = testarrayoftables; } |
| 109 | |
| 110 | public MyGame.Example.MonsterT getEnemy() { return enemy; } |
| 111 | |
| 112 | public void setEnemy(MyGame.Example.MonsterT enemy) { this.enemy = enemy; } |
| 113 | |
| 114 | public int[] getTestnestedflatbuffer() { return testnestedflatbuffer; } |
| 115 | |
| 116 | public void setTestnestedflatbuffer(int[] testnestedflatbuffer) { this.testnestedflatbuffer = testnestedflatbuffer; } |
| 117 | |
| 118 | public MyGame.Example.StatT getTestempty() { return testempty; } |
| 119 | |
| 120 | public void setTestempty(MyGame.Example.StatT testempty) { this.testempty = testempty; } |
| 121 | |
| 122 | public boolean getTestbool() { return testbool; } |
| 123 | |
| 124 | public void setTestbool(boolean testbool) { this.testbool = testbool; } |
| 125 | |
| 126 | public int getTesthashs32Fnv1() { return testhashs32Fnv1; } |
| 127 | |
| 128 | public void setTesthashs32Fnv1(int testhashs32Fnv1) { this.testhashs32Fnv1 = testhashs32Fnv1; } |
| 129 | |
| 130 | public long getTesthashu32Fnv1() { return testhashu32Fnv1; } |
| 131 | |
| 132 | public void setTesthashu32Fnv1(long testhashu32Fnv1) { this.testhashu32Fnv1 = testhashu32Fnv1; } |
| 133 | |
| 134 | public long getTesthashs64Fnv1() { return testhashs64Fnv1; } |
| 135 | |
| 136 | public void setTesthashs64Fnv1(long testhashs64Fnv1) { this.testhashs64Fnv1 = testhashs64Fnv1; } |
| 137 | |
| 138 | public long getTesthashu64Fnv1() { return testhashu64Fnv1; } |
| 139 | |
| 140 | public void setTesthashu64Fnv1(long testhashu64Fnv1) { this.testhashu64Fnv1 = testhashu64Fnv1; } |
| 141 | |
| 142 | public int getTesthashs32Fnv1a() { return testhashs32Fnv1a; } |
| 143 | |
| 144 | public void setTesthashs32Fnv1a(int testhashs32Fnv1a) { this.testhashs32Fnv1a = testhashs32Fnv1a; } |
| 145 | |
| 146 | public long getTesthashu32Fnv1a() { return testhashu32Fnv1a; } |
| 147 | |
| 148 | public void setTesthashu32Fnv1a(long testhashu32Fnv1a) { this.testhashu32Fnv1a = testhashu32Fnv1a; } |
| 149 | |
| 150 | public long getTesthashs64Fnv1a() { return testhashs64Fnv1a; } |
| 151 | |
| 152 | public void setTesthashs64Fnv1a(long testhashs64Fnv1a) { this.testhashs64Fnv1a = testhashs64Fnv1a; } |
| 153 | |
| 154 | public long getTesthashu64Fnv1a() { return testhashu64Fnv1a; } |
| 155 | |
| 156 | public void setTesthashu64Fnv1a(long testhashu64Fnv1a) { this.testhashu64Fnv1a = testhashu64Fnv1a; } |
| 157 | |
| 158 | public boolean[] getTestarrayofbools() { return testarrayofbools; } |
| 159 | |
| 160 | public void setTestarrayofbools(boolean[] testarrayofbools) { this.testarrayofbools = testarrayofbools; } |
| 161 | |
| 162 | public float getTestf() { return testf; } |
| 163 | |
| 164 | public void setTestf(float testf) { this.testf = testf; } |
| 165 | |
| 166 | public float getTestf2() { return testf2; } |
| 167 | |
| 168 | public void setTestf2(float testf2) { this.testf2 = testf2; } |
| 169 | |
| 170 | public float getTestf3() { return testf3; } |
| 171 | |
| 172 | public void setTestf3(float testf3) { this.testf3 = testf3; } |
| 173 | |
| 174 | public String[] getTestarrayofstring2() { return testarrayofstring2; } |
| 175 | |
| 176 | public void setTestarrayofstring2(String[] testarrayofstring2) { this.testarrayofstring2 = testarrayofstring2; } |
| 177 | |
| 178 | public MyGame.Example.AbilityT[] getTestarrayofsortedstruct() { return testarrayofsortedstruct; } |
| 179 | |
| 180 | public void setTestarrayofsortedstruct(MyGame.Example.AbilityT[] testarrayofsortedstruct) { this.testarrayofsortedstruct = testarrayofsortedstruct; } |
| 181 | |
| 182 | public int[] getFlex() { return flex; } |
| 183 | |
| 184 | public void setFlex(int[] flex) { this.flex = flex; } |
| 185 | |
| 186 | public MyGame.Example.TestT[] getTest5() { return test5; } |
| 187 | |
| 188 | public void setTest5(MyGame.Example.TestT[] test5) { this.test5 = test5; } |
| 189 | |
| 190 | public long[] getVectorOfLongs() { return vectorOfLongs; } |
| 191 | |
| 192 | public void setVectorOfLongs(long[] vectorOfLongs) { this.vectorOfLongs = vectorOfLongs; } |
| 193 | |
| 194 | public double[] getVectorOfDoubles() { return vectorOfDoubles; } |
| 195 | |
| 196 | public void setVectorOfDoubles(double[] vectorOfDoubles) { this.vectorOfDoubles = vectorOfDoubles; } |
| 197 | |
| 198 | public MyGame.InParentNamespaceT getParentNamespaceTest() { return parentNamespaceTest; } |
| 199 | |
| 200 | public void setParentNamespaceTest(MyGame.InParentNamespaceT parentNamespaceTest) { this.parentNamespaceTest = parentNamespaceTest; } |
| 201 | |
| 202 | public MyGame.Example.ReferrableT[] getVectorOfReferrables() { return vectorOfReferrables; } |
| 203 | |
| 204 | public void setVectorOfReferrables(MyGame.Example.ReferrableT[] vectorOfReferrables) { this.vectorOfReferrables = vectorOfReferrables; } |
| 205 | |
| 206 | public long getSingleWeakReference() { return singleWeakReference; } |
| 207 | |
| 208 | public void setSingleWeakReference(long singleWeakReference) { this.singleWeakReference = singleWeakReference; } |
| 209 | |
| 210 | public long[] getVectorOfWeakReferences() { return vectorOfWeakReferences; } |
| 211 | |
| 212 | public void setVectorOfWeakReferences(long[] vectorOfWeakReferences) { this.vectorOfWeakReferences = vectorOfWeakReferences; } |
| 213 | |
| 214 | public MyGame.Example.ReferrableT[] getVectorOfStrongReferrables() { return vectorOfStrongReferrables; } |
| 215 | |
| 216 | public void setVectorOfStrongReferrables(MyGame.Example.ReferrableT[] vectorOfStrongReferrables) { this.vectorOfStrongReferrables = vectorOfStrongReferrables; } |
| 217 | |
| 218 | public long getCoOwningReference() { return coOwningReference; } |
| 219 | |
| 220 | public void setCoOwningReference(long coOwningReference) { this.coOwningReference = coOwningReference; } |
| 221 | |
| 222 | public long[] getVectorOfCoOwningReferences() { return vectorOfCoOwningReferences; } |
| 223 | |
| 224 | public void setVectorOfCoOwningReferences(long[] vectorOfCoOwningReferences) { this.vectorOfCoOwningReferences = vectorOfCoOwningReferences; } |
| 225 | |
| 226 | public long getNonOwningReference() { return nonOwningReference; } |
| 227 | |
| 228 | public void setNonOwningReference(long nonOwningReference) { this.nonOwningReference = nonOwningReference; } |
| 229 | |
| 230 | public long[] getVectorOfNonOwningReferences() { return vectorOfNonOwningReferences; } |
| 231 | |
| 232 | public void setVectorOfNonOwningReferences(long[] vectorOfNonOwningReferences) { this.vectorOfNonOwningReferences = vectorOfNonOwningReferences; } |
| 233 | |
| 234 | public MyGame.Example.AnyUniqueAliasesUnion getAnyUnique() { return anyUnique; } |
| 235 | |
| 236 | public void setAnyUnique(MyGame.Example.AnyUniqueAliasesUnion anyUnique) { this.anyUnique = anyUnique; } |
| 237 | |
| 238 | public MyGame.Example.AnyAmbiguousAliasesUnion getAnyAmbiguous() { return anyAmbiguous; } |
| 239 | |
| 240 | public void setAnyAmbiguous(MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous) { this.anyAmbiguous = anyAmbiguous; } |
| 241 | |
| 242 | public int[] getVectorOfEnums() { return vectorOfEnums; } |
| 243 | |
| 244 | public void setVectorOfEnums(int[] vectorOfEnums) { this.vectorOfEnums = vectorOfEnums; } |
| 245 | |
| 246 | public byte getSignedEnum() { return signedEnum; } |
| 247 | |
| 248 | public void setSignedEnum(byte signedEnum) { this.signedEnum = signedEnum; } |
| 249 | |
| 250 | public int[] getTestrequirednestedflatbuffer() { return testrequirednestedflatbuffer; } |
| 251 | |
| 252 | public void setTestrequirednestedflatbuffer(int[] testrequirednestedflatbuffer) { this.testrequirednestedflatbuffer = testrequirednestedflatbuffer; } |
| 253 | |
| 254 | public MyGame.Example.StatT[] getScalarKeySortedTables() { return scalarKeySortedTables; } |
| 255 | |
| 256 | public void setScalarKeySortedTables(MyGame.Example.StatT[] scalarKeySortedTables) { this.scalarKeySortedTables = scalarKeySortedTables; } |
| 257 | |
| 258 | public MyGame.Example.TestT getNativeInline() { return nativeInline; } |
| 259 | |
| 260 | public void setNativeInline(MyGame.Example.TestT nativeInline) { this.nativeInline = nativeInline; } |
| 261 | |
| 262 | public long getLongEnumNonEnumDefault() { return longEnumNonEnumDefault; } |
| 263 | |
| 264 | public void setLongEnumNonEnumDefault(long longEnumNonEnumDefault) { this.longEnumNonEnumDefault = longEnumNonEnumDefault; } |
| 265 | |
| 266 | public long getLongEnumNormalDefault() { return longEnumNormalDefault; } |
| 267 | |
| 268 | public void setLongEnumNormalDefault(long longEnumNormalDefault) { this.longEnumNormalDefault = longEnumNormalDefault; } |
| 269 | |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 270 | public float getNanDefault() { return nanDefault; } |
| 271 | |
| 272 | public void setNanDefault(float nanDefault) { this.nanDefault = nanDefault; } |
| 273 | |
| 274 | public float getInfDefault() { return infDefault; } |
| 275 | |
| 276 | public void setInfDefault(float infDefault) { this.infDefault = infDefault; } |
| 277 | |
| 278 | public float getPositiveInfDefault() { return positiveInfDefault; } |
| 279 | |
| 280 | public void setPositiveInfDefault(float positiveInfDefault) { this.positiveInfDefault = positiveInfDefault; } |
| 281 | |
| 282 | public float getInfinityDefault() { return infinityDefault; } |
| 283 | |
| 284 | public void setInfinityDefault(float infinityDefault) { this.infinityDefault = infinityDefault; } |
| 285 | |
| 286 | public float getPositiveInfinityDefault() { return positiveInfinityDefault; } |
| 287 | |
| 288 | public void setPositiveInfinityDefault(float positiveInfinityDefault) { this.positiveInfinityDefault = positiveInfinityDefault; } |
| 289 | |
| 290 | public float getNegativeInfDefault() { return negativeInfDefault; } |
| 291 | |
| 292 | public void setNegativeInfDefault(float negativeInfDefault) { this.negativeInfDefault = negativeInfDefault; } |
| 293 | |
| 294 | public float getNegativeInfinityDefault() { return negativeInfinityDefault; } |
| 295 | |
| 296 | public void setNegativeInfinityDefault(float negativeInfinityDefault) { this.negativeInfinityDefault = negativeInfinityDefault; } |
| 297 | |
| 298 | public double getDoubleInfDefault() { return doubleInfDefault; } |
| 299 | |
| 300 | public void setDoubleInfDefault(double doubleInfDefault) { this.doubleInfDefault = doubleInfDefault; } |
| 301 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 302 | |
| 303 | public MonsterT() { |
| 304 | this.pos = new MyGame.Example.Vec3T(); |
| 305 | this.mana = 150; |
| 306 | this.hp = 100; |
| 307 | this.name = null; |
| 308 | this.inventory = null; |
| 309 | this.color = 8; |
| 310 | this.test = null; |
| 311 | this.test4 = null; |
| 312 | this.testarrayofstring = null; |
| 313 | this.testarrayoftables = null; |
| 314 | this.enemy = null; |
| 315 | this.testnestedflatbuffer = null; |
| 316 | this.testempty = null; |
| 317 | this.testbool = false; |
| 318 | this.testhashs32Fnv1 = 0; |
| 319 | this.testhashu32Fnv1 = 0L; |
| 320 | this.testhashs64Fnv1 = 0L; |
| 321 | this.testhashu64Fnv1 = 0L; |
| 322 | this.testhashs32Fnv1a = 0; |
| 323 | this.testhashu32Fnv1a = 0L; |
| 324 | this.testhashs64Fnv1a = 0L; |
| 325 | this.testhashu64Fnv1a = 0L; |
| 326 | this.testarrayofbools = null; |
| 327 | this.testf = 3.14159f; |
| 328 | this.testf2 = 3.0f; |
| 329 | this.testf3 = 0.0f; |
| 330 | this.testarrayofstring2 = null; |
| 331 | this.testarrayofsortedstruct = null; |
| 332 | this.flex = null; |
| 333 | this.test5 = null; |
| 334 | this.vectorOfLongs = null; |
| 335 | this.vectorOfDoubles = null; |
| 336 | this.parentNamespaceTest = null; |
| 337 | this.vectorOfReferrables = null; |
| 338 | this.singleWeakReference = 0L; |
| 339 | this.vectorOfWeakReferences = null; |
| 340 | this.vectorOfStrongReferrables = null; |
| 341 | this.coOwningReference = 0L; |
| 342 | this.vectorOfCoOwningReferences = null; |
| 343 | this.nonOwningReference = 0L; |
| 344 | this.vectorOfNonOwningReferences = null; |
| 345 | this.anyUnique = null; |
| 346 | this.anyAmbiguous = null; |
| 347 | this.vectorOfEnums = null; |
| 348 | this.signedEnum = -1; |
| 349 | this.testrequirednestedflatbuffer = null; |
| 350 | this.scalarKeySortedTables = null; |
| 351 | this.nativeInline = new MyGame.Example.TestT(); |
| 352 | this.longEnumNonEnumDefault = 0L; |
| 353 | this.longEnumNormalDefault = 2L; |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 354 | this.nanDefault = Float.NaN; |
| 355 | this.infDefault = Float.POSITIVE_INFINITY; |
| 356 | this.positiveInfDefault = Float.POSITIVE_INFINITY; |
| 357 | this.infinityDefault = Float.POSITIVE_INFINITY; |
| 358 | this.positiveInfinityDefault = Float.POSITIVE_INFINITY; |
| 359 | this.negativeInfDefault = Float.NEGATIVE_INFINITY; |
| 360 | this.negativeInfinityDefault = Float.NEGATIVE_INFINITY; |
| 361 | this.doubleInfDefault = Double.POSITIVE_INFINITY; |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame] | 362 | } |
| 363 | public static MonsterT deserializeFromBinary(byte[] fbBuffer) { |
| 364 | return Monster.getRootAsMonster(ByteBuffer.wrap(fbBuffer)).unpack(); |
| 365 | } |
| 366 | public byte[] serializeToBinary() { |
| 367 | FlatBufferBuilder fbb = new FlatBufferBuilder(); |
| 368 | Monster.finishMonsterBuffer(fbb, Monster.pack(fbb, this)); |
| 369 | return fbb.sizedByteArray(); |
| 370 | } |
| 371 | } |
| 372 | |