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