Lines Matching refs:fbb
54 FlatBufferBuilder fbb = new FlatBufferBuilder(1); in main() local
56 TestBuilderBasics(fbb); in main()
58 TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer()); in main()
145 FlatBufferBuilder fbb = new FlatBufferBuilder(1); in TestNamespaceNesting() local
147 TableInNestedNS.startTableInNestedNS(fbb); in TestNamespaceNesting()
148 TableInNestedNS.addFoo(fbb, 1234); in TestNamespaceNesting()
149 int nestedTableOff = TableInNestedNS.endTableInNestedNS(fbb); in TestNamespaceNesting()
151 TableInFirstNS.startTableInFirstNS(fbb); in TestNamespaceNesting()
152 TableInFirstNS.addFooTable(fbb, nestedTableOff); in TestNamespaceNesting()
153 int off = TableInFirstNS.endTableInFirstNS(fbb); in TestNamespaceNesting()
193 FlatBufferBuilder fbb = new FlatBufferBuilder(16); in TestCreateByteVector() local
194 int str = fbb.createString("MyMonster"); in TestCreateByteVector()
196 int vec = fbb.createByteVector(inventory); in TestCreateByteVector()
197 Monster.startMonster(fbb); in TestCreateByteVector()
198 Monster.addInventory(fbb, vec); in TestCreateByteVector()
199 Monster.addName(fbb, str); in TestCreateByteVector()
200 int monster1 = Monster.endMonster(fbb); in TestCreateByteVector()
201 Monster.finishMonsterBuffer(fbb, monster1); in TestCreateByteVector()
202 Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer()); in TestCreateByteVector()
210 FlatBufferBuilder fbb = new FlatBufferBuilder(16); in TestCreateUninitializedVector() local
211 int str = fbb.createString("MyMonster"); in TestCreateUninitializedVector()
213 ByteBuffer bb = fbb.createUnintializedVector(1, inventory.length, 1); in TestCreateUninitializedVector()
217 int vec = fbb.endVector(); in TestCreateUninitializedVector()
218 Monster.startMonster(fbb); in TestCreateUninitializedVector()
219 Monster.addInventory(fbb, vec); in TestCreateUninitializedVector()
220 Monster.addName(fbb, str); in TestCreateUninitializedVector()
221 int monster1 = Monster.endMonster(fbb); in TestCreateUninitializedVector()
222 Monster.finishMonsterBuffer(fbb, monster1); in TestCreateUninitializedVector()
223 Monster monsterObject = Monster.getRootAsMonster(fbb.dataBuffer()); in TestCreateUninitializedVector()
245 FlatBufferBuilder fbb = new FlatBufferBuilder(1, new MappedByteBufferFactory()); in TestByteBufferFactory() local
247 TestBuilderBasics(fbb); in TestByteBufferFactory()
252 FlatBufferBuilder fbb = new FlatBufferBuilder(1); in TestSizedInputStream() local
254 TestBuilderBasics(fbb); in TestSizedInputStream()
256 InputStream in = fbb.sizedInputStream(); in TestSizedInputStream()
257 byte[] array = fbb.sizedByteArray(); in TestSizedInputStream()
274 static void TestBuilderBasics(FlatBufferBuilder fbb) { in TestBuilderBasics() argument
275 … int[] names = {fbb.createString("Frodo"), fbb.createString("Barney"), fbb.createString("Wilma")}; in TestBuilderBasics()
277 Monster.startMonster(fbb); in TestBuilderBasics()
278 Monster.addName(fbb, names[0]); in TestBuilderBasics()
279 off[0] = Monster.endMonster(fbb); in TestBuilderBasics()
280 Monster.startMonster(fbb); in TestBuilderBasics()
281 Monster.addName(fbb, names[1]); in TestBuilderBasics()
282 off[1] = Monster.endMonster(fbb); in TestBuilderBasics()
283 Monster.startMonster(fbb); in TestBuilderBasics()
284 Monster.addName(fbb, names[2]); in TestBuilderBasics()
285 off[2] = Monster.endMonster(fbb); in TestBuilderBasics()
286 int sortMons = fbb.createSortedVectorOfTables(new Monster(), off); in TestBuilderBasics()
290 int str = fbb.createString("MyMonster"); in TestBuilderBasics()
292 int inv = Monster.createInventoryVector(fbb, new byte[] { 0, 1, 2, 3, 4 }); in TestBuilderBasics()
294 int fred = fbb.createString("Fred"); in TestBuilderBasics()
295 Monster.startMonster(fbb); in TestBuilderBasics()
296 Monster.addName(fbb, fred); in TestBuilderBasics()
297 int mon2 = Monster.endMonster(fbb); in TestBuilderBasics()
299 Monster.startTest4Vector(fbb, 2); in TestBuilderBasics()
300 Test.createTest(fbb, (short)10, (byte)20); in TestBuilderBasics()
301 Test.createTest(fbb, (short)30, (byte)40); in TestBuilderBasics()
302 int test4 = fbb.endVector(); in TestBuilderBasics()
304 int testArrayOfString = Monster.createTestarrayofstringVector(fbb, new int[] { in TestBuilderBasics()
305 fbb.createString("test1"), in TestBuilderBasics()
306 fbb.createString("test2") in TestBuilderBasics()
309 Monster.startMonster(fbb); in TestBuilderBasics()
310 Monster.addPos(fbb, Vec3.createVec3(fbb, 1.0f, 2.0f, 3.0f, 3.0, in TestBuilderBasics()
312 Monster.addHp(fbb, (short)80); in TestBuilderBasics()
313 Monster.addName(fbb, str); in TestBuilderBasics()
314 Monster.addInventory(fbb, inv); in TestBuilderBasics()
315 Monster.addTestType(fbb, (byte)Any.Monster); in TestBuilderBasics()
316 Monster.addTest(fbb, mon2); in TestBuilderBasics()
317 Monster.addTest4(fbb, test4); in TestBuilderBasics()
318 Monster.addTestarrayofstring(fbb, testArrayOfString); in TestBuilderBasics()
319 Monster.addTestbool(fbb, false); in TestBuilderBasics()
320 Monster.addTesthashu32Fnv1(fbb, Integer.MAX_VALUE + 1L); in TestBuilderBasics()
321 Monster.addTestarrayoftables(fbb, sortMons); in TestBuilderBasics()
322 int mon = Monster.endMonster(fbb); in TestBuilderBasics()
324 Monster.finishMonsterBuffer(fbb, mon); in TestBuilderBasics()
333 fc.write(fbb.dataBuffer().duplicate()); in TestBuilderBasics()
341 TestExtendedBuffer(fbb.dataBuffer()); in TestBuilderBasics()
346 TestExtendedBuffer(fbb.dataBuffer().asReadOnlyBuffer()); in TestBuilderBasics()
352 Monster monster = Monster.getRootAsMonster(fbb.dataBuffer()); in TestBuilderBasics()