diff options
Diffstat (limited to 'tests/MyGame')
-rw-r--r-- | tests/MyGame/Example/Monster.go | 7 | ||||
-rw-r--r-- | tests/MyGame/Example/Referrable.go | 7 | ||||
-rw-r--r-- | tests/MyGame/Example/Stat.go | 7 | ||||
-rw-r--r-- | tests/MyGame/Example/TestSimpleTableWithEnum.go | 7 | ||||
-rw-r--r-- | tests/MyGame/Example/TypeAliases.go | 7 | ||||
-rw-r--r-- | tests/MyGame/Example2/Monster.go | 7 | ||||
-rw-r--r-- | tests/MyGame/InParentNamespace.go | 7 |
7 files changed, 49 insertions, 0 deletions
diff --git a/tests/MyGame/Example/Monster.go b/tests/MyGame/Example/Monster.go index 7db88a9c..b3472710 100644 --- a/tests/MyGame/Example/Monster.go +++ b/tests/MyGame/Example/Monster.go @@ -442,6 +442,13 @@ func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { return x } +func GetSizePrefixedRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Monster{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example/Referrable.go b/tests/MyGame/Example/Referrable.go index 8f21e910..66c59729 100644 --- a/tests/MyGame/Example/Referrable.go +++ b/tests/MyGame/Example/Referrable.go @@ -39,6 +39,13 @@ func GetRootAsReferrable(buf []byte, offset flatbuffers.UOffsetT) *Referrable { return x } +func GetSizePrefixedRootAsReferrable(buf []byte, offset flatbuffers.UOffsetT) *Referrable { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Referrable{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *Referrable) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example/Stat.go b/tests/MyGame/Example/Stat.go index 6034e01c..5c060d1a 100644 --- a/tests/MyGame/Example/Stat.go +++ b/tests/MyGame/Example/Stat.go @@ -46,6 +46,13 @@ func GetRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat { return x } +func GetSizePrefixedRootAsStat(buf []byte, offset flatbuffers.UOffsetT) *Stat { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Stat{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *Stat) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example/TestSimpleTableWithEnum.go b/tests/MyGame/Example/TestSimpleTableWithEnum.go index 14805af7..b8cde12b 100644 --- a/tests/MyGame/Example/TestSimpleTableWithEnum.go +++ b/tests/MyGame/Example/TestSimpleTableWithEnum.go @@ -39,6 +39,13 @@ func GetRootAsTestSimpleTableWithEnum(buf []byte, offset flatbuffers.UOffsetT) * return x } +func GetSizePrefixedRootAsTestSimpleTableWithEnum(buf []byte, offset flatbuffers.UOffsetT) *TestSimpleTableWithEnum { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &TestSimpleTableWithEnum{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *TestSimpleTableWithEnum) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example/TypeAliases.go b/tests/MyGame/Example/TypeAliases.go index 1c259aa5..d018fa1f 100644 --- a/tests/MyGame/Example/TypeAliases.go +++ b/tests/MyGame/Example/TypeAliases.go @@ -98,6 +98,13 @@ func GetRootAsTypeAliases(buf []byte, offset flatbuffers.UOffsetT) *TypeAliases return x } +func GetSizePrefixedRootAsTypeAliases(buf []byte, offset flatbuffers.UOffsetT) *TypeAliases { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &TypeAliases{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *TypeAliases) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example2/Monster.go b/tests/MyGame/Example2/Monster.go index 33309f8b..792011f2 100644 --- a/tests/MyGame/Example2/Monster.go +++ b/tests/MyGame/Example2/Monster.go @@ -36,6 +36,13 @@ func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { return x } +func GetSizePrefixedRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &Monster{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/InParentNamespace.go b/tests/MyGame/InParentNamespace.go index 9c5adf72..2c4a4e0e 100644 --- a/tests/MyGame/InParentNamespace.go +++ b/tests/MyGame/InParentNamespace.go @@ -36,6 +36,13 @@ func GetRootAsInParentNamespace(buf []byte, offset flatbuffers.UOffsetT) *InPare return x } +func GetSizePrefixedRootAsInParentNamespace(buf []byte, offset flatbuffers.UOffsetT) *InParentNamespace { + n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) + x := &InParentNamespace{} + x.Init(buf, n+offset+flatbuffers.SizeUint32) + return x +} + func (rcv *InParentNamespace) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i |