osrm-backend/tests/MyGame/Example/StructOfStructs.php
Siarhei Fedartsou 0f6aab9da6 Squashed 'third_party/flatbuffers/' content from commit 595bf0007
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 595bf0007ab1929570c7671f091313c8fc20644e
2024-06-22 13:33:34 +02:00

75 lines
1.6 KiB
PHP

<?php
// automatically generated by the FlatBuffers compiler, do not modify
namespace MyGame\Example;
use \Google\FlatBuffers\Struct;
use \Google\FlatBuffers\Table;
use \Google\FlatBuffers\ByteBuffer;
use \Google\FlatBuffers\FlatBufferBuilder;
class StructOfStructs extends Struct
{
/**
* @param int $_i offset
* @param ByteBuffer $_bb
* @return StructOfStructs
**/
public function init($_i, ByteBuffer $_bb)
{
$this->bb_pos = $_i;
$this->bb = $_bb;
return $this;
}
/**
* @return Ability
*/
public function getA()
{
$obj = new Ability();
$obj->init($this->bb_pos + 0, $this->bb);
return $obj;
}
/**
* @return Test
*/
public function getB()
{
$obj = new Test();
$obj->init($this->bb_pos + 8, $this->bb);
return $obj;
}
/**
* @return Ability
*/
public function getC()
{
$obj = new Ability();
$obj->init($this->bb_pos + 12, $this->bb);
return $obj;
}
/**
* @return int offset
*/
public static function createStructOfStructs(FlatBufferBuilder $builder, $a_id, $a_distance, $b_a, $b_b, $c_id, $c_distance)
{
$builder->prep(4, 20);
$builder->prep(4, 8);
$builder->putUint($c_distance);
$builder->putUint($c_id);
$builder->prep(2, 4);
$builder->pad(1);
$builder->putSbyte($b_b);
$builder->putShort($b_a);
$builder->prep(4, 8);
$builder->putUint($a_distance);
$builder->putUint($a_id);
return $builder->offset();
}
}