/external/flatbuffers/samples/ |
D | sample_binary.py | 30 import MyGame.Sample.Weapon 41 MyGame.Sample.Weapon.WeaponStart(builder) 42 MyGame.Sample.Weapon.WeaponAddName(builder, weapon_one) 43 MyGame.Sample.Weapon.WeaponAddDamage(builder, 3) 44 sword = MyGame.Sample.Weapon.WeaponEnd(builder) 46 MyGame.Sample.Weapon.WeaponStart(builder) 47 MyGame.Sample.Weapon.WeaponAddName(builder, weapon_two) 48 MyGame.Sample.Weapon.WeaponAddDamage(builder, 5) 49 axe = MyGame.Sample.Weapon.WeaponEnd(builder) 77 builder, MyGame.Sample.Equipment.Equipment().Weapon) [all …]
|
D | samplebinary.js | 31 MyGame.Sample.Weapon.startWeapon(builder); 32 MyGame.Sample.Weapon.addName(builder, weaponOne); 33 MyGame.Sample.Weapon.addDamage(builder, 3); 34 var sword = MyGame.Sample.Weapon.endWeapon(builder); 36 MyGame.Sample.Weapon.startWeapon(builder); 37 MyGame.Sample.Weapon.addName(builder, weaponTwo); 38 MyGame.Sample.Weapon.addDamage(builder, 5); 39 var axe = MyGame.Sample.Weapon.endWeapon(builder); 59 MyGame.Sample.Monster.addEquippedType(builder, MyGame.Sample.Equipment.Weapon); 99 assert.equal(monster.equippedType(), MyGame.Sample.Equipment.Weapon); [all …]
|
D | SampleBinary.java | 23 import MyGame.Sample.Weapon; 42 weaps[0] = Weapon.createWeapon(builder, weaponOneName, weaponOneDamage); in main() 43 weaps[1] = Weapon.createWeapon(builder, weaponTwoName, weaponTwoDamage); in main() 59 Monster.addEquippedType(builder, Equipment.Weapon); in main() 99 assert monster.equippedType() == Equipment.Weapon; in main() 100 Weapon equipped = (Weapon)monster.equipped(new Weapon()); in main()
|
D | monster_generated.h | 17 struct Weapon; 97 template<> struct EquipmentTraits<Weapon> { 285 const flatbuffers::Vector<flatbuffers::Offset<Weapon>> *weapons() const { 286 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Weapon>> *>(VT_WEAPONS); 288 flatbuffers::Vector<flatbuffers::Offset<Weapon>> *mutable_weapons() { 289 return GetPointer<flatbuffers::Vector<flatbuffers::Offset<Weapon>> *>(VT_WEAPONS); 301 const Weapon *equipped_as_Weapon() const { 302 return equipped_type() == Equipment_Weapon ? static_cast<const Weapon *>(equipped()) : nullptr; 330 template<> inline const Weapon *Monster::equipped_as<Weapon>() const { 355 void add_weapons(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Weapon>>> weapons) { [all …]
|
D | monster_generated.rs | 92 Weapon = 1 enumerator 132 Equipment::Weapon 290 …pub fn weapons(&'a self) -> Option<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Weapon<'a>>>> { in weapons() 291 …uffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Weapon<'a>>>>>(Monster::V… in weapons() 303 pub fn equipped_as_weapon(&'a self) -> Option<Weapon> { in equipped_as_weapon() argument 304 if self.equipped_type() == Equipment::Weapon { in equipped_as_weapon() 305 self.equipped().map(|u| Weapon::init_from_table(u)) in equipped_as_weapon() 320 …ption<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<Weapon<'a >>>>>, 370 …ons: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Weapon<'b >>>>) { in add_weapons() 399 pub struct Weapon<'a> { struct [all …]
|
D | SampleBinary.cs | 37 var weaps = new Offset<Weapon>[2]; in Main() 38 weaps[0] = Weapon.CreateWeapon(builder, weapon1Name, (short)weapon1Damage); in Main() 39 weaps[1] = Weapon.CreateWeapon(builder, weapon2Name, (short)weapon2Damage); in Main() 55 Monster.AddEquippedType(builder, Equipment.Weapon); in Main() 112 Assert(monster.EquippedType == Equipment.Weapon, "monster.EquippedType", in Main() 113 Convert.ToString(monster.EquippedType), Convert.ToString(Equipment.Weapon)); in Main() 114 var equipped = monster.Equipped<Weapon>().Value; in Main()
|
D | SampleBinary.php | 41 $sword = \MyGame\Sample\Weapon::CreateWeapon($builder, $weapon_one, 3); 43 $axe = \MyGame\Sample\Weapon::CreateWeapon($builder, $weapon_two, 5); 63 \MyGame\Sample\Monster::AddEquippedType($builder, \MyGame\Sample\Equipment::Weapon); 105 $success &= assert($monster->getEquippedType() == \MyGame\Sample\Equipment::Weapon); 106 $success &= assert($monster->getEquipped(new \MyGame\Sample\Weapon())->getName() == "Axe"); 107 $success &= assert($monster->getEquipped(new \MyGame\Sample\Weapon())->getDamage() == 5);
|
D | sample_binary.rs | 27 Weapon, WeaponArgs}; 43 let sword = Weapon::create(&mut builder, &WeaponArgs{ in main() 47 let axe = Weapon::create(&mut builder, &WeaponArgs{ in main() 83 equipped_type: Equipment::Weapon, in main() 142 assert_eq!(monster.equipped_type(), Equipment::Weapon); in main()
|
D | monster.fbs | 7 union Equipment { Weapon } // Optionally add more tables. 23 weapons:[Weapon]; 27 table Weapon {
|
D | monster_generated.lobster | 20 struct Weapon 99 struct Weapon : flatbuffers_handle 105 def GetRootAsWeapon(buf:string): Weapon { buf, buf.flatbuffers_indirect(0) }
|
D | sample_binary.cpp | 39 std::vector<flatbuffers::Offset<Weapon>> weapons_vector; in main() 98 auto equipped = static_cast<const Weapon *>(monster->equipped()); in main()
|
D | sample_binary.lua | 62 monster.AddEquippedType(builder, equipment.Weapon) 100 assert(mon:EquippedType() == equipment.Weapon)
|
D | sample_binary.go | 122 weapon := new(sample.Weapon) // We need a `sample.Weapon` to pass into `monster.Weapons()` 146 unionWeapon := new(sample.Weapon)
|
/external/flatbuffers/samples/lua/MyGame/Sample/ |
D | Weapon.lua | 7 local Weapon = {} -- the module 10 function Weapon.New() 15 function Weapon.GetRootAsWeapon(buf, offset) 17 local o = Weapon.New() 37 function Weapon.Start(builder) builder:StartObject(2) end 38 function Weapon.AddName(builder, name) builder:PrependUOffsetTRelativeSlot(0, name, 0) end 39 function Weapon.AddDamage(builder, damage) builder:PrependInt16Slot(1, damage, 0) end 40 function Weapon.End(builder) return builder:EndObject() end 42 return Weapon -- return the module
|
D | Equipment.lua | 7 Weapon = 1,
|
/external/flatbuffers/docs/source/ |
D | Tutorial.md | 166 union Equipment { Weapon } // Optionally add more tables. 182 weapons:[Weapon]; // Vector of tables. 187 table Weapon { 211 useful, as it only contains the one `table` (named `Weapon`). If we had created 230 The `Weapon` table is a sub-table used within our FlatBuffer. It is 242 the `Weapon` table as: 244 table Weapon { 408 import MyGame.Sample.Weapon 483 local weapon = require("MyGame.Sample.Weapon") 504 Weapon, WeaponArgs}; [all …]
|
D | Schemas.md | 17 union Any { Monster, Weapon, Pickup } 38 (`Weapon` & `Pickup` not defined as part of this example).
|
/external/flatbuffers/dart/example/ |
D | monster_my_game.sample_generated.dart | 67 static const EquipmentTypeId Weapon = const EquipmentTypeId._(1); 68 static get values => {0: NONE,1: Weapon,}; 186 …List<Weapon> get weapons => const fb.ListReader<Weapon>(Weapon.reader).vTableGet(_bc, _bcOffset, 1… 190 case 1: return Weapon.reader.vTableGet(_bc, _bcOffset, 22, null); 353 class Weapon { 354 Weapon._(this._bc, this._bcOffset); 355 factory Weapon(List<int> bytes) { 360 static const fb.Reader<Weapon> reader = const _WeaponReader(); 370 return 'Weapon{name: $name, damage: $damage}'; 374 class _WeaponReader extends fb.TableReader<Weapon> { [all …]
|
D | example.dart | 70 ..addEquippedType(myGame.EquipmentTypeId.Weapon) 98 equippedType: myGame.EquipmentTypeId.Weapon, 145 assert(monster.equippedType.value == myGame.EquipmentTypeId.Weapon.value); 146 assert(monster.equippedType == myGame.EquipmentTypeId.Weapon); 148 assert(monster.equipped is myGame.Weapon); 149 var equipped = monster.equipped as myGame.Weapon;
|