Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers'
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// <auto-generated>
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
// </auto-generated>
|
||||
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public enum EnumInNestedNS : sbyte
|
||||
{
|
||||
A = 0,
|
||||
B = 1,
|
||||
C = 2,
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||
|
||||
package NamespaceB
|
||||
|
||||
import "strconv"
|
||||
|
||||
type EnumInNestedNS int8
|
||||
|
||||
const (
|
||||
EnumInNestedNSA EnumInNestedNS = 0
|
||||
EnumInNestedNSB EnumInNestedNS = 1
|
||||
EnumInNestedNSC EnumInNestedNS = 2
|
||||
)
|
||||
|
||||
var EnumNamesEnumInNestedNS = map[EnumInNestedNS]string{
|
||||
EnumInNestedNSA: "A",
|
||||
EnumInNestedNSB: "B",
|
||||
EnumInNestedNSC: "C",
|
||||
}
|
||||
|
||||
var EnumValuesEnumInNestedNS = map[string]EnumInNestedNS{
|
||||
"A": EnumInNestedNSA,
|
||||
"B": EnumInNestedNSB,
|
||||
"C": EnumInNestedNSC,
|
||||
}
|
||||
|
||||
func (v EnumInNestedNS) String() string {
|
||||
if s, ok := EnumNamesEnumInNestedNS[v]; ok {
|
||||
return s
|
||||
}
|
||||
return "EnumInNestedNS(" + strconv.FormatInt(int64(v), 10) + ")"
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class EnumInNestedNS {
|
||||
private EnumInNestedNS() { }
|
||||
public static final byte A = 0;
|
||||
public static final byte B = 1;
|
||||
public static final byte C = 2;
|
||||
|
||||
public static final String[] names = { "A", "B", "C", };
|
||||
|
||||
public static String name(int e) { return names[e]; }
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB
|
||||
|
||||
@Suppress("unused")
|
||||
@ExperimentalUnsignedTypes
|
||||
class EnumInNestedNS private constructor() {
|
||||
companion object {
|
||||
const val A: Byte = 0
|
||||
const val B: Byte = 1
|
||||
const val C: Byte = 2
|
||||
val names : Array<String> = arrayOf("A", "B", "C")
|
||||
fun name(e: Int) : String = names[e]
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
-- automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
-- namespace: NamespaceB
|
||||
|
||||
local EnumInNestedNS = {
|
||||
A = 0,
|
||||
B = 1,
|
||||
C = 2,
|
||||
}
|
||||
|
||||
return EnumInNestedNS -- return the module
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
namespace NamespaceA\NamespaceB;
|
||||
|
||||
class EnumInNestedNS
|
||||
{
|
||||
const A = 0;
|
||||
const B = 1;
|
||||
const C = 2;
|
||||
|
||||
private static $names = array(
|
||||
EnumInNestedNS::A=>"A",
|
||||
EnumInNestedNS::B=>"B",
|
||||
EnumInNestedNS::C=>"C",
|
||||
);
|
||||
|
||||
public static function Name($e)
|
||||
{
|
||||
if (!isset(self::$names[$e])) {
|
||||
throw new \Exception();
|
||||
}
|
||||
return self::$names[$e];
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
class EnumInNestedNS(object):
|
||||
A = 0
|
||||
B = 1
|
||||
C = 2
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
// <auto-generated>
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
// </auto-generated>
|
||||
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using global::Google.FlatBuffers;
|
||||
|
||||
public struct StructInNestedNS : IFlatbufferObject
|
||||
{
|
||||
private Struct __p;
|
||||
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
||||
public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
|
||||
public StructInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int A { get { return __p.bb.GetInt(__p.bb_pos + 0); } }
|
||||
public void MutateA(int a) { __p.bb.PutInt(__p.bb_pos + 0, a); }
|
||||
public int B { get { return __p.bb.GetInt(__p.bb_pos + 4); } }
|
||||
public void MutateB(int b) { __p.bb.PutInt(__p.bb_pos + 4, b); }
|
||||
|
||||
public static Offset<NamespaceA.NamespaceB.StructInNestedNS> CreateStructInNestedNS(FlatBufferBuilder builder, int A, int B) {
|
||||
builder.Prep(4, 8);
|
||||
builder.PutInt(B);
|
||||
builder.PutInt(A);
|
||||
return new Offset<NamespaceA.NamespaceB.StructInNestedNS>(builder.Offset);
|
||||
}
|
||||
public StructInNestedNST UnPack() {
|
||||
var _o = new StructInNestedNST();
|
||||
this.UnPackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void UnPackTo(StructInNestedNST _o) {
|
||||
_o.A = this.A;
|
||||
_o.B = this.B;
|
||||
}
|
||||
public static Offset<NamespaceA.NamespaceB.StructInNestedNS> Pack(FlatBufferBuilder builder, StructInNestedNST _o) {
|
||||
if (_o == null) return default(Offset<NamespaceA.NamespaceB.StructInNestedNS>);
|
||||
return CreateStructInNestedNS(
|
||||
builder,
|
||||
_o.A,
|
||||
_o.B);
|
||||
}
|
||||
}
|
||||
|
||||
public class StructInNestedNST
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("a")]
|
||||
public int A { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("b")]
|
||||
public int B { get; set; }
|
||||
|
||||
public StructInNestedNST() {
|
||||
this.A = 0;
|
||||
this.B = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||
|
||||
package NamespaceB
|
||||
|
||||
import (
|
||||
flatbuffers "github.com/google/flatbuffers/go"
|
||||
)
|
||||
|
||||
type StructInNestedNST struct {
|
||||
A int32
|
||||
B int32
|
||||
}
|
||||
|
||||
func (t *StructInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
if t == nil { return 0 }
|
||||
return CreateStructInNestedNS(builder, t.A, t.B)
|
||||
}
|
||||
func (rcv *StructInNestedNS) UnPackTo(t *StructInNestedNST) {
|
||||
t.A = rcv.A()
|
||||
t.B = rcv.B()
|
||||
}
|
||||
|
||||
func (rcv *StructInNestedNS) UnPack() *StructInNestedNST {
|
||||
if rcv == nil { return nil }
|
||||
t := &StructInNestedNST{}
|
||||
rcv.UnPackTo(t)
|
||||
return t
|
||||
}
|
||||
|
||||
type StructInNestedNS struct {
|
||||
_tab flatbuffers.Struct
|
||||
}
|
||||
|
||||
func (rcv *StructInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||
rcv._tab.Bytes = buf
|
||||
rcv._tab.Pos = i
|
||||
}
|
||||
|
||||
func (rcv *StructInNestedNS) Table() flatbuffers.Table {
|
||||
return rcv._tab.Table
|
||||
}
|
||||
|
||||
func (rcv *StructInNestedNS) A() int32 {
|
||||
return rcv._tab.GetInt32(rcv._tab.Pos + flatbuffers.UOffsetT(0))
|
||||
}
|
||||
func (rcv *StructInNestedNS) MutateA(n int32) bool {
|
||||
return rcv._tab.MutateInt32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n)
|
||||
}
|
||||
|
||||
func (rcv *StructInNestedNS) B() int32 {
|
||||
return rcv._tab.GetInt32(rcv._tab.Pos + flatbuffers.UOffsetT(4))
|
||||
}
|
||||
func (rcv *StructInNestedNS) MutateB(n int32) bool {
|
||||
return rcv._tab.MutateInt32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n)
|
||||
}
|
||||
|
||||
func CreateStructInNestedNS(builder *flatbuffers.Builder, a int32, b int32) flatbuffers.UOffsetT {
|
||||
builder.Prep(4, 8)
|
||||
builder.PrependInt32(b)
|
||||
builder.PrependInt32(a)
|
||||
return builder.Offset()
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class StructInNestedNS extends Struct {
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public StructInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int a() { return bb.getInt(bb_pos + 0); }
|
||||
public void mutateA(int a) { bb.putInt(bb_pos + 0, a); }
|
||||
public int b() { return bb.getInt(bb_pos + 4); }
|
||||
public void mutateB(int b) { bb.putInt(bb_pos + 4, b); }
|
||||
|
||||
public static int createStructInNestedNS(FlatBufferBuilder builder, int a, int b) {
|
||||
builder.prep(4, 8);
|
||||
builder.putInt(b);
|
||||
builder.putInt(a);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
public static final class Vector extends BaseVector {
|
||||
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
|
||||
|
||||
public StructInNestedNS get(int j) { return get(new StructInNestedNS(), j); }
|
||||
public StructInNestedNS get(StructInNestedNS obj, int j) { return obj.__assign(__element(j), bb); }
|
||||
}
|
||||
public StructInNestedNST unpack() {
|
||||
StructInNestedNST _o = new StructInNestedNST();
|
||||
unpackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void unpackTo(StructInNestedNST _o) {
|
||||
int _oA = a();
|
||||
_o.setA(_oA);
|
||||
int _oB = b();
|
||||
_o.setB(_oB);
|
||||
}
|
||||
public static int pack(FlatBufferBuilder builder, StructInNestedNST _o) {
|
||||
if (_o == null) return 0;
|
||||
return createStructInNestedNS(
|
||||
builder,
|
||||
_o.getA(),
|
||||
_o.getB());
|
||||
}
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB
|
||||
|
||||
import com.google.flatbuffers.BaseVector
|
||||
import com.google.flatbuffers.BooleanVector
|
||||
import com.google.flatbuffers.ByteVector
|
||||
import com.google.flatbuffers.Constants
|
||||
import com.google.flatbuffers.DoubleVector
|
||||
import com.google.flatbuffers.FlatBufferBuilder
|
||||
import com.google.flatbuffers.FloatVector
|
||||
import com.google.flatbuffers.LongVector
|
||||
import com.google.flatbuffers.StringVector
|
||||
import com.google.flatbuffers.Struct
|
||||
import com.google.flatbuffers.Table
|
||||
import com.google.flatbuffers.UnionVector
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@ExperimentalUnsignedTypes
|
||||
class StructInNestedNS : Struct() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
__reset(_i, _bb)
|
||||
}
|
||||
fun __assign(_i: Int, _bb: ByteBuffer) : StructInNestedNS {
|
||||
__init(_i, _bb)
|
||||
return this
|
||||
}
|
||||
val a : Int get() = bb.getInt(bb_pos + 0)
|
||||
fun mutateA(a: Int) : ByteBuffer = bb.putInt(bb_pos + 0, a)
|
||||
val b : Int get() = bb.getInt(bb_pos + 4)
|
||||
fun mutateB(b: Int) : ByteBuffer = bb.putInt(bb_pos + 4, b)
|
||||
companion object {
|
||||
fun createStructInNestedNS(builder: FlatBufferBuilder, a: Int, b: Int) : Int {
|
||||
builder.prep(4, 8)
|
||||
builder.putInt(b)
|
||||
builder.putInt(a)
|
||||
return builder.offset()
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
-- automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
-- namespace: NamespaceB
|
||||
|
||||
local flatbuffers = require('flatbuffers')
|
||||
|
||||
local StructInNestedNS = {} -- the module
|
||||
local StructInNestedNS_mt = {} -- the class metatable
|
||||
|
||||
function StructInNestedNS.New()
|
||||
local o = {}
|
||||
setmetatable(o, {__index = StructInNestedNS_mt})
|
||||
return o
|
||||
end
|
||||
function StructInNestedNS_mt:Init(buf, pos)
|
||||
self.view = flatbuffers.view.New(buf, pos)
|
||||
end
|
||||
function StructInNestedNS_mt:A()
|
||||
return self.view:Get(flatbuffers.N.Int32, self.view.pos + 0)
|
||||
end
|
||||
function StructInNestedNS_mt:B()
|
||||
return self.view:Get(flatbuffers.N.Int32, self.view.pos + 4)
|
||||
end
|
||||
function StructInNestedNS.CreateStructInNestedNS(builder, a, b)
|
||||
builder:Prep(4, 8)
|
||||
builder:PrependInt32(b)
|
||||
builder:PrependInt32(a)
|
||||
return builder:Offset()
|
||||
end
|
||||
|
||||
return StructInNestedNS -- return the module
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
namespace NamespaceA\NamespaceB;
|
||||
|
||||
use \Google\FlatBuffers\Struct;
|
||||
use \Google\FlatBuffers\Table;
|
||||
use \Google\FlatBuffers\ByteBuffer;
|
||||
use \Google\FlatBuffers\FlatBufferBuilder;
|
||||
|
||||
class StructInNestedNS extends Struct
|
||||
{
|
||||
/**
|
||||
* @param int $_i offset
|
||||
* @param ByteBuffer $_bb
|
||||
* @return StructInNestedNS
|
||||
**/
|
||||
public function init($_i, ByteBuffer $_bb)
|
||||
{
|
||||
$this->bb_pos = $_i;
|
||||
$this->bb = $_bb;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function GetA()
|
||||
{
|
||||
return $this->bb->getInt($this->bb_pos + 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function GetB()
|
||||
{
|
||||
return $this->bb->getInt($this->bb_pos + 4);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int offset
|
||||
*/
|
||||
public static function createStructInNestedNS(FlatBufferBuilder $builder, $a, $b)
|
||||
{
|
||||
$builder->prep(4, 8);
|
||||
$builder->putInt($b);
|
||||
$builder->putInt($a);
|
||||
return $builder->offset();
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
# automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
import flatbuffers
|
||||
from flatbuffers.compat import import_numpy
|
||||
np = import_numpy()
|
||||
|
||||
class StructInNestedNS(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
@classmethod
|
||||
def SizeOf(cls):
|
||||
return 8
|
||||
|
||||
# StructInNestedNS
|
||||
def Init(self, buf, pos):
|
||||
self._tab = flatbuffers.table.Table(buf, pos)
|
||||
|
||||
# StructInNestedNS
|
||||
def A(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
|
||||
# StructInNestedNS
|
||||
def B(self): return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))
|
||||
|
||||
def CreateStructInNestedNS(builder, a, b):
|
||||
builder.Prep(4, 8)
|
||||
builder.PrependInt32(b)
|
||||
builder.PrependInt32(a)
|
||||
return builder.Offset()
|
||||
|
||||
|
||||
class StructInNestedNST(object):
|
||||
|
||||
# StructInNestedNST
|
||||
def __init__(self):
|
||||
self.a = 0 # type: int
|
||||
self.b = 0 # type: int
|
||||
|
||||
@classmethod
|
||||
def InitFromBuf(cls, buf, pos):
|
||||
structInNestedNS = StructInNestedNS()
|
||||
structInNestedNS.Init(buf, pos)
|
||||
return cls.InitFromObj(structInNestedNS)
|
||||
|
||||
@classmethod
|
||||
def InitFromObj(cls, structInNestedNS):
|
||||
x = StructInNestedNST()
|
||||
x._UnPack(structInNestedNS)
|
||||
return x
|
||||
|
||||
# StructInNestedNST
|
||||
def _UnPack(self, structInNestedNS):
|
||||
if structInNestedNS is None:
|
||||
return
|
||||
self.a = structInNestedNS.A()
|
||||
self.b = structInNestedNS.B()
|
||||
|
||||
# StructInNestedNST
|
||||
def Pack(self, builder):
|
||||
return CreateStructInNestedNS(builder, self.a, self.b)
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class StructInNestedNST {
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
public int getA() { return a; }
|
||||
|
||||
public void setA(int a) { this.a = a; }
|
||||
|
||||
public int getB() { return b; }
|
||||
|
||||
public void setB(int b) { this.b = b; }
|
||||
|
||||
|
||||
public StructInNestedNST() {
|
||||
this.a = 0;
|
||||
this.b = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
// <auto-generated>
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
// </auto-generated>
|
||||
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using global::Google.FlatBuffers;
|
||||
|
||||
public struct TableInNestedNS : IFlatbufferObject
|
||||
{
|
||||
private Table __p;
|
||||
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
||||
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
||||
public static TableInNestedNS GetRootAsTableInNestedNS(ByteBuffer _bb) { return GetRootAsTableInNestedNS(_bb, new TableInNestedNS()); }
|
||||
public static TableInNestedNS GetRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
||||
public TableInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int Foo { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
||||
public bool MutateFoo(int foo) { int o = __p.__offset(4); if (o != 0) { __p.bb.PutInt(o + __p.bb_pos, foo); return true; } else { return false; } }
|
||||
|
||||
public static Offset<NamespaceA.NamespaceB.TableInNestedNS> CreateTableInNestedNS(FlatBufferBuilder builder,
|
||||
int foo = 0) {
|
||||
builder.StartTable(1);
|
||||
TableInNestedNS.AddFoo(builder, foo);
|
||||
return TableInNestedNS.EndTableInNestedNS(builder);
|
||||
}
|
||||
|
||||
public static void StartTableInNestedNS(FlatBufferBuilder builder) { builder.StartTable(1); }
|
||||
public static void AddFoo(FlatBufferBuilder builder, int foo) { builder.AddInt(0, foo, 0); }
|
||||
public static Offset<NamespaceA.NamespaceB.TableInNestedNS> EndTableInNestedNS(FlatBufferBuilder builder) {
|
||||
int o = builder.EndTable();
|
||||
return new Offset<NamespaceA.NamespaceB.TableInNestedNS>(o);
|
||||
}
|
||||
public TableInNestedNST UnPack() {
|
||||
var _o = new TableInNestedNST();
|
||||
this.UnPackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void UnPackTo(TableInNestedNST _o) {
|
||||
_o.Foo = this.Foo;
|
||||
}
|
||||
public static Offset<NamespaceA.NamespaceB.TableInNestedNS> Pack(FlatBufferBuilder builder, TableInNestedNST _o) {
|
||||
if (_o == null) return default(Offset<NamespaceA.NamespaceB.TableInNestedNS>);
|
||||
return CreateTableInNestedNS(
|
||||
builder,
|
||||
_o.Foo);
|
||||
}
|
||||
}
|
||||
|
||||
public class TableInNestedNST
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("foo")]
|
||||
public int Foo { get; set; }
|
||||
|
||||
public TableInNestedNST() {
|
||||
this.Foo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static public class TableInNestedNSVerify
|
||||
{
|
||||
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
||||
{
|
||||
return verifier.VerifyTableStart(tablePos)
|
||||
&& verifier.VerifyField(tablePos, 4 /*Foo*/, 4 /*int*/, 4, false)
|
||||
&& verifier.VerifyTableEnd(tablePos);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||
|
||||
package NamespaceB
|
||||
|
||||
import (
|
||||
flatbuffers "github.com/google/flatbuffers/go"
|
||||
)
|
||||
|
||||
type TableInNestedNST struct {
|
||||
Foo int32
|
||||
}
|
||||
|
||||
func (t *TableInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
if t == nil { return 0 }
|
||||
TableInNestedNSStart(builder)
|
||||
TableInNestedNSAddFoo(builder, t.Foo)
|
||||
return TableInNestedNSEnd(builder)
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) UnPackTo(t *TableInNestedNST) {
|
||||
t.Foo = rcv.Foo()
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) UnPack() *TableInNestedNST {
|
||||
if rcv == nil { return nil }
|
||||
t := &TableInNestedNST{}
|
||||
rcv.UnPackTo(t)
|
||||
return t
|
||||
}
|
||||
|
||||
type TableInNestedNS struct {
|
||||
_tab flatbuffers.Table
|
||||
}
|
||||
|
||||
func GetRootAsTableInNestedNS(buf []byte, offset flatbuffers.UOffsetT) *TableInNestedNS {
|
||||
n := flatbuffers.GetUOffsetT(buf[offset:])
|
||||
x := &TableInNestedNS{}
|
||||
x.Init(buf, n+offset)
|
||||
return x
|
||||
}
|
||||
|
||||
func GetSizePrefixedRootAsTableInNestedNS(buf []byte, offset flatbuffers.UOffsetT) *TableInNestedNS {
|
||||
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
||||
x := &TableInNestedNS{}
|
||||
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
||||
return x
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
|
||||
rcv._tab.Bytes = buf
|
||||
rcv._tab.Pos = i
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) Table() flatbuffers.Table {
|
||||
return rcv._tab
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) Foo() int32 {
|
||||
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
||||
if o != 0 {
|
||||
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (rcv *TableInNestedNS) MutateFoo(n int32) bool {
|
||||
return rcv._tab.MutateInt32Slot(4, n)
|
||||
}
|
||||
|
||||
func TableInNestedNSStart(builder *flatbuffers.Builder) {
|
||||
builder.StartObject(1)
|
||||
}
|
||||
func TableInNestedNSAddFoo(builder *flatbuffers.Builder, foo int32) {
|
||||
builder.PrependInt32Slot(0, foo, 0)
|
||||
}
|
||||
func TableInNestedNSEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
return builder.EndObject()
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class TableInNestedNS extends Table {
|
||||
public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); }
|
||||
public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb) { return getRootAsTableInNestedNS(_bb, new TableInNestedNS()); }
|
||||
public static TableInNestedNS getRootAsTableInNestedNS(ByteBuffer _bb, TableInNestedNS obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
|
||||
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
|
||||
public TableInNestedNS __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||
|
||||
public int foo() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
|
||||
public boolean mutateFoo(int foo) { int o = __offset(4); if (o != 0) { bb.putInt(o + bb_pos, foo); return true; } else { return false; } }
|
||||
|
||||
public static int createTableInNestedNS(FlatBufferBuilder builder,
|
||||
int foo) {
|
||||
builder.startTable(1);
|
||||
TableInNestedNS.addFoo(builder, foo);
|
||||
return TableInNestedNS.endTableInNestedNS(builder);
|
||||
}
|
||||
|
||||
public static void startTableInNestedNS(FlatBufferBuilder builder) { builder.startTable(1); }
|
||||
public static void addFoo(FlatBufferBuilder builder, int foo) { builder.addInt(0, foo, 0); }
|
||||
public static int endTableInNestedNS(FlatBufferBuilder builder) {
|
||||
int o = builder.endTable();
|
||||
return o;
|
||||
}
|
||||
|
||||
public static final class Vector extends BaseVector {
|
||||
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
|
||||
|
||||
public TableInNestedNS get(int j) { return get(new TableInNestedNS(), j); }
|
||||
public TableInNestedNS get(TableInNestedNS obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
|
||||
}
|
||||
public TableInNestedNST unpack() {
|
||||
TableInNestedNST _o = new TableInNestedNST();
|
||||
unpackTo(_o);
|
||||
return _o;
|
||||
}
|
||||
public void unpackTo(TableInNestedNST _o) {
|
||||
int _oFoo = foo();
|
||||
_o.setFoo(_oFoo);
|
||||
}
|
||||
public static int pack(FlatBufferBuilder builder, TableInNestedNST _o) {
|
||||
if (_o == null) return 0;
|
||||
return createTableInNestedNS(
|
||||
builder,
|
||||
_o.getFoo());
|
||||
}
|
||||
}
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB
|
||||
|
||||
import com.google.flatbuffers.BaseVector
|
||||
import com.google.flatbuffers.BooleanVector
|
||||
import com.google.flatbuffers.ByteVector
|
||||
import com.google.flatbuffers.Constants
|
||||
import com.google.flatbuffers.DoubleVector
|
||||
import com.google.flatbuffers.FlatBufferBuilder
|
||||
import com.google.flatbuffers.FloatVector
|
||||
import com.google.flatbuffers.LongVector
|
||||
import com.google.flatbuffers.StringVector
|
||||
import com.google.flatbuffers.Struct
|
||||
import com.google.flatbuffers.Table
|
||||
import com.google.flatbuffers.UnionVector
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@ExperimentalUnsignedTypes
|
||||
class TableInNestedNS : Table() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
__reset(_i, _bb)
|
||||
}
|
||||
fun __assign(_i: Int, _bb: ByteBuffer) : TableInNestedNS {
|
||||
__init(_i, _bb)
|
||||
return this
|
||||
}
|
||||
val foo : Int
|
||||
get() {
|
||||
val o = __offset(4)
|
||||
return if(o != 0) bb.getInt(o + bb_pos) else 0
|
||||
}
|
||||
fun mutateFoo(foo: Int) : Boolean {
|
||||
val o = __offset(4)
|
||||
return if (o != 0) {
|
||||
bb.putInt(o + bb_pos, foo)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
companion object {
|
||||
fun validateVersion() = Constants.FLATBUFFERS_24_3_25()
|
||||
fun getRootAsTableInNestedNS(_bb: ByteBuffer): TableInNestedNS = getRootAsTableInNestedNS(_bb, TableInNestedNS())
|
||||
fun getRootAsTableInNestedNS(_bb: ByteBuffer, obj: TableInNestedNS): TableInNestedNS {
|
||||
_bb.order(ByteOrder.LITTLE_ENDIAN)
|
||||
return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb))
|
||||
}
|
||||
fun createTableInNestedNS(builder: FlatBufferBuilder, foo: Int) : Int {
|
||||
builder.startTable(1)
|
||||
addFoo(builder, foo)
|
||||
return endTableInNestedNS(builder)
|
||||
}
|
||||
fun startTableInNestedNS(builder: FlatBufferBuilder) = builder.startTable(1)
|
||||
fun addFoo(builder: FlatBufferBuilder, foo: Int) = builder.addInt(0, foo, 0)
|
||||
fun endTableInNestedNS(builder: FlatBufferBuilder) : Int {
|
||||
val o = builder.endTable()
|
||||
return o
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
-- automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
-- namespace: NamespaceB
|
||||
|
||||
local flatbuffers = require('flatbuffers')
|
||||
|
||||
local TableInNestedNS = {} -- the module
|
||||
local TableInNestedNS_mt = {} -- the class metatable
|
||||
|
||||
function TableInNestedNS.New()
|
||||
local o = {}
|
||||
setmetatable(o, {__index = TableInNestedNS_mt})
|
||||
return o
|
||||
end
|
||||
function TableInNestedNS.GetRootAsTableInNestedNS(buf, offset)
|
||||
if type(buf) == "string" then
|
||||
buf = flatbuffers.binaryArray.New(buf)
|
||||
end
|
||||
local n = flatbuffers.N.UOffsetT:Unpack(buf, offset)
|
||||
local o = TableInNestedNS.New()
|
||||
o:Init(buf, n + offset)
|
||||
return o
|
||||
end
|
||||
function TableInNestedNS_mt:Init(buf, pos)
|
||||
self.view = flatbuffers.view.New(buf, pos)
|
||||
end
|
||||
function TableInNestedNS_mt:Foo()
|
||||
local o = self.view:Offset(4)
|
||||
if o ~= 0 then
|
||||
return self.view:Get(flatbuffers.N.Int32, o + self.view.pos)
|
||||
end
|
||||
return 0
|
||||
end
|
||||
function TableInNestedNS.Start(builder) builder:StartObject(1) end
|
||||
function TableInNestedNS.AddFoo(builder, foo) builder:PrependInt32Slot(0, foo, 0) end
|
||||
function TableInNestedNS.End(builder) return builder:EndObject() end
|
||||
|
||||
return TableInNestedNS -- return the module
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
namespace NamespaceA\NamespaceB;
|
||||
|
||||
use \Google\FlatBuffers\Struct;
|
||||
use \Google\FlatBuffers\Table;
|
||||
use \Google\FlatBuffers\ByteBuffer;
|
||||
use \Google\FlatBuffers\FlatBufferBuilder;
|
||||
|
||||
class TableInNestedNS extends Table
|
||||
{
|
||||
/**
|
||||
* @param ByteBuffer $bb
|
||||
* @return TableInNestedNS
|
||||
*/
|
||||
public static function getRootAsTableInNestedNS(ByteBuffer $bb)
|
||||
{
|
||||
$obj = new TableInNestedNS();
|
||||
return ($obj->init($bb->getInt($bb->getPosition()) + $bb->getPosition(), $bb));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $_i offset
|
||||
* @param ByteBuffer $_bb
|
||||
* @return TableInNestedNS
|
||||
**/
|
||||
public function init($_i, ByteBuffer $_bb)
|
||||
{
|
||||
$this->bb_pos = $_i;
|
||||
$this->bb = $_bb;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getFoo()
|
||||
{
|
||||
$o = $this->__offset(4);
|
||||
return $o != 0 ? $this->bb->getInt($o + $this->bb_pos) : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return void
|
||||
*/
|
||||
public static function startTableInNestedNS(FlatBufferBuilder $builder)
|
||||
{
|
||||
$builder->StartObject(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return TableInNestedNS
|
||||
*/
|
||||
public static function createTableInNestedNS(FlatBufferBuilder $builder, $foo)
|
||||
{
|
||||
$builder->startObject(1);
|
||||
self::addFoo($builder, $foo);
|
||||
$o = $builder->endObject();
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @param int
|
||||
* @return void
|
||||
*/
|
||||
public static function addFoo(FlatBufferBuilder $builder, $foo)
|
||||
{
|
||||
$builder->addIntX(0, $foo, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FlatBufferBuilder $builder
|
||||
* @return int table offset
|
||||
*/
|
||||
public static function endTableInNestedNS(FlatBufferBuilder $builder)
|
||||
{
|
||||
$o = $builder->endObject();
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
# automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
import flatbuffers
|
||||
from flatbuffers.compat import import_numpy
|
||||
np = import_numpy()
|
||||
|
||||
class TableInNestedNS(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
@classmethod
|
||||
def GetRootAs(cls, buf, offset=0):
|
||||
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
||||
x = TableInNestedNS()
|
||||
x.Init(buf, n + offset)
|
||||
return x
|
||||
|
||||
@classmethod
|
||||
def GetRootAsTableInNestedNS(cls, buf, offset=0):
|
||||
"""This method is deprecated. Please switch to GetRootAs."""
|
||||
return cls.GetRootAs(buf, offset)
|
||||
# TableInNestedNS
|
||||
def Init(self, buf, pos):
|
||||
self._tab = flatbuffers.table.Table(buf, pos)
|
||||
|
||||
# TableInNestedNS
|
||||
def Foo(self):
|
||||
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
||||
if o != 0:
|
||||
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
|
||||
return 0
|
||||
|
||||
def TableInNestedNSStart(builder): builder.StartObject(1)
|
||||
def Start(builder):
|
||||
return TableInNestedNSStart(builder)
|
||||
def TableInNestedNSAddFoo(builder, foo): builder.PrependInt32Slot(0, foo, 0)
|
||||
def AddFoo(builder, foo):
|
||||
return TableInNestedNSAddFoo(builder, foo)
|
||||
def TableInNestedNSEnd(builder): return builder.EndObject()
|
||||
def End(builder):
|
||||
return TableInNestedNSEnd(builder)
|
||||
|
||||
class TableInNestedNST(object):
|
||||
|
||||
# TableInNestedNST
|
||||
def __init__(self):
|
||||
self.foo = 0 # type: int
|
||||
|
||||
@classmethod
|
||||
def InitFromBuf(cls, buf, pos):
|
||||
tableInNestedNS = TableInNestedNS()
|
||||
tableInNestedNS.Init(buf, pos)
|
||||
return cls.InitFromObj(tableInNestedNS)
|
||||
|
||||
@classmethod
|
||||
def InitFromObj(cls, tableInNestedNS):
|
||||
x = TableInNestedNST()
|
||||
x._UnPack(tableInNestedNS)
|
||||
return x
|
||||
|
||||
# TableInNestedNST
|
||||
def _UnPack(self, tableInNestedNS):
|
||||
if tableInNestedNS is None:
|
||||
return
|
||||
self.foo = tableInNestedNS.Foo()
|
||||
|
||||
# TableInNestedNST
|
||||
def Pack(self, builder):
|
||||
TableInNestedNSStart(builder)
|
||||
TableInNestedNSAddFoo(builder, self.foo)
|
||||
tableInNestedNS = TableInNestedNSEnd(builder)
|
||||
return tableInNestedNS
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import com.google.flatbuffers.*;
|
||||
|
||||
public class TableInNestedNST {
|
||||
private int foo;
|
||||
|
||||
public int getFoo() { return foo; }
|
||||
|
||||
public void setFoo(int foo) { this.foo = foo; }
|
||||
|
||||
|
||||
public TableInNestedNST() {
|
||||
this.foo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// <auto-generated>
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
// </auto-generated>
|
||||
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public enum UnionInNestedNS : byte
|
||||
{
|
||||
NONE = 0,
|
||||
TableInNestedNS = 1,
|
||||
};
|
||||
|
||||
public class UnionInNestedNSUnion {
|
||||
public UnionInNestedNS Type { get; set; }
|
||||
public object Value { get; set; }
|
||||
|
||||
public UnionInNestedNSUnion() {
|
||||
this.Type = UnionInNestedNS.NONE;
|
||||
this.Value = null;
|
||||
}
|
||||
|
||||
public T As<T>() where T : class { return this.Value as T; }
|
||||
public NamespaceA.NamespaceB.TableInNestedNST AsTableInNestedNS() { return this.As<NamespaceA.NamespaceB.TableInNestedNST>(); }
|
||||
public static UnionInNestedNSUnion FromTableInNestedNS(NamespaceA.NamespaceB.TableInNestedNST _tableinnestedns) { return new UnionInNestedNSUnion{ Type = UnionInNestedNS.TableInNestedNS, Value = _tableinnestedns }; }
|
||||
|
||||
public static int Pack(Google.FlatBuffers.FlatBufferBuilder builder, UnionInNestedNSUnion _o) {
|
||||
switch (_o.Type) {
|
||||
default: return 0;
|
||||
case UnionInNestedNS.TableInNestedNS: return NamespaceA.NamespaceB.TableInNestedNS.Pack(builder, _o.AsTableInNestedNS()).Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class UnionInNestedNSUnion_JsonConverter : Newtonsoft.Json.JsonConverter {
|
||||
public override bool CanConvert(System.Type objectType) {
|
||||
return objectType == typeof(UnionInNestedNSUnion) || objectType == typeof(System.Collections.Generic.List<UnionInNestedNSUnion>);
|
||||
}
|
||||
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) {
|
||||
var _olist = value as System.Collections.Generic.List<UnionInNestedNSUnion>;
|
||||
if (_olist != null) {
|
||||
writer.WriteStartArray();
|
||||
foreach (var _o in _olist) { this.WriteJson(writer, _o, serializer); }
|
||||
writer.WriteEndArray();
|
||||
} else {
|
||||
this.WriteJson(writer, value as UnionInNestedNSUnion, serializer);
|
||||
}
|
||||
}
|
||||
public void WriteJson(Newtonsoft.Json.JsonWriter writer, UnionInNestedNSUnion _o, Newtonsoft.Json.JsonSerializer serializer) {
|
||||
if (_o == null) return;
|
||||
serializer.Serialize(writer, _o.Value);
|
||||
}
|
||||
public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) {
|
||||
var _olist = existingValue as System.Collections.Generic.List<UnionInNestedNSUnion>;
|
||||
if (_olist != null) {
|
||||
for (var _j = 0; _j < _olist.Count; ++_j) {
|
||||
reader.Read();
|
||||
_olist[_j] = this.ReadJson(reader, _olist[_j], serializer);
|
||||
}
|
||||
reader.Read();
|
||||
return _olist;
|
||||
} else {
|
||||
return this.ReadJson(reader, existingValue as UnionInNestedNSUnion, serializer);
|
||||
}
|
||||
}
|
||||
public UnionInNestedNSUnion ReadJson(Newtonsoft.Json.JsonReader reader, UnionInNestedNSUnion _o, Newtonsoft.Json.JsonSerializer serializer) {
|
||||
if (_o == null) return null;
|
||||
switch (_o.Type) {
|
||||
default: break;
|
||||
case UnionInNestedNS.TableInNestedNS: _o.Value = serializer.Deserialize<NamespaceA.NamespaceB.TableInNestedNST>(reader); break;
|
||||
}
|
||||
return _o;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static public class UnionInNestedNSVerify
|
||||
{
|
||||
static public bool Verify(Google.FlatBuffers.Verifier verifier, byte typeId, uint tablePos)
|
||||
{
|
||||
bool result = true;
|
||||
switch((UnionInNestedNS)typeId)
|
||||
{
|
||||
case UnionInNestedNS.TableInNestedNS:
|
||||
result = NamespaceA.NamespaceB.TableInNestedNSVerify.Verify(verifier, tablePos);
|
||||
break;
|
||||
default: result = true;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||
|
||||
package NamespaceB
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
flatbuffers "github.com/google/flatbuffers/go"
|
||||
|
||||
NamespaceA__NamespaceB "NamespaceA/NamespaceB"
|
||||
)
|
||||
|
||||
type UnionInNestedNST struct {
|
||||
Type UnionInNestedNS
|
||||
Value interface{}
|
||||
}
|
||||
|
||||
func (t *UnionInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
if t == nil {
|
||||
return 0
|
||||
}
|
||||
switch t.Type {
|
||||
case UnionInNestedNSTableInNestedNS:
|
||||
return t.Value.(*NamespaceA__NamespaceB.TableInNestedNST).Pack(builder)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (rcv UnionInNestedNS) UnPack(table flatbuffers.Table) *UnionInNestedNST {
|
||||
switch rcv {
|
||||
case UnionInNestedNSTableInNestedNS:
|
||||
x := TableInNestedNS{_tab: table}
|
||||
return &NamespaceA__NamespaceB.UnionInNestedNST{ Type: UnionInNestedNSTableInNestedNS, Value: x.UnPack() }
|
||||
}
|
||||
return nil
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class UnionInNestedNS {
|
||||
private UnionInNestedNS() { }
|
||||
public static final byte NONE = 0;
|
||||
public static final byte TableInNestedNS = 1;
|
||||
|
||||
public static final String[] names = { "NONE", "TableInNestedNS", };
|
||||
|
||||
public static String name(int e) { return names[e]; }
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB
|
||||
|
||||
@Suppress("unused")
|
||||
@ExperimentalUnsignedTypes
|
||||
class UnionInNestedNS private constructor() {
|
||||
companion object {
|
||||
const val NONE: UByte = 0u
|
||||
const val TableInNestedNS: UByte = 1u
|
||||
val names : Array<String> = arrayOf("NONE", "TableInNestedNS")
|
||||
fun name(e: Int) : String = names[e]
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
-- automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
-- namespace: NamespaceB
|
||||
|
||||
local UnionInNestedNS = {
|
||||
NONE = 0,
|
||||
TableInNestedNS = 1,
|
||||
}
|
||||
|
||||
return UnionInNestedNS -- return the module
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
namespace NamespaceA\NamespaceB;
|
||||
|
||||
class UnionInNestedNS
|
||||
{
|
||||
const NONE = 0;
|
||||
const TableInNestedNS = 1;
|
||||
|
||||
private static $names = array(
|
||||
UnionInNestedNS::NONE=>"NONE",
|
||||
UnionInNestedNS::TableInNestedNS=>"TableInNestedNS",
|
||||
);
|
||||
|
||||
public static function Name($e)
|
||||
{
|
||||
if (!isset(self::$names[$e])) {
|
||||
throw new \Exception();
|
||||
}
|
||||
return self::$names[$e];
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
# automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
class UnionInNestedNS(object):
|
||||
NONE = 0
|
||||
TableInNestedNS = 1
|
||||
|
||||
def UnionInNestedNSCreator(unionType, table):
|
||||
from flatbuffers.table import Table
|
||||
if not isinstance(table, Table):
|
||||
return None
|
||||
if unionType == UnionInNestedNS().TableInNestedNS:
|
||||
return TableInNestedNST.InitFromBuf(table.Bytes, table.Pos)
|
||||
return None
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
package NamespaceA.NamespaceB;
|
||||
|
||||
import com.google.flatbuffers.FlatBufferBuilder;
|
||||
|
||||
public class UnionInNestedNSUnion {
|
||||
private byte type;
|
||||
private Object value;
|
||||
|
||||
public byte getType() { return type; }
|
||||
|
||||
public void setType(byte type) { this.type = type; }
|
||||
|
||||
public Object getValue() { return value; }
|
||||
|
||||
public void setValue(Object value) { this.value = value; }
|
||||
|
||||
public UnionInNestedNSUnion() {
|
||||
this.type = UnionInNestedNS.NONE;
|
||||
this.value = null;
|
||||
}
|
||||
|
||||
public NamespaceA.NamespaceB.TableInNestedNST asTableInNestedNS() { return (NamespaceA.NamespaceB.TableInNestedNST) value; }
|
||||
|
||||
public static int pack(FlatBufferBuilder builder, UnionInNestedNSUnion _o) {
|
||||
switch (_o.type) {
|
||||
case UnionInNestedNS.TableInNestedNS: return NamespaceA.NamespaceB.TableInNestedNS.pack(builder, _o.asTableInNestedNS());
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user