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
d3429187
Commit
d3429187
authored
Nov 21, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/google/flatbuffers
Change-Id: I02b00b22cdd2d1bd32de3273ff69185c9b0f4e5b
parents
c4377390
dbecdf20
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
62 deletions
+70
-62
.gitignore
.gitignore
+1
-0
FlatbufferBuilder.php
php/FlatbufferBuilder.php
+4
-0
idl_gen_js.cpp
src/idl_gen_js.cpp
+2
-2
idl_parser.cpp
src/idl_parser.cpp
+3
-0
monster_test_generated.js
tests/monster_test_generated.js
+52
-52
namespace_test1_generated.js
tests/namespace_test/namespace_test1_generated.js
+6
-6
namespace_test2_generated.js
tests/namespace_test/namespace_test2_generated.js
+2
-2
No files found.
.gitignore
View file @
d3429187
...
...
@@ -65,3 +65,4 @@ build/VS2010/FlatBuffers.sdf
build/VS2010/FlatBuffers.opensdf
build/VS2010/ipch/**/*.ipch
*.so
Testing/Temporary
php/FlatbufferBuilder.php
View file @
d3429187
...
...
@@ -593,6 +593,10 @@ class FlatbufferBuilder
protected
function
is_utf8
(
$bytes
)
{
if
(
function_exists
(
'mb_detect_encoding'
))
{
return
(
bool
)
mb_detect_encoding
(
$bytes
,
'UTF-8'
,
true
);
}
$len
=
strlen
(
$bytes
);
if
(
$len
<
1
)
{
/* NOTE: always return 1 when passed string is null */
...
...
src/idl_gen_js.cpp
View file @
d3429187
...
...
@@ -557,13 +557,13 @@ void GenStruct(const Parser &parser, StructDef &struct_def, std::string *code_pt
"@returns {boolean}"
);
code
+=
object_name
+
".prototype.mutate_"
+
field
.
name
+
" = function(value) {
\n
"
;
code
+=
" var offset = this.bb.__offset(this.bb_pos, "
+
NumToString
(
field
.
value
.
offset
)
+
")
\n\n
"
;
code
+=
" var offset = this.bb.__offset(this.bb_pos, "
+
NumToString
(
field
.
value
.
offset
)
+
")
;
\n\n
"
;
code
+=
" if (offset === 0) {
\n
"
;
code
+=
" return false;
\n
"
;
code
+=
" }
\n\n
"
;
code
+=
" this.bb.write"
+
MakeCamel
(
GenType
(
field
.
value
.
type
))
+
"(this.bb_pos + offset, value);
\n
"
;
code
+=
" return true;
\n
"
;
code
+=
"}
\n\n
"
;
code
+=
"}
;
\n\n
"
;
}
// Emit vector helpers
...
...
src/idl_parser.cpp
View file @
d3429187
...
...
@@ -1758,6 +1758,9 @@ CheckedError Parser::SkipAnyJsonValue() {
case
kTokenFloatConstant
:
EXPECT
(
kTokenFloatConstant
);
break
;
case
kTokenNull
:
EXPECT
(
kTokenNull
);
break
;
default
:
return
Error
(
std
::
string
(
"Unexpected token:"
)
+
std
::
string
(
1
,
static_cast
<
char
>
(
token_
)));
}
...
...
tests/monster_test_generated.js
View file @
d3429187
...
...
@@ -132,7 +132,7 @@ MyGame.Example.Test.prototype.a = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Test
.
prototype
.
mutate_a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -140,7 +140,7 @@ MyGame.Example.Test.prototype.mutate_a = function(value) {
this
.
bb
.
writeInt16
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -154,7 +154,7 @@ MyGame.Example.Test.prototype.b = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Test
.
prototype
.
mutate_b
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
2
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
2
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -162,7 +162,7 @@ MyGame.Example.Test.prototype.mutate_b = function(value) {
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Builder} builder
...
...
@@ -226,7 +226,7 @@ MyGame.Example.TestSimpleTableWithEnum.prototype.color = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
TestSimpleTableWithEnum
.
prototype
.
mutate_color
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -234,7 +234,7 @@ MyGame.Example.TestSimpleTableWithEnum.prototype.mutate_color = function(value)
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Builder} builder
...
...
@@ -298,7 +298,7 @@ MyGame.Example.Vec3.prototype.x = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Vec3
.
prototype
.
mutate_x
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -306,7 +306,7 @@ MyGame.Example.Vec3.prototype.mutate_x = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -320,7 +320,7 @@ MyGame.Example.Vec3.prototype.y = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Vec3
.
prototype
.
mutate_y
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -328,7 +328,7 @@ MyGame.Example.Vec3.prototype.mutate_y = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -342,7 +342,7 @@ MyGame.Example.Vec3.prototype.z = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Vec3
.
prototype
.
mutate_z
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -350,7 +350,7 @@ MyGame.Example.Vec3.prototype.mutate_z = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -364,7 +364,7 @@ MyGame.Example.Vec3.prototype.test1 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Vec3
.
prototype
.
mutate_test1
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
16
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
16
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -372,7 +372,7 @@ MyGame.Example.Vec3.prototype.mutate_test1 = function(value) {
this
.
bb
.
writeFloat64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {MyGame.Example.Color}
...
...
@@ -386,7 +386,7 @@ MyGame.Example.Vec3.prototype.test2 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Vec3
.
prototype
.
mutate_test2
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
24
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
24
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -394,7 +394,7 @@ MyGame.Example.Vec3.prototype.mutate_test2 = function(value) {
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {MyGame.Example.Test=} obj
...
...
@@ -489,7 +489,7 @@ MyGame.Example.Stat.prototype.val = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Stat
.
prototype
.
mutate_val
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -497,7 +497,7 @@ MyGame.Example.Stat.prototype.mutate_val = function(value) {
this
.
bb
.
writeInt64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -512,7 +512,7 @@ MyGame.Example.Stat.prototype.count = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Stat
.
prototype
.
mutate_count
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -520,7 +520,7 @@ MyGame.Example.Stat.prototype.mutate_count = function(value) {
this
.
bb
.
writeUint16
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Builder} builder
...
...
@@ -629,7 +629,7 @@ MyGame.Example.Monster.prototype.mana = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_mana
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -637,7 +637,7 @@ MyGame.Example.Monster.prototype.mutate_mana = function(value) {
this
.
bb
.
writeInt16
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -652,7 +652,7 @@ MyGame.Example.Monster.prototype.hp = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_hp
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
8
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -660,7 +660,7 @@ MyGame.Example.Monster.prototype.mutate_hp = function(value) {
this
.
bb
.
writeInt16
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Encoding=} optionalEncoding
...
...
@@ -709,7 +709,7 @@ MyGame.Example.Monster.prototype.color = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_color
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
16
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
16
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -717,7 +717,7 @@ MyGame.Example.Monster.prototype.mutate_color = function(value) {
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {MyGame.Example.Any}
...
...
@@ -732,7 +732,7 @@ MyGame.Example.Monster.prototype.testType = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_test_type
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
18
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
18
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -740,7 +740,7 @@ MyGame.Example.Monster.prototype.mutate_test_type = function(value) {
this
.
bb
.
writeUint8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Table} obj
...
...
@@ -864,7 +864,7 @@ MyGame.Example.Monster.prototype.testbool = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testbool
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
34
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
34
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -872,7 +872,7 @@ MyGame.Example.Monster.prototype.mutate_testbool = function(value) {
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -887,7 +887,7 @@ MyGame.Example.Monster.prototype.testhashs32Fnv1 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashs32_fnv1
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
36
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
36
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -895,7 +895,7 @@ MyGame.Example.Monster.prototype.mutate_testhashs32_fnv1 = function(value) {
this
.
bb
.
writeInt32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -910,7 +910,7 @@ MyGame.Example.Monster.prototype.testhashu32Fnv1 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashu32_fnv1
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
38
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
38
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -918,7 +918,7 @@ MyGame.Example.Monster.prototype.mutate_testhashu32_fnv1 = function(value) {
this
.
bb
.
writeUint32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {flatbuffers.Long}
...
...
@@ -933,7 +933,7 @@ MyGame.Example.Monster.prototype.testhashs64Fnv1 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashs64_fnv1
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
40
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
40
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -941,7 +941,7 @@ MyGame.Example.Monster.prototype.mutate_testhashs64_fnv1 = function(value) {
this
.
bb
.
writeInt64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {flatbuffers.Long}
...
...
@@ -956,7 +956,7 @@ MyGame.Example.Monster.prototype.testhashu64Fnv1 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashu64_fnv1
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
42
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
42
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -964,7 +964,7 @@ MyGame.Example.Monster.prototype.mutate_testhashu64_fnv1 = function(value) {
this
.
bb
.
writeUint64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -979,7 +979,7 @@ MyGame.Example.Monster.prototype.testhashs32Fnv1a = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashs32_fnv1a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
44
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
44
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -987,7 +987,7 @@ MyGame.Example.Monster.prototype.mutate_testhashs32_fnv1a = function(value) {
this
.
bb
.
writeInt32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -1002,7 +1002,7 @@ MyGame.Example.Monster.prototype.testhashu32Fnv1a = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashu32_fnv1a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
46
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
46
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1010,7 +1010,7 @@ MyGame.Example.Monster.prototype.mutate_testhashu32_fnv1a = function(value) {
this
.
bb
.
writeUint32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {flatbuffers.Long}
...
...
@@ -1025,7 +1025,7 @@ MyGame.Example.Monster.prototype.testhashs64Fnv1a = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashs64_fnv1a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
48
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
48
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1033,7 +1033,7 @@ MyGame.Example.Monster.prototype.mutate_testhashs64_fnv1a = function(value) {
this
.
bb
.
writeInt64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {flatbuffers.Long}
...
...
@@ -1048,7 +1048,7 @@ MyGame.Example.Monster.prototype.testhashu64Fnv1a = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testhashu64_fnv1a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
50
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
50
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1056,7 +1056,7 @@ MyGame.Example.Monster.prototype.mutate_testhashu64_fnv1a = function(value) {
this
.
bb
.
writeUint64
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {number} index
...
...
@@ -1096,7 +1096,7 @@ MyGame.Example.Monster.prototype.testf = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testf
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
54
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
54
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1104,7 +1104,7 @@ MyGame.Example.Monster.prototype.mutate_testf = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -1119,7 +1119,7 @@ MyGame.Example.Monster.prototype.testf2 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testf2
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
56
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
56
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1127,7 +1127,7 @@ MyGame.Example.Monster.prototype.mutate_testf2 = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -1142,7 +1142,7 @@ MyGame.Example.Monster.prototype.testf3 = function() {
* @returns {boolean}
*/
MyGame
.
Example
.
Monster
.
prototype
.
mutate_testf3
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
58
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
58
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -1150,7 +1150,7 @@ MyGame.Example.Monster.prototype.mutate_testf3 = function(value) {
this
.
bb
.
writeFloat32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {number} index
...
...
tests/namespace_test/namespace_test1_generated.js
View file @
d3429187
...
...
@@ -69,7 +69,7 @@ NamespaceA.NamespaceB.TableInNestedNS.prototype.foo = function() {
* @returns {boolean}
*/
NamespaceA
.
NamespaceB
.
TableInNestedNS
.
prototype
.
mutate_foo
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -77,7 +77,7 @@ NamespaceA.NamespaceB.TableInNestedNS.prototype.mutate_foo = function(value) {
this
.
bb
.
writeInt32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Builder} builder
...
...
@@ -141,7 +141,7 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.a = function() {
* @returns {boolean}
*/
NamespaceA
.
NamespaceB
.
StructInNestedNS
.
prototype
.
mutate_a
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
0
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -149,7 +149,7 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_a = function(value) {
this
.
bb
.
writeInt32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @returns {number}
...
...
@@ -163,7 +163,7 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.b = function() {
* @returns {boolean}
*/
NamespaceA
.
NamespaceB
.
StructInNestedNS
.
prototype
.
mutate_b
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
4
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -171,7 +171,7 @@ NamespaceA.NamespaceB.StructInNestedNS.prototype.mutate_b = function(value) {
this
.
bb
.
writeInt32
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {flatbuffers.Builder} builder
...
...
tests/namespace_test/namespace_test2_generated.js
View file @
d3429187
...
...
@@ -75,7 +75,7 @@ NamespaceA.TableInFirstNS.prototype.fooEnum = function() {
* @returns {boolean}
*/
NamespaceA
.
TableInFirstNS
.
prototype
.
mutate_foo_enum
=
function
(
value
)
{
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
var
offset
=
this
.
bb
.
__offset
(
this
.
bb_pos
,
6
)
;
if
(
offset
===
0
)
{
return
false
;
...
...
@@ -83,7 +83,7 @@ NamespaceA.TableInFirstNS.prototype.mutate_foo_enum = function(value) {
this
.
bb
.
writeInt8
(
this
.
bb_pos
+
offset
,
value
);
return
true
;
}
}
;
/**
* @param {NamespaceA.NamespaceB.StructInNestedNS=} obj
...
...
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