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
c978b9ef
Commit
c978b9ef
authored
May 31, 2019
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enforce matching version in Java and C#.
Change-Id: I7f1f12f2f97e5227e0dabc2965ce66a6d41c229c
parent
3a88e103
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
55 additions
and
34 deletions
+55
-34
pom.xml
grpc/flatbuffers-java-grpc/pom.xml
+2
-2
pom.xml
grpc/pom.xml
+1
-1
pom.xml
grpc/tests/pom.xml
+2
-2
Constants.java
java/com/google/flatbuffers/Constants.java
+8
-0
FlatBufferConstants.cs
net/FlatBuffers/FlatBufferConstants.cs
+8
-0
pom.xml
pom.xml
+1
-1
idl_gen_general.cpp
src/idl_gen_general.cpp
+5
-0
Monster.cs
tests/MyGame/Example/Monster.cs
+1
-1
Monster.java
tests/MyGame/Example/Monster.java
+1
-1
Referrable.cs
tests/MyGame/Example/Referrable.cs
+1
-1
Referrable.java
tests/MyGame/Example/Referrable.java
+1
-1
Stat.cs
tests/MyGame/Example/Stat.cs
+1
-1
Stat.java
tests/MyGame/Example/Stat.java
+1
-1
TestSimpleTableWithEnum.cs
tests/MyGame/Example/TestSimpleTableWithEnum.cs
+1
-1
TestSimpleTableWithEnum.java
tests/MyGame/Example/TestSimpleTableWithEnum.java
+1
-1
TypeAliases.cs
tests/MyGame/Example/TypeAliases.cs
+1
-1
TypeAliases.java
tests/MyGame/Example/TypeAliases.java
+1
-1
Monster.cs
tests/MyGame/Example2/Monster.cs
+1
-1
Monster.java
tests/MyGame/Example2/Monster.java
+1
-1
InParentNamespace.cs
tests/MyGame/InParentNamespace.cs
+1
-1
InParentNamespace.java
tests/MyGame/InParentNamespace.java
+1
-1
MonsterExtra.cs
tests/MyGame/MonsterExtra.cs
+1
-1
MonsterExtra.java
tests/MyGame/MonsterExtra.java
+1
-1
TableInNestedNS.cs
...s/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs
+1
-1
TableInNestedNS.java
...namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java
+1
-1
SecondTableInA.cs
tests/namespace_test/NamespaceA/SecondTableInA.cs
+1
-1
SecondTableInA.java
tests/namespace_test/NamespaceA/SecondTableInA.java
+1
-1
TableInFirstNS.cs
tests/namespace_test/NamespaceA/TableInFirstNS.cs
+1
-1
TableInFirstNS.java
tests/namespace_test/NamespaceA/TableInFirstNS.java
+1
-1
TableInC.cs
tests/namespace_test/NamespaceC/TableInC.cs
+1
-1
TableInC.java
tests/namespace_test/NamespaceC/TableInC.java
+1
-1
Attacker.cs
tests/union_vector/Attacker.cs
+1
-1
Attacker.java
tests/union_vector/Attacker.java
+1
-1
Movie.cs
tests/union_vector/Movie.cs
+1
-1
Movie.java
tests/union_vector/Movie.java
+1
-1
No files found.
grpc/flatbuffers-java-grpc/pom.xml
View file @
c978b9ef
...
...
@@ -6,7 +6,7 @@
<parent>
<groupId>
com.google.flatbuffers
</groupId>
<artifactId>
flatbuffers-parent
</artifactId>
<version>
1.11.
0
</version>
<version>
1.11.
1
</version>
</parent>
<artifactId>
flatbuffers-java-grpc
</artifactId>
<name>
${project.artifactId}
</name>
...
...
@@ -24,7 +24,7 @@
</developer>
</developers>
<properties>
<gRPC.version>
1.11.
0
</gRPC.version>
<gRPC.version>
1.11.
1
</gRPC.version>
</properties>
<dependencies>
<dependency>
...
...
grpc/pom.xml
View file @
c978b9ef
...
...
@@ -4,7 +4,7 @@
<groupId>
com.google.flatbuffers
</groupId>
<artifactId>
flatbuffers-parent
</artifactId>
<packaging>
pom
</packaging>
<version>
1.11.
0
</version>
<version>
1.11.
1
</version>
<name>
flatbuffers-parent
</name>
<description>
parent pom for flatbuffers java artifacts
</description>
<properties>
...
...
grpc/tests/pom.xml
View file @
c978b9ef
...
...
@@ -4,13 +4,13 @@
<parent>
<groupId>
com.google.flatbuffers
</groupId>
<artifactId>
flatbuffers-parent
</artifactId>
<version>
1.11.
0
</version>
<version>
1.11.
1
</version>
</parent>
<artifactId>
grpc-test
</artifactId>
<description>
Example/Test project demonstrating usage of flatbuffers with GRPC-Java instead of protobufs
</description>
<properties>
<gRPC.version>
1.11.
0
</gRPC.version>
<gRPC.version>
1.11.
1
</gRPC.version>
</properties>
<dependencies>
<dependency>
...
...
java/com/google/flatbuffers/Constants.java
View file @
c978b9ef
...
...
@@ -39,6 +39,14 @@ public class Constants {
static
final
int
FILE_IDENTIFIER_LENGTH
=
4
;
/** The number of bytes in a size prefix. */
public
static
final
int
SIZE_PREFIX_LENGTH
=
4
;
/** A version identifier to force a compile error if someone
accidentally tries to build generated code with a runtime of
two mismatched version. Versions need to always match, as
the runtime and generated code are modified in sync.
Changes to the Java implementation need to be sure to change
the version here and in the code generator on every possible
incompatible change */
public
static
void
FLATBUFFERS_1_11_1
()
{}
}
/// @endcond
net/FlatBuffers/FlatBufferConstants.cs
View file @
c978b9ef
...
...
@@ -25,5 +25,13 @@ namespace FlatBuffers
{
public
const
int
FileIdentifierLength
=
4
;
public
const
int
SizePrefixLength
=
4
;
/** A version identifier to force a compile error if someone
accidentally tries to build generated code with a runtime of
two mismatched version. Versions need to always match, as
the runtime and generated code are modified in sync.
Changes to the C# implementation need to be sure to change
the version here and in the code generator on every possible
incompatible change */
public
static
void
FLATBUFFERS_1_11_1
()
{}
}
}
pom.xml
View file @
c978b9ef
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.google.flatbuffers
</groupId>
<artifactId>
flatbuffers-java
</artifactId>
<version>
1.11.1
-SNAPSHOT
</version>
<version>
1.11.1
</version>
<packaging>
bundle
</packaging>
<name>
FlatBuffers Java API
</name>
<description>
...
...
src/idl_gen_general.cpp
View file @
c978b9ef
...
...
@@ -848,6 +848,11 @@ class GeneralGenerator : public BaseGenerator {
// create method that allows object reuse
code
+=
method_signature
+
"(ByteBuffer _bb, "
+
struct_def
.
name
+
" obj) { "
;
// Force compile time error if not using the same version runtime.
if
(
lang_
.
language
==
IDLOptions
::
kCSharp
)
code
+=
"FlatBufferConstants.FLATBUFFERS_1_11_1(); "
;
else
code
+=
"Constants.FLATBUFFERS_1_11_1(); "
;
code
+=
lang_
.
set_bb_byteorder
;
code
+=
"return (obj.__assign(_bb."
+
FunctionStart
(
'G'
)
+
"etInt(_bb."
;
code
+=
lang_
.
get_bb_position
;
...
...
tests/MyGame/Example/Monster.cs
View file @
c978b9ef
...
...
@@ -14,7 +14,7 @@ public struct Monster : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
)
{
return
GetRootAsMonster
(
_bb
,
new
Monster
());
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
bool
MonsterBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
Table
.
__has_identifier
(
_bb
,
"MONS"
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Monster
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/Monster.java
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ import com.google.flatbuffers.*;
*/
public
final
class
Monster
extends
Table
{
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
)
{
return
getRootAsMonster
(
_bb
,
new
Monster
());
}
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
boolean
MonsterBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
__has_identifier
(
_bb
,
"MONS"
);
}
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
Monster
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/Referrable.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct Referrable : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Referrable
GetRootAsReferrable
(
ByteBuffer
_bb
)
{
return
GetRootAsReferrable
(
_bb
,
new
Referrable
());
}
public
static
Referrable
GetRootAsReferrable
(
ByteBuffer
_bb
,
Referrable
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Referrable
GetRootAsReferrable
(
ByteBuffer
_bb
,
Referrable
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Referrable
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/Referrable.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
Referrable
extends
Table
{
public
static
Referrable
getRootAsReferrable
(
ByteBuffer
_bb
)
{
return
getRootAsReferrable
(
_bb
,
new
Referrable
());
}
public
static
Referrable
getRootAsReferrable
(
ByteBuffer
_bb
,
Referrable
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Referrable
getRootAsReferrable
(
ByteBuffer
_bb
,
Referrable
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
Referrable
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/Stat.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct Stat : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Stat
GetRootAsStat
(
ByteBuffer
_bb
)
{
return
GetRootAsStat
(
_bb
,
new
Stat
());
}
public
static
Stat
GetRootAsStat
(
ByteBuffer
_bb
,
Stat
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Stat
GetRootAsStat
(
ByteBuffer
_bb
,
Stat
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Stat
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/Stat.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
Stat
extends
Table
{
public
static
Stat
getRootAsStat
(
ByteBuffer
_bb
)
{
return
getRootAsStat
(
_bb
,
new
Stat
());
}
public
static
Stat
getRootAsStat
(
ByteBuffer
_bb
,
Stat
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Stat
getRootAsStat
(
ByteBuffer
_bb
,
Stat
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
Stat
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/TestSimpleTableWithEnum.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ internal partial struct TestSimpleTableWithEnum : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
TestSimpleTableWithEnum
GetRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
)
{
return
GetRootAsTestSimpleTableWithEnum
(
_bb
,
new
TestSimpleTableWithEnum
());
}
public
static
TestSimpleTableWithEnum
GetRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
,
TestSimpleTableWithEnum
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
TestSimpleTableWithEnum
GetRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
,
TestSimpleTableWithEnum
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
TestSimpleTableWithEnum
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/TestSimpleTableWithEnum.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
final
class
TestSimpleTableWithEnum
extends
Table
{
public
static
TestSimpleTableWithEnum
getRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
)
{
return
getRootAsTestSimpleTableWithEnum
(
_bb
,
new
TestSimpleTableWithEnum
());
}
public
static
TestSimpleTableWithEnum
getRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
,
TestSimpleTableWithEnum
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
TestSimpleTableWithEnum
getRootAsTestSimpleTableWithEnum
(
ByteBuffer
_bb
,
TestSimpleTableWithEnum
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
TestSimpleTableWithEnum
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/TypeAliases.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct TypeAliases : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
TypeAliases
GetRootAsTypeAliases
(
ByteBuffer
_bb
)
{
return
GetRootAsTypeAliases
(
_bb
,
new
TypeAliases
());
}
public
static
TypeAliases
GetRootAsTypeAliases
(
ByteBuffer
_bb
,
TypeAliases
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
TypeAliases
GetRootAsTypeAliases
(
ByteBuffer
_bb
,
TypeAliases
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
TypeAliases
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example/TypeAliases.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
TypeAliases
extends
Table
{
public
static
TypeAliases
getRootAsTypeAliases
(
ByteBuffer
_bb
)
{
return
getRootAsTypeAliases
(
_bb
,
new
TypeAliases
());
}
public
static
TypeAliases
getRootAsTypeAliases
(
ByteBuffer
_bb
,
TypeAliases
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
TypeAliases
getRootAsTypeAliases
(
ByteBuffer
_bb
,
TypeAliases
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
TypeAliases
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example2/Monster.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct Monster : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
)
{
return
GetRootAsMonster
(
_bb
,
new
Monster
());
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Monster
GetRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Monster
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/Example2/Monster.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
Monster
extends
Table
{
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
)
{
return
getRootAsMonster
(
_bb
,
new
Monster
());
}
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Monster
getRootAsMonster
(
ByteBuffer
_bb
,
Monster
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
Monster
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/InParentNamespace.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct InParentNamespace : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
InParentNamespace
GetRootAsInParentNamespace
(
ByteBuffer
_bb
)
{
return
GetRootAsInParentNamespace
(
_bb
,
new
InParentNamespace
());
}
public
static
InParentNamespace
GetRootAsInParentNamespace
(
ByteBuffer
_bb
,
InParentNamespace
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
InParentNamespace
GetRootAsInParentNamespace
(
ByteBuffer
_bb
,
InParentNamespace
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
InParentNamespace
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/InParentNamespace.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
InParentNamespace
extends
Table
{
public
static
InParentNamespace
getRootAsInParentNamespace
(
ByteBuffer
_bb
)
{
return
getRootAsInParentNamespace
(
_bb
,
new
InParentNamespace
());
}
public
static
InParentNamespace
getRootAsInParentNamespace
(
ByteBuffer
_bb
,
InParentNamespace
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
InParentNamespace
getRootAsInParentNamespace
(
ByteBuffer
_bb
,
InParentNamespace
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
InParentNamespace
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/MonsterExtra.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct MonsterExtra : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
MonsterExtra
GetRootAsMonsterExtra
(
ByteBuffer
_bb
)
{
return
GetRootAsMonsterExtra
(
_bb
,
new
MonsterExtra
());
}
public
static
MonsterExtra
GetRootAsMonsterExtra
(
ByteBuffer
_bb
,
MonsterExtra
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
MonsterExtra
GetRootAsMonsterExtra
(
ByteBuffer
_bb
,
MonsterExtra
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
bool
MonsterExtraBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
Table
.
__has_identifier
(
_bb
,
"MONE"
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
MonsterExtra
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/MyGame/MonsterExtra.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
MonsterExtra
extends
Table
{
public
static
MonsterExtra
getRootAsMonsterExtra
(
ByteBuffer
_bb
)
{
return
getRootAsMonsterExtra
(
_bb
,
new
MonsterExtra
());
}
public
static
MonsterExtra
getRootAsMonsterExtra
(
ByteBuffer
_bb
,
MonsterExtra
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
MonsterExtra
getRootAsMonsterExtra
(
ByteBuffer
_bb
,
MonsterExtra
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
boolean
MonsterExtraBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
__has_identifier
(
_bb
,
"MONE"
);
}
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
MonsterExtra
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct TableInNestedNS : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
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
static
TableInNestedNS
GetRootAsTableInNestedNS
(
ByteBuffer
_bb
,
TableInNestedNS
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
TableInNestedNS
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
TableInNestedNS
extends
Table
{
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
static
TableInNestedNS
getRootAsTableInNestedNS
(
ByteBuffer
_bb
,
TableInNestedNS
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
TableInNestedNS
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/SecondTableInA.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct SecondTableInA : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
SecondTableInA
GetRootAsSecondTableInA
(
ByteBuffer
_bb
)
{
return
GetRootAsSecondTableInA
(
_bb
,
new
SecondTableInA
());
}
public
static
SecondTableInA
GetRootAsSecondTableInA
(
ByteBuffer
_bb
,
SecondTableInA
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
SecondTableInA
GetRootAsSecondTableInA
(
ByteBuffer
_bb
,
SecondTableInA
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
SecondTableInA
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/SecondTableInA.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
SecondTableInA
extends
Table
{
public
static
SecondTableInA
getRootAsSecondTableInA
(
ByteBuffer
_bb
)
{
return
getRootAsSecondTableInA
(
_bb
,
new
SecondTableInA
());
}
public
static
SecondTableInA
getRootAsSecondTableInA
(
ByteBuffer
_bb
,
SecondTableInA
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
SecondTableInA
getRootAsSecondTableInA
(
ByteBuffer
_bb
,
SecondTableInA
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
SecondTableInA
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/TableInFirstNS.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct TableInFirstNS : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
TableInFirstNS
GetRootAsTableInFirstNS
(
ByteBuffer
_bb
)
{
return
GetRootAsTableInFirstNS
(
_bb
,
new
TableInFirstNS
());
}
public
static
TableInFirstNS
GetRootAsTableInFirstNS
(
ByteBuffer
_bb
,
TableInFirstNS
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
TableInFirstNS
GetRootAsTableInFirstNS
(
ByteBuffer
_bb
,
TableInFirstNS
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
TableInFirstNS
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceA/TableInFirstNS.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
TableInFirstNS
extends
Table
{
public
static
TableInFirstNS
getRootAsTableInFirstNS
(
ByteBuffer
_bb
)
{
return
getRootAsTableInFirstNS
(
_bb
,
new
TableInFirstNS
());
}
public
static
TableInFirstNS
getRootAsTableInFirstNS
(
ByteBuffer
_bb
,
TableInFirstNS
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
TableInFirstNS
getRootAsTableInFirstNS
(
ByteBuffer
_bb
,
TableInFirstNS
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
TableInFirstNS
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceC/TableInC.cs
View file @
c978b9ef
...
...
@@ -13,7 +13,7 @@ public struct TableInC : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
TableInC
GetRootAsTableInC
(
ByteBuffer
_bb
)
{
return
GetRootAsTableInC
(
_bb
,
new
TableInC
());
}
public
static
TableInC
GetRootAsTableInC
(
ByteBuffer
_bb
,
TableInC
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
TableInC
GetRootAsTableInC
(
ByteBuffer
_bb
,
TableInC
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
TableInC
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/namespace_test/NamespaceC/TableInC.java
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
TableInC
extends
Table
{
public
static
TableInC
getRootAsTableInC
(
ByteBuffer
_bb
)
{
return
getRootAsTableInC
(
_bb
,
new
TableInC
());
}
public
static
TableInC
getRootAsTableInC
(
ByteBuffer
_bb
,
TableInC
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
TableInC
getRootAsTableInC
(
ByteBuffer
_bb
,
TableInC
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
TableInC
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/union_vector/Attacker.cs
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ public struct Attacker : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Attacker
GetRootAsAttacker
(
ByteBuffer
_bb
)
{
return
GetRootAsAttacker
(
_bb
,
new
Attacker
());
}
public
static
Attacker
GetRootAsAttacker
(
ByteBuffer
_bb
,
Attacker
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Attacker
GetRootAsAttacker
(
ByteBuffer
_bb
,
Attacker
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Attacker
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/union_vector/Attacker.java
View file @
c978b9ef
...
...
@@ -8,7 +8,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
Attacker
extends
Table
{
public
static
Attacker
getRootAsAttacker
(
ByteBuffer
_bb
)
{
return
getRootAsAttacker
(
_bb
,
new
Attacker
());
}
public
static
Attacker
getRootAsAttacker
(
ByteBuffer
_bb
,
Attacker
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Attacker
getRootAsAttacker
(
ByteBuffer
_bb
,
Attacker
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
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
Attacker
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/union_vector/Movie.cs
View file @
c978b9ef
...
...
@@ -10,7 +10,7 @@ public struct Movie : IFlatbufferObject
private
Table
__p
;
public
ByteBuffer
ByteBuffer
{
get
{
return
__p
.
bb
;
}
}
public
static
Movie
GetRootAsMovie
(
ByteBuffer
_bb
)
{
return
GetRootAsMovie
(
_bb
,
new
Movie
());
}
public
static
Movie
GetRootAsMovie
(
ByteBuffer
_bb
,
Movie
obj
)
{
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
Movie
GetRootAsMovie
(
ByteBuffer
_bb
,
Movie
obj
)
{
FlatBufferConstants
.
FLATBUFFERS_1_11_1
();
return
(
obj
.
__assign
(
_bb
.
GetInt
(
_bb
.
Position
)
+
_bb
.
Position
,
_bb
));
}
public
static
bool
MovieBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
Table
.
__has_identifier
(
_bb
,
"MOVI"
);
}
public
void
__init
(
int
_i
,
ByteBuffer
_bb
)
{
__p
.
bb_pos
=
_i
;
__p
.
bb
=
_bb
;
}
public
Movie
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
tests/union_vector/Movie.java
View file @
c978b9ef
...
...
@@ -8,7 +8,7 @@ import com.google.flatbuffers.*;
@SuppressWarnings
(
"unused"
)
public
final
class
Movie
extends
Table
{
public
static
Movie
getRootAsMovie
(
ByteBuffer
_bb
)
{
return
getRootAsMovie
(
_bb
,
new
Movie
());
}
public
static
Movie
getRootAsMovie
(
ByteBuffer
_bb
,
Movie
obj
)
{
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
Movie
getRootAsMovie
(
ByteBuffer
_bb
,
Movie
obj
)
{
Constants
.
FLATBUFFERS_1_11_1
();
_bb
.
order
(
ByteOrder
.
LITTLE_ENDIAN
);
return
(
obj
.
__assign
(
_bb
.
getInt
(
_bb
.
position
())
+
_bb
.
position
(),
_bb
));
}
public
static
boolean
MovieBufferHasIdentifier
(
ByteBuffer
_bb
)
{
return
__has_identifier
(
_bb
,
"MOVI"
);
}
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
Movie
__assign
(
int
_i
,
ByteBuffer
_bb
)
{
__init
(
_i
,
_bb
);
return
this
;
}
...
...
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