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
123c7a48
Commit
123c7a48
authored
Jun 20, 2019
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated missing generated code for PR #5313 (fixed arrays)
Change-Id: I249140119e6241beb5aec5670d0e5ccddc8f5251
parent
e635141d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
8 deletions
+10
-8
ArrayStruct.cs
tests/MyGame/Example/ArrayStruct.cs
+1
-1
ArrayStruct.java
tests/MyGame/Example/ArrayStruct.java
+1
-1
ArrayTable.cs
tests/MyGame/Example/ArrayTable.cs
+3
-2
ArrayTable.java
tests/MyGame/Example/ArrayTable.java
+3
-2
NestedStruct.cs
tests/MyGame/Example/NestedStruct.cs
+1
-1
NestedStruct.java
tests/MyGame/Example/NestedStruct.java
+1
-1
No files found.
tests/MyGame/Example/ArrayStruct.cs
View file @
123c7a48
...
...
@@ -12,7 +12,7 @@ public struct ArrayStruct : IFlatbufferObject
{
private
Struct
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
=
new
Struct
(
_i
,
_bb
)
;
}
public
ArrayStruct
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
float
A
{
get
{
return
__p
.
bb
.
GetFloat
(
__p
.
bb_pos
+
0
);
}
}
...
...
tests/MyGame/Example/ArrayStruct.java
View file @
123c7a48
...
...
@@ -9,7 +9,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
ArrayStruct
extends
Struct
{
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
bb_pos
=
_i
;
bb
=
_bb
;
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__reset
(
_i
,
_bb
)
;
}
public
ArrayStruct
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
float
a
()
{
return
bb
.
getFloat
(
bb_pos
+
0
);
}
...
...
tests/MyGame/Example/ArrayTable.cs
View file @
123c7a48
...
...
@@ -12,10 +12,11 @@ public struct ArrayTable : IFlatbufferObject
{
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
void
ValidateVersion
()
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
}
public
static
ArrayTable
GetRootAsArrayTable
(
ByteBuffer
_bb
)
{
return
GetRootAsArrayTable
(
_bb
,
new
ArrayTable
());
}
public
static
ArrayTable
GetRootAsArrayTable
(
ByteBuffer
_bb
,
ArrayTable
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
ArrayTable
GetRootAsArrayTable
(
ByteBuffer
_bb
,
ArrayTable
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
bool
ArrayTableBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
Table
.
__has_identifier
(
_bb
,
"ARRT"
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
=
new
Table
(
_i
,
_bb
)
;
}
public
ArrayTable
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
MyGame
.
Example
.
ArrayStruct
?
A
{
get
{
int
o
=
__p
.
__offset
(
4
);
return
o
!=
0
?
(
MyGame
.
Example
.
ArrayStruct
?)(
new
MyGame
.
Example
.
ArrayStruct
()).
__assign
(
o
+
__p
.
bb_pos
,
__p
.
bb
)
:
null
;
}
}
...
...
tests/MyGame/Example/ArrayTable.java
View file @
123c7a48
...
...
@@ -9,10 +9,11 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
ArrayTable
extends
Table
{
public
static
void
ValidateVersion
()
{
Constants
.
FLATBUFFERS_1_11_1
();
}
public
static
ArrayTable
getRootAsArrayTable
(
ByteBuffer
_bb
)
{
return
getRootAsArrayTable
(
_bb
,
new
ArrayTable
());
}
public
static
ArrayTable
getRootAsArrayTable
(
ByteBuffer
_bb
,
ArrayTable
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
ArrayTable
getRootAsArrayTable
(
ByteBuffer
_bb
,
ArrayTable
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
boolean
ArrayTableBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
__has_identifier
(
_bb
,
"ARRT"
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
bb_pos
=
_i
;
bb
=
_bb
;
vtable_start
=
bb_pos
-
bb
.
getInt
(
bb_pos
);
vtable_size
=
bb
.
getShort
(
vtable_start
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__reset
(
_i
,
_bb
);
}
public
ArrayTable
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
MyGame
.
Example
.
ArrayStruct
a
()
{
return
a
(
new
MyGame
.
Example
.
ArrayStruct
());
}
...
...
tests/MyGame/Example/NestedStruct.cs
View file @
123c7a48
...
...
@@ -12,7 +12,7 @@ public struct NestedStruct : IFlatbufferObject
{
private
Struct
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
=
new
Struct
(
_i
,
_bb
)
;
}
public
NestedStruct
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
int
A
(
int
j
)
{
return
__p
.
bb
.
GetInt
(
__p
.
bb_pos
+
0
+
j
*
4
);
}
...
...
tests/MyGame/Example/NestedStruct.java
View file @
123c7a48
...
...
@@ -9,7 +9,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
NestedStruct
extends
Struct
{
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
bb_pos
=
_i
;
bb
=
_bb
;
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__reset
(
_i
,
_bb
)
;
}
public
NestedStruct
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
public
int
a
(
int
j
)
{
return
bb
.
getInt
(
bb_pos
+
0
+
j
*
4
);
}
...
...
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