本文整理汇总了Java中com.google.flatbuffers.FlatBufferBuilder.startObject方法的典型用法代码示例。如果您正苦于以下问题:Java FlatBufferBuilder.startObject方法的具体用法?Java FlatBufferBuilder.startObject怎么用?Java FlatBufferBuilder.startObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.flatbuffers.FlatBufferBuilder
的用法示例。
在下文中一共展示了FlatBufferBuilder.startObject方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPeople
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createPeople(FlatBufferBuilder builder,
int idOffset,
long index,
int guidOffset,
int nameOffset,
int genderOffset,
int companyOffset,
int emailOffset,
int friendsOffset) {
builder.startObject(8);
People.addIndex(builder, index);
People.addFriends(builder, friendsOffset);
People.addEmail(builder, emailOffset);
People.addCompany(builder, companyOffset);
People.addGender(builder, genderOffset);
People.addName(builder, nameOffset);
People.addGuid(builder, guidOffset);
People.addId(builder, idOffset);
return People.endPeople(builder);
}
示例2: createUser
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createUser(FlatBufferBuilder builder,
int usernameOffset,
int nameOffset,
int height,
boolean enabled,
int purchasesOffset) {
builder.startObject(5);
User.addPurchases(builder, purchasesOffset);
User.addHeight(builder, height);
User.addName(builder, nameOffset);
User.addUsername(builder, usernameOffset);
User.addEnabled(builder, enabled);
return User.endUser(builder);
}
示例3: createPurchase
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createPurchase(FlatBufferBuilder builder,
int idOffset,
int nameOffset,
int quantity,
int price) {
builder.startObject(4);
Purchase.addPrice(builder, price);
Purchase.addQuantity(builder, quantity);
Purchase.addName(builder, nameOffset);
Purchase.addId(builder, idOffset);
return Purchase.endPurchase(builder);
}
示例4: createEvent
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createEvent(FlatBufferBuilder builder,
long id,
int nameOffset,
int locationOffset,
int dateOffset) {
builder.startObject(4);
Event.addId(builder, id);
Event.addDate(builder, dateOffset);
Event.addLocation(builder, locationOffset);
Event.addName(builder, nameOffset);
return Event.endEvent(builder);
}
示例5: createFriend
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createFriend(FlatBufferBuilder builder,
long id,
int nameOffset) {
builder.startObject(2);
Friend.addId(builder, id);
Friend.addName(builder, nameOffset);
return Friend.endFriend(builder);
}
示例6: startUser
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startUser(FlatBufferBuilder builder) {
builder.startObject(5);
}
示例7: startPurchase
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startPurchase(FlatBufferBuilder builder) {
builder.startObject(4);
}
示例8: createPeopleList
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static int createPeopleList(FlatBufferBuilder builder,
int peoplesOffset) {
builder.startObject(1);
PeopleList.addPeoples(builder, peoplesOffset);
return PeopleList.endPeopleList(builder);
}
示例9: startEvent
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startEvent(FlatBufferBuilder builder) { builder.startObject(4); }
示例10: startFriend
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startFriend(FlatBufferBuilder builder) { builder.startObject(2); }
示例11: startPeople
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startPeople(FlatBufferBuilder builder) { builder.startObject(8); }
示例12: startPeopleList
import com.google.flatbuffers.FlatBufferBuilder; //导入方法依赖的package包/类
public static void startPeopleList(FlatBufferBuilder builder) { builder.startObject(1); }