Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
b9efbf6a
Commit
b9efbf6a
authored
Dec 22, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed more Windows build errors.
Change-Id: I556e1c103e8501dc144b16c8698463253de6f4fb
parent
13194ece
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
3 deletions
+23
-3
monster_generated.h
samples/monster_generated.h
+1
-1
idl_gen_cpp.cpp
src/idl_gen_cpp.cpp
+1
-1
monster_test.bfbs
tests/monster_test.bfbs
+0
-0
monster_test_generated.h
tests/monster_test_generated.h
+1
-1
StructInNestedNS.go
.../namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
+4
-0
TableInNestedNS.go
...s/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go
+4
-0
SecondTableInA.go
tests/namespace_test/NamespaceA/SecondTableInA.go
+4
-0
TableInFirstNS.go
tests/namespace_test/NamespaceA/TableInFirstNS.go
+4
-0
TableInC.go
tests/namespace_test/NamespaceC/TableInC.go
+4
-0
No files found.
samples/monster_generated.h
View file @
b9efbf6a
...
...
@@ -56,7 +56,7 @@ template<> struct EquipmentTraits<Weapon> {
struct
EquipmentUnion
{
Equipment
type
;
flatbuffers
::
NativeTable
*
table
=
nullptr
;
flatbuffers
::
NativeTable
*
table
;
EquipmentUnion
()
:
type
(
Equipment_NONE
),
table
(
nullptr
)
{}
EquipmentUnion
(
const
EquipmentUnion
&
);
EquipmentUnion
&
operator
=
(
const
EquipmentUnion
&
);
...
...
src/idl_gen_cpp.cpp
View file @
b9efbf6a
...
...
@@ -526,7 +526,7 @@ class CppGenerator : public BaseGenerator {
// Generate a union type
code
+=
"struct "
+
enum_def
.
name
+
"Union {
\n
"
;
code
+=
" "
+
enum_def
.
name
+
" type;
\n\n
"
;
code
+=
" flatbuffers::NativeTable *table
= nullptr
;
\n
"
;
code
+=
" flatbuffers::NativeTable *table;
\n
"
;
code
+=
" "
+
enum_def
.
name
+
"Union() : type("
;
code
+=
GetEnumValUse
(
enum_def
,
*
enum_def
.
vals
.
Lookup
(
"NONE"
),
parser_
.
opts
);
code
+=
"), table(nullptr) {}
\n
"
;
...
...
tests/monster_test.bfbs
View file @
b9efbf6a
No preview for this file type
tests/monster_test_generated.h
View file @
b9efbf6a
...
...
@@ -78,7 +78,7 @@ template<> struct AnyTraits<MyGame::Example2::Monster> {
struct
AnyUnion
{
Any
type
;
flatbuffers
::
NativeTable
*
table
=
nullptr
;
flatbuffers
::
NativeTable
*
table
;
AnyUnion
()
:
type
(
Any_NONE
),
table
(
nullptr
)
{}
AnyUnion
(
const
AnyUnion
&
);
AnyUnion
&
operator
=
(
const
AnyUnion
&
);
...
...
tests/namespace_test/NamespaceA/NamespaceB/StructInNestedNS.go
View file @
b9efbf6a
...
...
@@ -15,6 +15,10 @@ func (rcv *StructInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
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
))
}
...
...
tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go
View file @
b9efbf6a
...
...
@@ -22,6 +22,10 @@ func (rcv *TableInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) {
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
{
...
...
tests/namespace_test/NamespaceA/SecondTableInA.go
View file @
b9efbf6a
...
...
@@ -22,6 +22,10 @@ func (rcv *SecondTableInA) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv
.
_tab
.
Pos
=
i
}
func
(
rcv
*
SecondTableInA
)
Table
()
flatbuffers
.
Table
{
return
rcv
.
_tab
}
func
(
rcv
*
SecondTableInA
)
ReferToC
(
obj
*
TableInC
)
*
TableInC
{
o
:=
flatbuffers
.
UOffsetT
(
rcv
.
_tab
.
Offset
(
4
))
if
o
!=
0
{
...
...
tests/namespace_test/NamespaceA/TableInFirstNS.go
View file @
b9efbf6a
...
...
@@ -22,6 +22,10 @@ func (rcv *TableInFirstNS) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv
.
_tab
.
Pos
=
i
}
func
(
rcv
*
TableInFirstNS
)
Table
()
flatbuffers
.
Table
{
return
rcv
.
_tab
}
func
(
rcv
*
TableInFirstNS
)
FooTable
(
obj
*
TableInNestedNS
)
*
TableInNestedNS
{
o
:=
flatbuffers
.
UOffsetT
(
rcv
.
_tab
.
Offset
(
4
))
if
o
!=
0
{
...
...
tests/namespace_test/NamespaceC/TableInC.go
View file @
b9efbf6a
...
...
@@ -22,6 +22,10 @@ func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv
.
_tab
.
Pos
=
i
}
func
(
rcv
*
TableInC
)
Table
()
flatbuffers
.
Table
{
return
rcv
.
_tab
}
func
(
rcv
*
TableInC
)
ReferToA1
(
obj
*
TableInFirstNS
)
*
TableInFirstNS
{
o
:=
flatbuffers
.
UOffsetT
(
rcv
.
_tab
.
Offset
(
4
))
if
o
!=
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment