mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 13:00:01 +00:00
Made sure all namespace test files get generated.
Also included them in the C++ test. Change-Id: Ib0c8470f0aacdf16616c27494abdda57a010195d Tested: on Linux.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# automatically generated, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
class EnumInNestedNS(object):
|
||||
A = 0
|
||||
B = 1
|
||||
C = 2
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
using System;
|
||||
using FlatBuffers;
|
||||
|
||||
public sealed class StructInNestedNS : Struct {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# automatically generated, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
import flatbuffers
|
||||
|
||||
class StructInNestedNS(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
# 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()
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace NamespaceA.NamespaceB
|
||||
{
|
||||
|
||||
using System;
|
||||
using FlatBuffers;
|
||||
|
||||
public sealed class TableInNestedNS : Table {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# automatically generated, do not modify
|
||||
|
||||
# namespace: NamespaceB
|
||||
|
||||
import flatbuffers
|
||||
|
||||
class TableInNestedNS(object):
|
||||
__slots__ = ['_tab']
|
||||
|
||||
# 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 TableInNestedNSAddFoo(builder, foo): builder.PrependInt32Slot(0, foo, 0)
|
||||
def TableInNestedNSEnd(builder): return builder.EndObject()
|
||||
Reference in New Issue
Block a user