Skip to content

Commit 1c17ec8

Browse files
committed
Update flatc.cpp
Update idl_gen_fbs.cpp Update idl_parser.cpp Update idl_gen_general.cpp Update idl_gen_general.cpp fixed initialization of member var for old make (hopefully) fix missing space (clang format) same fix for general code generator Fix for issue google#3922 Also, clean up redundant ';' at end of java classes. Fixed operator++. Added CreateXXX for vector types. Fixed operator++. Added CreateXXX for vector types. New CreateXXX (with vectors and strings) calls old CreateXXX (with offsets). Added function GenSimpleParam. Tests added. Fixed spaces. Removed redundant == nullptr. Vectors pointers made const. Rename CONTRIBUTING to CONTRIBUTING.md Don't crash if str is null Is useful especially when we want to create a string from another message string that might be null. Update test.cpp Update test.cpp Update test.cpp Update test.cpp Verifier computes the buffersize, useful for streaming Close google#3898 Verify everything in one shot Added optional object based API for C++. Change-Id: If927f3ea3fb3723088fa287f24bdd1ad43c8d1d1 Tested: on Linux. Fix link to CONTRIBUTING clangFormating base class clang formating cpp code generator and add missing generated classes Create a maven like project structure for java development. Make it OSGi compliant. Generate the flatbuffers code for testing (example). Java developer are mostly comfortable with maven project structure. One one the main concept behind maven is convention. If you follow the maven project convention then your development team will get more effective as they now this project structure and can easily find the production code versus the test code. In this pull request I have structured the java project around 2 main parts: * the `flatbuffers` project. This project is the api / lib project and contains the test code structure + an example of code generation for testing. This avoid to commit generated code. Pre-configure JUnit for test driven development and make this project OSGi compliant. * the `jmh` project. This project aims to provide a placeholder for micro-benchmarking. JMH is a 'de facto' standard for micro benchmarking you can find more details here: http://openjdk.java.net/projects/code-tools/jmh/ For now I didn't move the JavaTest class but it could be a next step with a migration to the JUnit framework. The only impacts are the move of the class and the project structure => no code change. Revert "Create a maven like project structure for java development. Make it OSGi compliant. Generate the flatbuffers code for testing (example)." This reverts commit 9875b0e. Move maven `pom.xml` from the java folder to the root folder. This avoid to put the pom.xml file into the source directory. Normally the pom file is in a parent (/parent) folder and it is not mixed with the java source code. An other thing is: this will make import of the project more easy from a IDE. The side effect is that the target folder where maven build artifacts will move from the <flatbuffers>/java/target to <flatbuffers>/target therefore the gitignore file has been updated in consequences. Added OSGi header generation for maven project. This allow jar generated with maven to be used in OSGi environment. Fix typo "your platform can't handling..." => "your platform can't handle" Fix typo Related to google#3904 (comment) fixed ArrayOutOfBoundsException in java example VS2010 fixes Xcode fixes Implement mutators for Go Added missing Go generated files. Change-Id: I9d738e84ab2e01ec117c825ade44cc865cf5f1c2 Fixed unused parameter warning. Change-Id: I7a2576c6f366b89ef3e1f83941f90294ca7a07fd This is a minimal amount of #ifdef's to make stlport work. Minimal, in the sense that this will only allow flatbuffers.h + generated code to work. Everything else (tests, parsing, reflection etc.) may still not compile with stlport. Functionality has been reduced, some utility functions are not available. Tested: on Linux (no stlport), Android (stlport). Change-Id: I3f8b6a88258c07d78964dd455fb9f99f65266301 Added way to test two schemas for safe evolution. Change-Id: I1dfc867e6df5932ab61dad431eb3cb02f15d04df Tested: on Linux. Bug: 30202327 Fixed VS2010 build Fixed conversion warning in generated code. Emit GetRootAs methods for all types in Go and Python Add tests for GetRootAs* in Go and Python Fixed missing \ in CMakeLists.txt that broke the build js:add @namespace annotation to namespaces Adding missing generated code from recent commits. Also updated generated_code.sh to prevent this from happening in the future. Change-Id: Ib282e9b6c762a79d4b4e09bee06b14781cd2a4c1 Fixed reflection.h not modifying certain table configurations. It would write 64bits offsets instead of 32bit ones, and update the vtable pointer before the fields were processed. Change-Id: I0c0fa942bbd3b42839294f5653ba8fa048612624 Tested: on Linux. Pulled out EndianSwap into its own function. Change-Id: I4a587102db8c435b739c92b6c464c94c4ea1fe42 Fix Mac build. The new line in the set(CMAKE_CXX_FLAGS...) line was getting insert verbatim into the Makefile. Makefiles don't like new lines in their assignment operators. The newline escape fix works for CMake 3.0 and above, but since we support 2.x, we need to use the legacy solution, which is to split into two separate statements. Tested: cmake -G"Unix Makefiles" works now on Mac. Change-Id: I6f4655981b85087c4760c3d26ed0c97c4469ba93 Add EnumNames to Go code Tested: on Darwin Removed pre-made VS2010 and XCode projects. CMake is now required on all platforms. Change-Id: Iad81d9244a05ed70ce8b8860d6b729a873f137c1 Tested: on Windows and OS X. Fix docs for object API usage Added AppVeyor CI. Change-Id: I01cf630026e25382b585785b471bad21153338f6 Need unique_ptr.get not pointee.get Use fully qualified names of structs in UnPack feat(mutable-js): The mutable Scalar generation. This is just the initial commit to start the conversation on adding mutation to javascript. chore(generate-code): Generate the JS code after mutation has been added. feat(test): Added mutation testing for scalar values. This is a port of the tests found in test.cpp Added backwards compatible --no-union-value-namespacing Change-Id: Ia78dd3b0f213e9ffa49dcec699dcbb21fe6517da Tested: on Linux. Validate UTF-8 by default when parsing IDL. Support Unicode values > U+FFFF in parse
1 parent 5f2b4e7 commit 1c17ec8

File tree

89 files changed

+3207
-2788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+3207
-2788
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ flatsamplebinary
4040
flatsamplebinary.exe
4141
flatsampletext
4242
flatsampletext.exe
43+
grpctest
44+
grpctest.exe
4345
snapshot.sh
4446
tests/go_gen
4547
tests/monsterdata_java_wire.mon
@@ -55,9 +57,10 @@ build/Xcode/FlatBuffers.xcodeproj/xcuserdata/**
5557
FlatBuffers.xcodeproj/
5658
java/.idea
5759
java/*.iml
58-
java/target
59-
**/*.pyc
6060
.idea
61+
*.iml
62+
target
63+
**/*.pyc
6164
build/VS2010/FlatBuffers.sdf
6265
build/VS2010/FlatBuffers.opensdf
6366
build/VS2010/ipch/**/*.ipch

CMakeLists.txt

+13-7
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ project(FlatBuffers)
66
option(FLATBUFFERS_CODE_COVERAGE "Enable the code coverage build option." OFF)
77
option(FLATBUFFERS_BUILD_TESTS "Enable the build of tests and samples." ON)
88
option(FLATBUFFERS_INSTALL "Enable the installation of targets." ON)
9-
option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library" ON)
10-
option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler" ON)
9+
option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library"
10+
ON)
11+
option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler"
12+
ON)
1113
option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" ON)
1214
option(FLATBUFFERS_BUILD_GRPCTEST "Enable the build of grpctest" OFF)
1315

@@ -94,8 +96,8 @@ set(FlatBuffers_GRPCTest_SRCS
9496
# source_group(Tests FILES ${FlatBuffers_Tests_SRCS})
9597

9698
if(APPLE)
97-
set(CMAKE_CXX_FLAGS
98-
"${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall -pedantic -Werror -Wextra")
99+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
100+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra")
99101
elseif(CMAKE_COMPILER_IS_GNUCXX)
100102
if(CYGWIN)
101103
set(CMAKE_CXX_FLAGS
@@ -118,7 +120,8 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
118120

119121
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
120122
set(CMAKE_CXX_FLAGS
121-
"${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wall -pedantic -Werror -Wextra")
123+
"${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wall -pedantic -Werror \
124+
-Wextra")
122125
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
123126
set(CMAKE_EXE_LINKER_FLAGS
124127
"${CMAKE_EXE_LINKER_FLAGS} -lc++abi")
@@ -165,7 +168,9 @@ function(compile_flatbuffers_schema_to_cpp SRC_FBS)
165168
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
166169
add_custom_command(
167170
OUTPUT ${GEN_HEADER}
168-
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
171+
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
172+
--gen-object-api -o "${SRC_FBS_DIR}"
173+
"${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
169174
DEPENDS flatc)
170175
endfunction()
171176

@@ -174,7 +179,8 @@ function(compile_flatbuffers_schema_to_binary SRC_FBS)
174179
string(REGEX REPLACE "\\.fbs$" ".bfbs" GEN_BINARY_SCHEMA ${SRC_FBS})
175180
add_custom_command(
176181
OUTPUT ${GEN_BINARY_SCHEMA}
177-
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -b --schema -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
182+
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -b --schema -o "${SRC_FBS_DIR}"
183+
"${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
178184
DEPENDS flatc)
179185
endfunction()
180186

CONTRIBUTING CONTRIBUTING.md

File renamed without changes.

appveyor.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
branches:
2+
only:
3+
- master
4+
5+
os: Visual Studio 2015
6+
7+
platform:
8+
- x86
9+
- x64
10+
11+
configuration:
12+
- Debug
13+
- Release
14+
15+
before_build:
16+
- cmake -G"Visual Studio 10 2010"
17+
18+
build:
19+
project: ALL_BUILD.vcxproj
20+
21+
#test_script:
22+
# - Debug/flattests.exe
23+
24+
#artifacts:
25+
# - path: Release/flatc.exe
26+
# name: flatc.exe

build_ide/VS2010/FlatBuffers.sln

-55
This file was deleted.

0 commit comments

Comments
 (0)