• Home
  • Raw
  • Download

Lines Matching refs:fbb

57         FlatBufferBuilder fbb = new FlatBufferBuilder(1);  in main()  local
59 TestBuilderBasics(fbb, true); in main()
60 TestBuilderBasics(fbb, false); in main()
62 TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer()); in main()
151 FlatBufferBuilder fbb = new FlatBufferBuilder(1); in TestNamespaceNesting() local
153 TableInNestedNS.startTableInNestedNS(fbb); in TestNamespaceNesting()
154 TableInNestedNS.addFoo(fbb, 1234); in TestNamespaceNesting()
155 int nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb); in TestNamespaceNesting()
157 TableInFirstNS.startTableInFirstNS(fbb); in TestNamespaceNesting()
158 TableInFirstNS.addFooTable(fbb, nestedTableOff); in TestNamespaceNesting()
159 int off = TableInFirstNS.endTableInFirstNS(fbb); in TestNamespaceNesting()
199 FlatBufferBuilder fbb = new FlatBufferBuilder(16); in TestCreateByteVector() local
200 int str = fbb.createString("MyMonster"); in TestCreateByteVector()
202 int vec = fbb.createByteVector(inventory); in TestCreateByteVector()
203 Monster.startMonster(fbb); in TestCreateByteVector()
204 Monster.addInventory(fbb, vec); in TestCreateByteVector()
205 Monster.addName(fbb, str); in TestCreateByteVector()
206 int monster1 = Monster.endMonster(fbb); in TestCreateByteVector()
207 Monster.finishMonsterBuffer(fbb, monster1); in TestCreateByteVector()
208 Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer()); in TestCreateByteVector()
216 FlatBufferBuilder fbb = new FlatBufferBuilder(16); in TestCreateUninitializedVector() local
217 int str = fbb.createString("MyMonster"); in TestCreateUninitializedVector()
219 ByteBuffer bb = fbb.createUnintializedVector(1, inventory.length, 1); in TestCreateUninitializedVector()
223 int vec = fbb.endVector(); in TestCreateUninitializedVector()
224 Monster.startMonster(fbb); in TestCreateUninitializedVector()
225 Monster.addInventory(fbb, vec); in TestCreateUninitializedVector()
226 Monster.addName(fbb, str); in TestCreateUninitializedVector()
227 int monster1 = Monster.endMonster(fbb); in TestCreateUninitializedVector()
228 Monster.finishMonsterBuffer(fbb, monster1); in TestCreateUninitializedVector()
229 Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer()); in TestCreateUninitializedVector()
251 FlatBufferBuilder fbb = new FlatBufferBuilder(1, new MappedByteBufferFactory()); in TestByteBufferFactory() local
253 TestBuilderBasics(fbb, false); in TestByteBufferFactory()
258 FlatBufferBuilder fbb = new FlatBufferBuilder(1); in TestSizedInputStream() local
260 TestBuilderBasics(fbb, false); in TestSizedInputStream()
262 InputStream in = fbb.sizedInputStream(); in TestSizedInputStream()
263 byte[] array = fbb.sizedByteArray(); in TestSizedInputStream()
280 static void TestBuilderBasics(FlatBufferBuilder fbb, boolean sizePrefix) { in TestBuilderBasics() argument
281 … int[] names = {fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma")}; in TestBuilderBasics()
283 Monster.startMonster(fbb); in TestBuilderBasics()
284 Monster.addName(fbb, names[0]); in TestBuilderBasics()
285 off[0] = Monster.endMonster(fbb); in TestBuilderBasics()
286 Monster.startMonster(fbb); in TestBuilderBasics()
287 Monster.addName(fbb, names[1]); in TestBuilderBasics()
288 off[1] = Monster.endMonster(fbb); in TestBuilderBasics()
289 Monster.startMonster(fbb); in TestBuilderBasics()
290 Monster.addName(fbb, names[2]); in TestBuilderBasics()
291 off[2] = Monster.endMonster(fbb); in TestBuilderBasics()
292 int sortMons = fbb.createSortedVectorOfTables(new Monster(), off); in TestBuilderBasics()
296 int str = fbb.createString("MyMonster"); in TestBuilderBasics()
298 int inv = Monster.createInventoryVector(fbb, new byte[] { 0, 1, 2, 3, 4 }); in TestBuilderBasics()
300 int fred = fbb.createString("Fred"); in TestBuilderBasics()
301 Monster.startMonster(fbb); in TestBuilderBasics()
302 Monster.addName(fbb, fred); in TestBuilderBasics()
303 int mon2 = Monster.endMonster(fbb); in TestBuilderBasics()
305 Monster.startTest4Vector(fbb, 2); in TestBuilderBasics()
306 Test.createTest(fbb, (short)10, (byte)20); in TestBuilderBasics()
307 Test.createTest(fbb, (short)30, (byte)40); in TestBuilderBasics()
308 int test4 = fbb.endVector(); in TestBuilderBasics()
310 int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] { in TestBuilderBasics()
311 fbb.createString("test1"), in TestBuilderBasics()
312 fbb.createString("test2") in TestBuilderBasics()
315 Monster.startMonster(fbb); in TestBuilderBasics()
316 Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, in TestBuilderBasics()
318 Monster.addHp(fbb, (short)80); in TestBuilderBasics()
319 Monster.addName(fbb, str); in TestBuilderBasics()
320 Monster.addInventory(fbb, inv); in TestBuilderBasics()
321 Monster.addTestType(fbb, (byte)Any.Monster); in TestBuilderBasics()
322 Monster.addTest(fbb, mon2); in TestBuilderBasics()
323 Monster.addTest4(fbb, test4); in TestBuilderBasics()
324 Monster.addTestarrayofstring(fbb, testArrayOfString); in TestBuilderBasics()
325 Monster.addTestbool(fbb, true); in TestBuilderBasics()
326 Monster.addTesthashu32Fnv1(fbb, Integer.MAX_VALUE + 1L); in TestBuilderBasics()
327 Monster.addTestarrayoftables(fbb, sortMons); in TestBuilderBasics()
328 int mon = Monster.endMonster(fbb); in TestBuilderBasics()
331 Monster.finishSizePrefixedMonsterBuffer(fbb, mon); in TestBuilderBasics()
333 Monster.finishMonsterBuffer(fbb, mon); in TestBuilderBasics()
344 fc.write(fbb.dataBuffer().duplicate()); in TestBuilderBasics()
352 ByteBuffer dataBuffer = fbb.dataBuffer(); in TestBuilderBasics()
421 final FlatBufferBuilder fbb = new FlatBufferBuilder(); in TestVectorOfUnions() local
426 Attacker.createAttacker(fbb, swordAttackDamage), in TestVectorOfUnions()
434 fbb, in TestVectorOfUnions()
436 fbb, in TestVectorOfUnions()
439 Movie.createCharactersTypeVector(fbb, characterTypeVector), in TestVectorOfUnions()
440 Movie.createCharactersVector(fbb, characterVector) in TestVectorOfUnions()
444 final Movie movie = Movie.getRootAsMovie(fbb.dataBuffer()); in TestVectorOfUnions()