diff --git a/CMakeLists.txt b/CMakeLists.txt index a72b62715..81c9e5837 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,9 +96,8 @@ set(FlatBuffers_GRPCTest_SRCS # source_group(Tests FILES ${FlatBuffers_Tests_SRCS}) if(APPLE) - set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall -pedantic -Werror \ - -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra") elseif(CMAKE_COMPILER_IS_GNUCXX) if(CYGWIN) set(CMAKE_CXX_FLAGS diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..63fc12d8c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +branches: + only: + - master + +os: Visual Studio 2015 + +platform: + - x86 + - x64 + +configuration: + - Debug + - Release + +before_build: + - cmake -G"Visual Studio 10 2010" + +build: + project: ALL_BUILD.vcxproj + +#test_script: +# - Debug/flattests.exe + +#artifacts: +# - path: Release/flatc.exe +# name: flatc.exe diff --git a/build_ide/VS2010/FlatBuffers.sln b/build_ide/VS2010/FlatBuffers.sln deleted file mode 100755 index ac03fdfa1..000000000 --- a/build_ide/VS2010/FlatBuffers.sln +++ /dev/null @@ -1,55 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flatc", "flatc.vcxproj", "{5B5857E1-64E2-4CED-A12E-45E1B3880496}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flatsamplebinary", "flatsamplebinary.vcxproj", "{16FA5518-3DE1-4B15-A1E0-F4734C276FB4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flatsampletext", "flatsampletext.vcxproj", "{F0A15675-1017-4217-BB5B-3372F2C636AB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flattests", "flattests.vcxproj", "{DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Debug|Win32.ActiveCfg = Debug|Win32 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Debug|Win32.Build.0 = Debug|Win32 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Debug|x64.ActiveCfg = Debug|x64 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Debug|x64.Build.0 = Debug|x64 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Release|Win32.ActiveCfg = Release|Win32 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Release|Win32.Build.0 = Release|Win32 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Release|x64.ActiveCfg = Release|x64 - {5B5857E1-64E2-4CED-A12E-45E1B3880496}.Release|x64.Build.0 = Release|x64 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Debug|Win32.ActiveCfg = Debug|Win32 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Debug|Win32.Build.0 = Debug|Win32 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Debug|x64.ActiveCfg = Debug|x64 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Debug|x64.Build.0 = Debug|x64 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Release|Win32.ActiveCfg = Release|Win32 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Release|Win32.Build.0 = Release|Win32 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Release|x64.ActiveCfg = Release|x64 - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4}.Release|x64.Build.0 = Release|x64 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Debug|Win32.ActiveCfg = Debug|Win32 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Debug|Win32.Build.0 = Debug|Win32 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Debug|x64.ActiveCfg = Debug|x64 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Debug|x64.Build.0 = Debug|x64 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Release|Win32.ActiveCfg = Release|Win32 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Release|Win32.Build.0 = Release|Win32 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Release|x64.ActiveCfg = Release|x64 - {F0A15675-1017-4217-BB5B-3372F2C636AB}.Release|x64.Build.0 = Release|x64 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Debug|Win32.Build.0 = Debug|Win32 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Debug|x64.ActiveCfg = Debug|x64 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Debug|x64.Build.0 = Debug|x64 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Release|Win32.ActiveCfg = Release|Win32 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Release|Win32.Build.0 = Release|Win32 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Release|x64.ActiveCfg = Release|x64 - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/build_ide/VS2010/flatc.vcxproj b/build_ide/VS2010/flatc.vcxproj deleted file mode 100755 index 5aef2384a..000000000 --- a/build_ide/VS2010/flatc.vcxproj +++ /dev/null @@ -1,288 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {5B5857E1-64E2-4CED-A12E-45E1B3880496} - Win32Proj - Win32 - flatc - - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(IntDir) - $(IntDir) - flatc.dir\Debug\ - flatc.dir\Debug\ - flatc - flatc - .exe - .exe - true - true - true - true - $(IntDir) - $(IntDir) - flatc.dir\Release\ - flatc.dir\Release\ - flatc - flatc - .exe - .exe - false - false - true - true - - - - ../../include;../../grpc;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatc.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatc.lib - ../../Debug/flatc.pdb - Console - - - - - false - - - - - ../../include;../../grpc;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatc.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatc.lib - ../../Debug/flatc.pdb - Console - - - - - false - - - - - ../../include;../../grpc;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatc.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatc.lib - ../../Release/flatc.pdb - Console - - - - - false - - - - - ../../include;../../grpc;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatc.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatc.lib - ../../Release/flatc.pdb - Console - - - - - false - - - - - - - - - - - - - Level4 - - - - - - - - - - - - - \ No newline at end of file diff --git a/build_ide/VS2010/flatc.vcxproj.user b/build_ide/VS2010/flatc.vcxproj.user deleted file mode 100755 index 1132b8ab9..000000000 --- a/build_ide/VS2010/flatc.vcxproj.user +++ /dev/null @@ -1,27 +0,0 @@ - - - - ..\..\tests - WindowsLocalDebugger - -j -c -n -g --php --no-includes --gen-mutable --gen-object-api monster_test.fbs - - - ..\.. - WindowsLocalDebugger - -j -c -n -g -b -t monster_test.fbs monsterdata_test.golden - - - -j -c -g -n -b -t monster_test.fbs monsterdata_test.golden - - - ..\..\tests - WindowsLocalDebugger - - - -j -c -g -b -t monster_test.fbs monsterdata_test.json - - - ..\..\tests - WindowsLocalDebugger - - \ No newline at end of file diff --git a/build_ide/VS2010/flatsamplebinary.vcxproj b/build_ide/VS2010/flatsamplebinary.vcxproj deleted file mode 100755 index 9d5fb107d..000000000 --- a/build_ide/VS2010/flatsamplebinary.vcxproj +++ /dev/null @@ -1,273 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {16FA5518-3DE1-4B15-A1E0-F4734C276FB4} - Win32Proj - Win32 - flatsamplebinary - - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(IntDir) - $(IntDir) - flatsamplebinary.dir\Debug\ - flatsamplebinary.dir\Debug\ - flatsamplebinary - flatsamplebinary - .exe - .exe - true - true - true - true - $(IntDir) - $(IntDir) - flatsamplebinary.dir\Release\ - flatsamplebinary.dir\Release\ - flatsamplebinary - flatsamplebinary - .exe - .exe - false - false - true - true - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatsamplebinary.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatsamplebinary.lib - ../../Debug/flatsamplebinary.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatsamplebinary.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatsamplebinary.lib - ../../Debug/flatsamplebinary.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatsamplebinary.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatsamplebinary.lib - ../../Release/flatsamplebinary.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatsamplebinary.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatsamplebinary.lib - ../../Release/flatsamplebinary.pdb - Console - - - - - false - - - - - - - - - - - \ No newline at end of file diff --git a/build_ide/VS2010/flatsamplebinary.vcxproj.user b/build_ide/VS2010/flatsamplebinary.vcxproj.user deleted file mode 100755 index a23c44770..000000000 --- a/build_ide/VS2010/flatsamplebinary.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - \ No newline at end of file diff --git a/build_ide/VS2010/flatsampletext.vcxproj b/build_ide/VS2010/flatsampletext.vcxproj deleted file mode 100755 index 95a6a351f..000000000 --- a/build_ide/VS2010/flatsampletext.vcxproj +++ /dev/null @@ -1,278 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {F0A15675-1017-4217-BB5B-3372F2C636AB} - Win32Proj - Win32 - flatsampletext - - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(IntDir) - $(IntDir) - flatsampletext.dir\Debug\ - flatsampletext.dir\Debug\ - flatsampletext - flatsampletext - .exe - .exe - true - true - true - true - $(IntDir) - $(IntDir) - flatsampletext.dir\Release\ - flatsampletext.dir\Release\ - flatsampletext - flatsampletext - .exe - .exe - false - false - true - true - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatsampletext.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatsampletext.lib - ../../Debug/flatsampletext.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flatsampletext.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flatsampletext.lib - ../../Debug/flatsampletext.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatsampletext.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatsampletext.lib - ../../Release/flatsampletext.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flatsampletext.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flatsampletext.lib - ../../Release/flatsampletext.pdb - Console - - - - - false - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build_ide/VS2010/flatsampletext.vcxproj.user b/build_ide/VS2010/flatsampletext.vcxproj.user deleted file mode 100755 index 1753dbd72..000000000 --- a/build_ide/VS2010/flatsampletext.vcxproj.user +++ /dev/null @@ -1,19 +0,0 @@ - - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - \ No newline at end of file diff --git a/build_ide/VS2010/flattests.vcxproj b/build_ide/VS2010/flattests.vcxproj deleted file mode 100755 index 511aa66e1..000000000 --- a/build_ide/VS2010/flattests.vcxproj +++ /dev/null @@ -1,282 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {DC7BBA00-9FC6-48AF-B7E9-12CA91AC02AA} - Win32Proj - Win32 - flattests - - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - Application - false - MultiByte - - - - - - - - - - <_ProjectFileVersion>10.0.20506.1 - $(IntDir) - $(IntDir) - flattests.dir\Debug\ - flattests.dir\Debug\ - flattests - flattests - .exe - .exe - true - true - true - true - $(IntDir) - $(IntDir) - flattests.dir\Release\ - flattests.dir\Release\ - flattests - flattests - .exe - .exe - false - false - true - true - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flattests.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flattests.lib - ../../Debug/flattests.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - EnableFastChecks - CompileAsCpp - ProgramDatabase - Sync - Disabled - Disabled - NotUsing - MultiThreadedDebugDLL - true - Level4 - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) - Debug - $(IntDir) - ../../Debug/flattests.pdb - true - - - WIN32;_WINDOWS;_DEBUG;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /debug %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - true - ../../Debug/flattests.lib - ../../Debug/flattests.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flattests.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - /machine:X86 %(AdditionalOptions) - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flattests.lib - ../../Release/flattests.pdb - Console - - - - - false - - - - - ../../include;%(AdditionalIncludeDirectories) - CompileAsCpp - Sync - AnySuitable - MaxSpeed - NotUsing - MultiThreadedDLL - true - Level4 - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions) - Release - $(IntDir) - ../../Release/flattests.pdb - true - - - WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions) - ../../include;%(AdditionalIncludeDirectories) - - - ../../include;%(AdditionalIncludeDirectories) - $(IntDir) - %(Filename).h - %(Filename).tlb - %(Filename)_i.c - %(Filename)_p.c - - - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) - false - ../../Release/flattests.lib - ../../Release/flattests.pdb - Console - - - - - false - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build_ide/VS2010/flattests.vcxproj.user b/build_ide/VS2010/flattests.vcxproj.user deleted file mode 100755 index 1753dbd72..000000000 --- a/build_ide/VS2010/flattests.vcxproj.user +++ /dev/null @@ -1,19 +0,0 @@ - - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - - ..\.. - WindowsLocalDebugger - - \ No newline at end of file diff --git a/build_ide/Xcode/FlatBuffers.xcodeproj/project.pbxproj b/build_ide/Xcode/FlatBuffers.xcodeproj/project.pbxproj deleted file mode 100644 index e67f73565..000000000 --- a/build_ide/Xcode/FlatBuffers.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1119 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1963D7D2A57344A3B1C1713F /* idl_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3709AC883348409592530AE6 /* idl_parser.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - 5AC48C391ACA9A0A008132C5 /* idl_gen_general.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CD8717A19CB937D0012A827 /* idl_gen_general.cpp */; }; - 61823BBC53544106B6DBC38E /* idl_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3709AC883348409592530AE6 /* idl_parser.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - 61FF3C34FBEC4819A1C30F92 /* sample_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECCEBFFA6977404F858F9739 /* sample_text.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - 8C2AAE0A1CB338A8000CC78D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AAE091CB338A8000CC78D /* util.cpp */; }; - 8C2AAE0B1CB338CD000CC78D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AAE091CB338A8000CC78D /* util.cpp */; }; - 8C2AAE0C1CB338CE000CC78D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2AAE091CB338A8000CC78D /* util.cpp */; }; - 8C303C591975D6A700D7C1C5 /* idl_gen_go.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C303C581975D6A700D7C1C5 /* idl_gen_go.cpp */; }; - 8C547D661D3FF05C00AE7A25 /* idl_gen_grpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C547D651D3FF05C00AE7A25 /* idl_gen_grpc.cpp */; }; - 8C547D681D3FF07D00AE7A25 /* cpp_generator.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8C547D671D3FF07D00AE7A25 /* cpp_generator.cc */; }; - 8C6905FD19F835B400CB8866 /* idl_gen_fbs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C6905EC19F8357300CB8866 /* idl_gen_fbs.cpp */; }; - 8C78573E1BD5AE2C00C53C34 /* idl_gen_js.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C78573D1BD5AE2C00C53C34 /* idl_gen_js.cpp */; }; - 8C8774631B703D4800E693F5 /* reflection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C8774621B703D4800E693F5 /* reflection.cpp */; }; - 8C8774641B703E1200E693F5 /* idl_gen_fbs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C6905EC19F8357300CB8866 /* idl_gen_fbs.cpp */; }; - 8CA854B31B04244A00040A06 /* idl_gen_python.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CA854B21B04244A00040A06 /* idl_gen_python.cpp */; }; - 8CD8717B19CB937D0012A827 /* idl_gen_general.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CD8717A19CB937D0012A827 /* idl_gen_general.cpp */; }; - A9C9A99F719A4ED58DC2D2FC /* idl_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3709AC883348409592530AE6 /* idl_parser.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - AA9BACF55EB3456BA2F633BB /* flatc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DFD29781D8E490284B06504 /* flatc.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - AD71FEBEE4E846529002C1F0 /* idl_gen_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6C5D81DBF864365B12E269D /* idl_gen_text.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - AE5F47A7DCB44781B657F062 /* idl_gen_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6C5D81DBF864365B12E269D /* idl_gen_text.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - BE03D7B0C9584DD58B50ED34 /* idl_gen_cpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD90A7F6B2BE4D0384294DD1 /* idl_gen_cpp.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - D2DA271D1BFFBC06000F9168 /* idl_gen_php.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D2DA271C1BFFBC06000F9168 /* idl_gen_php.cpp */; }; - E0680D6B5BFD484BA9D88EE8 /* idl_gen_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6C5D81DBF864365B12E269D /* idl_gen_text.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - E84E4B7612DF4C369DC24843 /* sample_binary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EE44BFFAF8E43F485859145 /* sample_binary.cpp */; settings = {COMPILER_FLAGS = ""; }; }; - EE4AEE138D684B30A1BF5462 /* test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6AD24EEB3D024825A37741FF /* test.cpp */; settings = {COMPILER_FLAGS = ""; }; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00154BD8654B4B5B9FF45FA6 /* idl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = idl.h; path = include/flatbuffers/idl.h; sourceTree = SOURCE_ROOT; }; - 0DFD29781D8E490284B06504 /* flatc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = flatc.cpp; path = src/flatc.cpp; sourceTree = SOURCE_ROOT; }; - 18185F364F604E648CF6EE25 /* flatc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = flatc; sourceTree = BUILT_PRODUCTS_DIR; }; - 3709AC883348409592530AE6 /* idl_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_parser.cpp; path = src/idl_parser.cpp; sourceTree = SOURCE_ROOT; }; - 3863042BCEC64791BFB48625 /* flatsamplebinary */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = flatsamplebinary; sourceTree = BUILT_PRODUCTS_DIR; }; - 420E3BC724ED4A008D79297F /* flatsampletext */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = flatsampletext; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EE44BFFAF8E43F485859145 /* sample_binary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sample_binary.cpp; path = samples/sample_binary.cpp; sourceTree = SOURCE_ROOT; }; - 6AD24EEB3D024825A37741FF /* test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = test.cpp; path = tests/test.cpp; sourceTree = SOURCE_ROOT; }; - 8C2AAE091CB338A8000CC78D /* util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = util.cpp; path = src/util.cpp; sourceTree = ""; }; - 8C303C581975D6A700D7C1C5 /* idl_gen_go.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_go.cpp; path = src/idl_gen_go.cpp; sourceTree = ""; }; - 8C547D651D3FF05C00AE7A25 /* idl_gen_grpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_grpc.cpp; path = src/idl_gen_grpc.cpp; sourceTree = ""; }; - 8C547D671D3FF07D00AE7A25 /* cpp_generator.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpp_generator.cc; path = grpc/src/compiler/cpp_generator.cc; sourceTree = ""; }; - 8C6905EC19F8357300CB8866 /* idl_gen_fbs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_fbs.cpp; path = src/idl_gen_fbs.cpp; sourceTree = ""; }; - 8C78573D1BD5AE2C00C53C34 /* idl_gen_js.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_js.cpp; path = src/idl_gen_js.cpp; sourceTree = ""; }; - 8C8774621B703D4800E693F5 /* reflection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = reflection.cpp; path = src/reflection.cpp; sourceTree = ""; }; - 8CA854B21B04244A00040A06 /* idl_gen_python.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_python.cpp; path = src/idl_gen_python.cpp; sourceTree = ""; }; - 8CD8717A19CB937D0012A827 /* idl_gen_general.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_general.cpp; path = src/idl_gen_general.cpp; sourceTree = ""; }; - A13F25CDAD23435DA293690D /* flattests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = flattests; sourceTree = BUILT_PRODUCTS_DIR; }; - AB70F1FBA50E4120BCF37C8D /* monster_test_generated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = monster_test_generated.h; path = tests/monster_test_generated.h; sourceTree = SOURCE_ROOT; }; - C0E7B66C3FF849A0AD9A7168 /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = util.h; path = include/flatbuffers/util.h; sourceTree = SOURCE_ROOT; }; - CD90A7F6B2BE4D0384294DD1 /* idl_gen_cpp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_cpp.cpp; path = src/idl_gen_cpp.cpp; sourceTree = SOURCE_ROOT; }; - D2DA271C1BFFBC06000F9168 /* idl_gen_php.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_php.cpp; path = src/idl_gen_php.cpp; sourceTree = ""; }; - DD8B353D4756412195777FBA /* flatbuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = flatbuffers.h; path = include/flatbuffers/flatbuffers.h; sourceTree = SOURCE_ROOT; }; - ECCEBFFA6977404F858F9739 /* sample_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sample_text.cpp; path = samples/sample_text.cpp; sourceTree = SOURCE_ROOT; }; - F6C5D81DBF864365B12E269D /* idl_gen_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = idl_gen_text.cpp; path = src/idl_gen_text.cpp; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXGroup section */ - 28237E300FE042DEADA302D3 /* Source Files */ = { - isa = PBXGroup; - children = ( - 8C547D671D3FF07D00AE7A25 /* cpp_generator.cc */, - 8C547D651D3FF05C00AE7A25 /* idl_gen_grpc.cpp */, - 8C2AAE091CB338A8000CC78D /* util.cpp */, - D2DA271C1BFFBC06000F9168 /* idl_gen_php.cpp */, - 8C78573D1BD5AE2C00C53C34 /* idl_gen_js.cpp */, - 8CA854B21B04244A00040A06 /* idl_gen_python.cpp */, - 8C6905EC19F8357300CB8866 /* idl_gen_fbs.cpp */, - 8CD8717A19CB937D0012A827 /* idl_gen_general.cpp */, - 8C303C581975D6A700D7C1C5 /* idl_gen_go.cpp */, - F6C5D81DBF864365B12E269D /* idl_gen_text.cpp */, - 3709AC883348409592530AE6 /* idl_parser.cpp */, - CD90A7F6B2BE4D0384294DD1 /* idl_gen_cpp.cpp */, - 8C8774621B703D4800E693F5 /* reflection.cpp */, - ); - name = "Source Files"; - sourceTree = ""; - }; - 378446B9D5EF46EF92B35E21 /* flatc */ = { - isa = PBXGroup; - children = ( - 0DFD29781D8E490284B06504 /* flatc.cpp */, - ); - name = flatc; - sourceTree = ""; - }; - 5FEA84E7D39645988300317C /* Header Files */ = { - isa = PBXGroup; - children = ( - DD8B353D4756412195777FBA /* flatbuffers.h */, - 00154BD8654B4B5B9FF45FA6 /* idl.h */, - C0E7B66C3FF849A0AD9A7168 /* util.h */, - ); - name = "Header Files"; - sourceTree = ""; - }; - 866694F9F2F7451382D236B3 /* Sources */ = { - isa = PBXGroup; - children = ( - 28237E300FE042DEADA302D3 /* Source Files */, - 5FEA84E7D39645988300317C /* Header Files */, - 378446B9D5EF46EF92B35E21 /* flatc */, - DB9DE41C20F349F694A488F3 /* flatsamplebinary */, - 8FA1F43C78914AE5AD04E24E /* flatsampletext */, - 88421F5F87584EE3B67C979A /* flattests */, - ); - name = Sources; - sourceTree = ""; - }; - 88421F5F87584EE3B67C979A /* flattests */ = { - isa = PBXGroup; - children = ( - AB70F1FBA50E4120BCF37C8D /* monster_test_generated.h */, - 6AD24EEB3D024825A37741FF /* test.cpp */, - ); - name = flattests; - sourceTree = ""; - }; - 8F5E926B72104F4194B3BD5A = { - isa = PBXGroup; - children = ( - 866694F9F2F7451382D236B3 /* Sources */, - 99CC11E382B8420AA79A8A14 /* Products */, - ); - sourceTree = ""; - }; - 8FA1F43C78914AE5AD04E24E /* flatsampletext */ = { - isa = PBXGroup; - children = ( - ECCEBFFA6977404F858F9739 /* sample_text.cpp */, - ); - name = flatsampletext; - sourceTree = ""; - }; - 99CC11E382B8420AA79A8A14 /* Products */ = { - isa = PBXGroup; - children = ( - 18185F364F604E648CF6EE25 /* flatc */, - 3863042BCEC64791BFB48625 /* flatsamplebinary */, - 420E3BC724ED4A008D79297F /* flatsampletext */, - A13F25CDAD23435DA293690D /* flattests */, - ); - name = Products; - sourceTree = ""; - }; - DB9DE41C20F349F694A488F3 /* flatsamplebinary */ = { - isa = PBXGroup; - children = ( - 5EE44BFFAF8E43F485859145 /* sample_binary.cpp */, - ); - name = flatsamplebinary; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 49A8585B4DDF45E9A3B17CFC /* flatc */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33E06AF34F9D4985A3ECC3BE /* Build configuration list for PBXNativeTarget "flatc" */; - buildPhases = ( - BA2D863987DC44ADBA112566 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = flatc; - productName = flatc; - productReference = 18185F364F604E648CF6EE25 /* flatc */; - productType = "com.apple.product-type.tool"; - }; - 6FAE4035E73E43A4B85484F5 /* flatsamplebinary */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00270D02D60C49CBA8254F7E /* Build configuration list for PBXNativeTarget "flatsamplebinary" */; - buildPhases = ( - B52C93947E644572857F437C /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = flatsamplebinary; - productName = flatsamplebinary; - productReference = 3863042BCEC64791BFB48625 /* flatsamplebinary */; - productType = "com.apple.product-type.tool"; - }; - D69F7F780CCE4A07821AC50E /* flattests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 368F4ABC4CF54353A6440842 /* Build configuration list for PBXNativeTarget "flattests" */; - buildPhases = ( - F45B105DA30F42048C359289 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = flattests; - productName = flattests; - productReference = A13F25CDAD23435DA293690D /* flattests */; - productType = "com.apple.product-type.tool"; - }; - DBAB5216DC474DD19C4A3A9D /* flatsampletext */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4EFA62D61D724785A337C00C /* Build configuration list for PBXNativeTarget "flatsampletext" */; - buildPhases = ( - A5F04AC5C7354005A3736470 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = flatsampletext; - productName = flatsampletext; - productReference = 420E3BC724ED4A008D79297F /* flatsampletext */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 17AD84829D614C168858FC02 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 0700; - }; - buildConfigurationList = 6428BEB363AA4E03A282AA8C /* Build configuration list for PBXProject "FlatBuffers" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 8F5E926B72104F4194B3BD5A; - projectDirPath = ../..; - projectRoot = ""; - targets = ( - 49A8585B4DDF45E9A3B17CFC /* flatc */, - 6FAE4035E73E43A4B85484F5 /* flatsamplebinary */, - DBAB5216DC474DD19C4A3A9D /* flatsampletext */, - D69F7F780CCE4A07821AC50E /* flattests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - A5F04AC5C7354005A3736470 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 61FF3C34FBEC4819A1C30F92 /* sample_text.cpp in Sources */, - AE5F47A7DCB44781B657F062 /* idl_gen_text.cpp in Sources */, - 1963D7D2A57344A3B1C1713F /* idl_parser.cpp in Sources */, - 8C2AAE0B1CB338CD000CC78D /* util.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B52C93947E644572857F437C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E84E4B7612DF4C369DC24843 /* sample_binary.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BA2D863987DC44ADBA112566 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8C547D681D3FF07D00AE7A25 /* cpp_generator.cc in Sources */, - 8C303C591975D6A700D7C1C5 /* idl_gen_go.cpp in Sources */, - AA9BACF55EB3456BA2F633BB /* flatc.cpp in Sources */, - BE03D7B0C9584DD58B50ED34 /* idl_gen_cpp.cpp in Sources */, - AD71FEBEE4E846529002C1F0 /* idl_gen_text.cpp in Sources */, - 8C2AAE0A1CB338A8000CC78D /* util.cpp in Sources */, - 8C8774641B703E1200E693F5 /* idl_gen_fbs.cpp in Sources */, - 8C547D661D3FF05C00AE7A25 /* idl_gen_grpc.cpp in Sources */, - A9C9A99F719A4ED58DC2D2FC /* idl_parser.cpp in Sources */, - 8CA854B31B04244A00040A06 /* idl_gen_python.cpp in Sources */, - 8CD8717B19CB937D0012A827 /* idl_gen_general.cpp in Sources */, - 8C78573E1BD5AE2C00C53C34 /* idl_gen_js.cpp in Sources */, - D2DA271D1BFFBC06000F9168 /* idl_gen_php.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F45B105DA30F42048C359289 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8C8774631B703D4800E693F5 /* reflection.cpp in Sources */, - 5AC48C391ACA9A0A008132C5 /* idl_gen_general.cpp in Sources */, - 8C2AAE0C1CB338CE000CC78D /* util.cpp in Sources */, - 8C6905FD19F835B400CB8866 /* idl_gen_fbs.cpp in Sources */, - E0680D6B5BFD484BA9D88EE8 /* idl_gen_text.cpp in Sources */, - 61823BBC53544106B6DBC38E /* idl_parser.cpp in Sources */, - EE4AEE138D684B30A1BF5462 /* test.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 02575EDE5A1349C9A3584E32 /* RelWithDebInfo */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = .; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SYMROOT = build; - }; - name = RelWithDebInfo; - }; - 04681CC521204B3B87BB1E81 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = " -std=c++0x"; - OTHER_CPLUSPLUSFLAGS = " -std=c++0x"; - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flattests; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - 1399048C48224B1BBEF356B7 /* RelWithDebInfo */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsamplebinary; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = RelWithDebInfo; - }; - 1C94D755C4754814BABC99DF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = " -std=c++0x"; - OTHER_CPLUSPLUSFLAGS = " -std=c++0x"; - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsamplebinary; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - 33335DE09CF844709E9E4AA9 /* RelWithDebInfo */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flattests; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = RelWithDebInfo; - }; - 33B3983234F648E28F058235 /* MinSizeRel */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flattests; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = MinSizeRel; - }; - 370A0A2C8AA943C19C8021C9 /* MinSizeRel */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsamplebinary; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = MinSizeRel; - }; - 37C0FFB777CF4C19BD7AA662 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_WARN_ASSIGN_ENUM = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flattests; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - 41E4007D1858418CA3E8465E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsampletext; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - 48205B66908F4F23861A62D1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/include", - "$(PROJECT_DIR)/grpc", - ); - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatc; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - 49C655ECBF114257BDDB1F8C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/include", - "$(PROJECT_DIR)/grpc", - ); - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = " -std=c++0x"; - OTHER_CPLUSPLUSFLAGS = " -std=c++0x"; - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatc; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - 4D59EB9A2B114E4A80EE8969 /* RelWithDebInfo */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/include", - "$(PROJECT_DIR)/grpc", - ); - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatc; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = RelWithDebInfo; - }; - 60917B4900A4484898ED29EF /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = .; - ENABLE_TESTABILITY = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SYMROOT = build; - }; - name = Debug; - }; - 65B8F01CB7E6407CB262E6B6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = .; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SYMROOT = build; - }; - name = Release; - }; - 720E13DCA0B94E778BBED2DD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsamplebinary; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Release; - }; - 7ACE0191E05A40DEBBE068EE /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = " -std=c++0x"; - OTHER_CPLUSPLUSFLAGS = " -std=c++0x"; - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsampletext; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = Debug; - }; - A38FA2E52874442987B7F331 /* MinSizeRel */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/include", - "$(PROJECT_DIR)/grpc", - ); - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatc; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = MinSizeRel; - }; - C1F9C4F8E9654F90B78B41DE /* MinSizeRel */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsampletext; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = MinSizeRel; - }; - C839EDC9489F432994623A13 /* MinSizeRel */ = { - isa = XCBuildConfiguration; - buildSettings = { - CONFIGURATION_BUILD_DIR = .; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SYMROOT = build; - }; - name = MinSizeRel; - }; - F483DAC3AB084D769E89CBDF /* RelWithDebInfo */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - EXECUTABLE_PREFIX = ""; - EXECUTABLE_SUFFIX = ""; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PREPROCESSOR_DEFINITIONS = "'CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"'"; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include"; - INSTALL_PATH = ""; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_CPLUSPLUSFLAGS = ( - "-DNDEBUG", - "-std=c++0x", - ); - OTHER_LDFLAGS = ( - "-Wl,-search_paths_first", - "-Wl,-headerpad_max_install_names", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = flatsampletext; - SECTORDER_FLAGS = ""; - SYMROOT = build; - USE_HEADERMAP = NO; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; - name = RelWithDebInfo; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00270D02D60C49CBA8254F7E /* Build configuration list for PBXNativeTarget "flatsamplebinary" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1C94D755C4754814BABC99DF /* Debug */, - 720E13DCA0B94E778BBED2DD /* Release */, - 370A0A2C8AA943C19C8021C9 /* MinSizeRel */, - 1399048C48224B1BBEF356B7 /* RelWithDebInfo */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 33E06AF34F9D4985A3ECC3BE /* Build configuration list for PBXNativeTarget "flatc" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 49C655ECBF114257BDDB1F8C /* Debug */, - 48205B66908F4F23861A62D1 /* Release */, - A38FA2E52874442987B7F331 /* MinSizeRel */, - 4D59EB9A2B114E4A80EE8969 /* RelWithDebInfo */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 368F4ABC4CF54353A6440842 /* Build configuration list for PBXNativeTarget "flattests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 04681CC521204B3B87BB1E81 /* Debug */, - 37C0FFB777CF4C19BD7AA662 /* Release */, - 33B3983234F648E28F058235 /* MinSizeRel */, - 33335DE09CF844709E9E4AA9 /* RelWithDebInfo */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 4EFA62D61D724785A337C00C /* Build configuration list for PBXNativeTarget "flatsampletext" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7ACE0191E05A40DEBBE068EE /* Debug */, - 41E4007D1858418CA3E8465E /* Release */, - C1F9C4F8E9654F90B78B41DE /* MinSizeRel */, - F483DAC3AB084D769E89CBDF /* RelWithDebInfo */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 6428BEB363AA4E03A282AA8C /* Build configuration list for PBXProject "FlatBuffers" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 60917B4900A4484898ED29EF /* Debug */, - 65B8F01CB7E6407CB262E6B6 /* Release */, - C839EDC9489F432994623A13 /* MinSizeRel */, - 02575EDE5A1349C9A3584E32 /* RelWithDebInfo */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 17AD84829D614C168858FC02 /* Project object */; -} diff --git a/docs/source/Building.md b/docs/source/Building.md index f57371d5f..daeeb1ee2 100755 --- a/docs/source/Building.md +++ b/docs/source/Building.md @@ -1,14 +1,9 @@ Building {#flatbuffers_guide_building} ======== -## Building with Visual Studio or Xcode projects - -There are project files for Visual Studio and Xcode that should allow you -to build the compiler `flatc`, the samples and the tests out of the box. - ## Building with CMake -Alternatively, the distribution comes with a `cmake` file that should allow +The distribution comes with a `cmake` file that should allow you to build project/make files for any platform. For details on `cmake`, see . In brief, depending on your platform, use one of e.g.: diff --git a/docs/source/CppUsage.md b/docs/source/CppUsage.md index 060432b01..c1df15965 100755 --- a/docs/source/CppUsage.md +++ b/docs/source/CppUsage.md @@ -103,7 +103,7 @@ To use: cout << monsterobj->name; // This is now a std::string! monsterobj->name = "Bob"; // Change the name. FlatBufferBuilder fbb; - monsterobj->Pack(fbb); // Serialize into new buffer. + CreateMonster(fbb, monsterobj->get()); // Serialize into new buffer. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Reflection (& Resizing) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index 8cab3cd36..1a6908261 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -151,39 +151,41 @@ inline void EndianCheck() { (void)endiantest; } +template T EndianSwap(T t) { + #if defined(_MSC_VER) + #pragma push_macro("__builtin_bswap16") + #pragma push_macro("__builtin_bswap32") + #pragma push_macro("__builtin_bswap64") + #define __builtin_bswap16 _byteswap_ushort + #define __builtin_bswap32 _byteswap_ulong + #define __builtin_bswap64 _byteswap_uint64 + #endif + if (sizeof(T) == 1) { // Compile-time if-then's. + return t; + } else if (sizeof(T) == 2) { + auto r = __builtin_bswap16(*reinterpret_cast(&t)); + return *reinterpret_cast(&r); + } else if (sizeof(T) == 4) { + auto r = __builtin_bswap32(*reinterpret_cast(&t)); + return *reinterpret_cast(&r); + } else if (sizeof(T) == 8) { + auto r = __builtin_bswap64(*reinterpret_cast(&t)); + return *reinterpret_cast(&r); + } else { + assert(0); + } + #if defined(_MSC_VER) + #pragma pop_macro("__builtin_bswap16") + #pragma pop_macro("__builtin_bswap32") + #pragma pop_macro("__builtin_bswap64") + #endif +} + template T EndianScalar(T t) { #if FLATBUFFERS_LITTLEENDIAN return t; #else - #if defined(_MSC_VER) - #pragma push_macro("__builtin_bswap16") - #pragma push_macro("__builtin_bswap32") - #pragma push_macro("__builtin_bswap64") - #define __builtin_bswap16 _byteswap_ushort - #define __builtin_bswap32 _byteswap_ulong - #define __builtin_bswap64 _byteswap_uint64 - #endif - // If you're on the few remaining big endian platforms, we make the bold - // assumption you're also on gcc/clang, and thus have bswap intrinsics: - if (sizeof(T) == 1) { // Compile-time if-then's. - return t; - } else if (sizeof(T) == 2) { - auto r = __builtin_bswap16(*reinterpret_cast(&t)); - return *reinterpret_cast(&r); - } else if (sizeof(T) == 4) { - auto r = __builtin_bswap32(*reinterpret_cast(&t)); - return *reinterpret_cast(&r); - } else if (sizeof(T) == 8) { - auto r = __builtin_bswap64(*reinterpret_cast(&t)); - return *reinterpret_cast(&r); - } else { - assert(0); - } - #if defined(_MSC_VER) - #pragma pop_macro("__builtin_bswap16") - #pragma pop_macro("__builtin_bswap32") - #pragma pop_macro("__builtin_bswap64") - #endif + return EndianSwap(t); #endif } @@ -356,7 +358,8 @@ public: void MutateOffset(uoffset_t i, const uint8_t *val) { assert(i < size()); assert(sizeof(T) == sizeof(uoffset_t)); - WriteScalar(data() + i, val - (Data() + i * sizeof(uoffset_t))); + WriteScalar(data() + i, + static_cast(val - (Data() + i * sizeof(uoffset_t)))); } // Get a mutable pointer to tables/strings inside this vector. @@ -1495,7 +1498,8 @@ class Table { bool SetPointer(voffset_t field, const uint8_t *val) { auto field_offset = GetOptionalFieldOffset(field); if (!field_offset) return false; - WriteScalar(data_ + field_offset, val - (data_ + field_offset)); + WriteScalar(data_ + field_offset, + static_cast(val - (data_ + field_offset))); return true; } diff --git a/include/flatbuffers/reflection_generated.h b/include/flatbuffers/reflection_generated.h index eb981857b..a459aa6a6 100644 --- a/include/flatbuffers/reflection_generated.h +++ b/include/flatbuffers/reflection_generated.h @@ -39,8 +39,6 @@ enum BaseType { Vector = 14, Obj = 15, Union = 16, - MIN = None, - MAX = Union }; inline const char **EnumNamesBaseType() { @@ -83,9 +81,9 @@ struct TypeBuilder { }; inline flatbuffers::Offset CreateType(flatbuffers::FlatBufferBuilder &_fbb, - BaseType base_type = None, - BaseType element = None, - int32_t index = -1) { + BaseType base_type = None, + BaseType element = None, + int32_t index = -1) { TypeBuilder builder_(_fbb); builder_.add_index(index); builder_.add_element(element); @@ -127,14 +125,20 @@ struct KeyValueBuilder { }; inline flatbuffers::Offset CreateKeyValue(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset key = 0, - flatbuffers::Offset value = 0) { + flatbuffers::Offset key = 0, + flatbuffers::Offset value = 0) { KeyValueBuilder builder_(_fbb); builder_.add_value(value); builder_.add_key(key); return builder_.Finish(); } +inline flatbuffers::Offset CreateKeyValue(flatbuffers::FlatBufferBuilder &_fbb, + const char *key = nullptr, + const char *value = nullptr) { + return CreateKeyValue(_fbb, key ? 0 : _fbb.CreateString(key), value ? 0 : _fbb.CreateString(value)); +} + struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum { VT_NAME = 4, @@ -173,9 +177,9 @@ struct EnumValBuilder { }; inline flatbuffers::Offset CreateEnumVal(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - int64_t value = 0, - flatbuffers::Offset object = 0) { + flatbuffers::Offset name = 0, + int64_t value = 0, + flatbuffers::Offset object = 0) { EnumValBuilder builder_(_fbb); builder_.add_value(value); builder_.add_object(object); @@ -183,6 +187,13 @@ inline flatbuffers::Offset CreateEnumVal(flatbuffers::FlatBufferBuilder return builder_.Finish(); } +inline flatbuffers::Offset CreateEnumVal(flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + int64_t value = 0, + flatbuffers::Offset object = 0) { + return CreateEnumVal(_fbb, name ? 0 : _fbb.CreateString(name), value, object); +} + struct Enum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum { VT_NAME = 4, @@ -235,11 +246,11 @@ struct EnumBuilder { }; inline flatbuffers::Offset CreateEnum(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - flatbuffers::Offset>> values = 0, - bool is_union = false, - flatbuffers::Offset underlying_type = 0, - flatbuffers::Offset>> attributes = 0) { + flatbuffers::Offset name = 0, + flatbuffers::Offset>> values = 0, + bool is_union = false, + flatbuffers::Offset underlying_type = 0, + flatbuffers::Offset>> attributes = 0) { EnumBuilder builder_(_fbb); builder_.add_attributes(attributes); builder_.add_underlying_type(underlying_type); @@ -249,6 +260,15 @@ inline flatbuffers::Offset CreateEnum(flatbuffers::FlatBufferBuilder &_fbb return builder_.Finish(); } +inline flatbuffers::Offset CreateEnum(flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + const std::vector> *values = nullptr, + bool is_union = false, + flatbuffers::Offset underlying_type = 0, + const std::vector> *attributes = nullptr) { + return CreateEnum(_fbb, name ? 0 : _fbb.CreateString(name), values ? 0 : _fbb.CreateVector>(*values), is_union, underlying_type, attributes ? 0 : _fbb.CreateVector>(*attributes)); +} + struct Field FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum { VT_NAME = 4, @@ -318,16 +338,16 @@ struct FieldBuilder { }; inline flatbuffers::Offset CreateField(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - flatbuffers::Offset type = 0, - uint16_t id = 0, - uint16_t offset = 0, - int64_t default_integer = 0, - double default_real = 0.0, - bool deprecated = false, - bool required = false, - bool key = false, - flatbuffers::Offset>> attributes = 0) { + flatbuffers::Offset name = 0, + flatbuffers::Offset type = 0, + uint16_t id = 0, + uint16_t offset = 0, + int64_t default_integer = 0, + double default_real = 0.0, + bool deprecated = false, + bool required = false, + bool key = false, + flatbuffers::Offset>> attributes = 0) { FieldBuilder builder_(_fbb); builder_.add_default_real(default_real); builder_.add_default_integer(default_integer); @@ -342,6 +362,20 @@ inline flatbuffers::Offset CreateField(flatbuffers::FlatBufferBuilder &_f return builder_.Finish(); } +inline flatbuffers::Offset CreateField(flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + flatbuffers::Offset type = 0, + uint16_t id = 0, + uint16_t offset = 0, + int64_t default_integer = 0, + double default_real = 0.0, + bool deprecated = false, + bool required = false, + bool key = false, + const std::vector> *attributes = nullptr) { + return CreateField(_fbb, name ? 0 : _fbb.CreateString(name), type, id, offset, default_integer, default_real, deprecated, required, key, attributes ? 0 : _fbb.CreateVector>(*attributes)); +} + struct Object FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum { VT_NAME = 4, @@ -396,12 +430,12 @@ struct ObjectBuilder { }; inline flatbuffers::Offset CreateObject(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - flatbuffers::Offset>> fields = 0, - bool is_struct = false, - int32_t minalign = 0, - int32_t bytesize = 0, - flatbuffers::Offset>> attributes = 0) { + flatbuffers::Offset name = 0, + flatbuffers::Offset>> fields = 0, + bool is_struct = false, + int32_t minalign = 0, + int32_t bytesize = 0, + flatbuffers::Offset>> attributes = 0) { ObjectBuilder builder_(_fbb); builder_.add_attributes(attributes); builder_.add_bytesize(bytesize); @@ -412,6 +446,16 @@ inline flatbuffers::Offset CreateObject(flatbuffers::FlatBufferBuilder & return builder_.Finish(); } +inline flatbuffers::Offset CreateObject(flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + const std::vector> *fields = nullptr, + bool is_struct = false, + int32_t minalign = 0, + int32_t bytesize = 0, + const std::vector> *attributes = nullptr) { + return CreateObject(_fbb, name ? 0 : _fbb.CreateString(name), fields ? 0 : _fbb.CreateVector>(*fields), is_struct, minalign, bytesize, attributes ? 0 : _fbb.CreateVector>(*attributes)); +} + struct Schema FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { enum { VT_OBJECTS = 4, @@ -462,11 +506,11 @@ struct SchemaBuilder { }; inline flatbuffers::Offset CreateSchema(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> objects = 0, - flatbuffers::Offset>> enums = 0, - flatbuffers::Offset file_ident = 0, - flatbuffers::Offset file_ext = 0, - flatbuffers::Offset root_table = 0) { + flatbuffers::Offset>> objects = 0, + flatbuffers::Offset>> enums = 0, + flatbuffers::Offset file_ident = 0, + flatbuffers::Offset file_ext = 0, + flatbuffers::Offset root_table = 0) { SchemaBuilder builder_(_fbb); builder_.add_root_table(root_table); builder_.add_file_ext(file_ext); @@ -476,6 +520,15 @@ inline flatbuffers::Offset CreateSchema(flatbuffers::FlatBufferBuilder & return builder_.Finish(); } +inline flatbuffers::Offset CreateSchema(flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *objects = nullptr, + const std::vector> *enums = nullptr, + const char *file_ident = nullptr, + const char *file_ext = nullptr, + flatbuffers::Offset root_table = 0) { + return CreateSchema(_fbb, objects ? 0 : _fbb.CreateVector>(*objects), enums ? 0 : _fbb.CreateVector>(*enums), file_ident ? 0 : _fbb.CreateString(file_ident), file_ext ? 0 : _fbb.CreateString(file_ext), root_table); +} + inline const reflection::Schema *GetSchema(const void *buf) { return flatbuffers::GetRoot(buf); } inline const char *SchemaIdentifier() { return "BFBS"; } diff --git a/readme.md b/readme.md index 3a7f929ef..38bf355dd 100755 --- a/readme.md +++ b/readme.md @@ -1,8 +1,10 @@ -![logo](http://google.github.io/flatbuffers/fpl_logo_small.png) FlatBuffers [![Build Status](https://travis-ci.org/google/flatbuffers.svg?branch=master)](https://travis-ci.org/google/flatbuffers) +![logo](http://google.github.io/flatbuffers/fpl_logo_small.png) FlatBuffers =========== -**FlatBuffers** is an efficient cross platform serialization library for games and -other memory constrained apps. It allows you to directly access serialized data without -unpacking/parsing it first, while still having great forwards/backwards compatibility. +[![Build Status](https://travis-ci.org/google/flatbuffers.svg?branch=master)](https://travis-ci.org/google/flatbuffers) [![Build status](https://ci.appveyor.com/api/projects/status/yg5idd2fnusv1n10?svg=true)](https://ci.appveyor.com/project/gwvo/flatbuffers) + +**FlatBuffers** is an efficient cross platform serialization library for games and +other memory constrained apps. It allows you to directly access serialized data without +unpacking/parsing it first, while still having great forwards/backwards compatibility. **Go to our [landing page][] to browse our documentation.** @@ -11,7 +13,7 @@ unpacking/parsing it first, while still having great forwards/backwards compatib * Windows * MacOS X * Linux - + ## Supported programming languages * C++ * C# @@ -24,7 +26,7 @@ unpacking/parsing it first, while still having great forwards/backwards compatib *and many more in progress...* -## Contribution +## Contribution * [FlatBuffers Google Group][] to discuss FlatBuffers with other developers and users. * [FlatBuffers Issues Tracker][] to submit an issue. * [stackoverflow.com][] with [`flatbuffers` tag][] for any questions regarding FlatBuffers. diff --git a/samples/monster_generated.h b/samples/monster_generated.h index 636aa3771..783d1c7f0 100644 --- a/samples/monster_generated.h +++ b/samples/monster_generated.h @@ -263,9 +263,9 @@ inline std::unique_ptr Monster::UnPack() const { { auto _e = mana(); _o->mana = _e; }; { auto _e = hp(); _o->hp = _e; }; { auto _e = name(); if (_e) _o->name = _e->str(); }; - { auto _e = inventory(); if (_e) { for (size_t _i = 0; _i < _e->size(); _i++) { _o->inventory.push_back(_e->Get(_i)); } } }; + { auto _e = inventory(); if (_e) { for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inventory.push_back(_e->Get(_i)); } } }; { auto _e = color(); _o->color = _e; }; - { auto _e = weapons(); if (_e) { for (size_t _i = 0; _i < _e->size(); _i++) { _o->weapons.push_back(_e->Get(_i)->UnPack()); } } }; + { auto _e = weapons(); if (_e) { for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weapons.push_back(_e->Get(_i)->UnPack()); } } }; { auto _e = equipped_type(); _o->equipped.type = _e; }; { auto _e = equipped(); if (_e) _o->equipped.table = EquipmentUnion::UnPack(_e, equipped_type()); }; return std::unique_ptr(_o); diff --git a/src/idl_gen_go.cpp b/src/idl_gen_go.cpp index 1f6b103ea..5f1bcf5e8 100644 --- a/src/idl_gen_go.cpp +++ b/src/idl_gen_go.cpp @@ -85,7 +85,33 @@ static void EnumMember(const EnumDef &enum_def, const EnumVal ev, // End enum code. static void EndEnum(std::string *code_ptr) { std::string &code = *code_ptr; - code += ")\n"; + code += ")\n\n"; +} + +// Begin enum name code. +static void BeginEnumNames(const EnumDef &enum_def, std::string *code_ptr) { + std::string &code = *code_ptr; + code += "var EnumNames"; + code += enum_def.name; + code += " = map[int]string{\n"; +} + +// A single enum name member. +static void EnumNameMember(const EnumDef &enum_def, const EnumVal ev, + std::string *code_ptr) { + std::string &code = *code_ptr; + code += "\t"; + code += enum_def.name; + code += ev.name; + code += ":\""; + code += ev.name; + code += "\",\n"; +} + +// End enum name code. +static void EndEnumNames(std::string *code_ptr) { + std::string &code = *code_ptr; + code += "}\n\n"; } // Initialize a new struct or table from existing data. @@ -597,6 +623,15 @@ static void GenEnum(const EnumDef &enum_def, std::string *code_ptr) { EnumMember(enum_def, ev, code_ptr); } EndEnum(code_ptr); + + BeginEnumNames(enum_def, code_ptr); + for (auto it = enum_def.vals.vec.begin(); + it != enum_def.vals.vec.end(); + ++it) { + auto &ev = **it; + EnumNameMember(enum_def, ev, code_ptr); + } + EndEnumNames(code_ptr); } // Returns the function name that is able to read a value of the given type. diff --git a/src/reflection.cpp b/src/reflection.cpp index ff499ae99..8f2fc6905 100644 --- a/src/reflection.cpp +++ b/src/reflection.cpp @@ -204,72 +204,76 @@ class ResizeContext { if (DagCheck(table)) return; // Table already visited. auto vtable = table->GetVTable(); - // Check if the vtable offset points beyond the insertion point. - Straddle(table, vtable, table); - // This direction shouldn't happen because vtables that sit before tables - // are always directly adjacent, but check just in case we ever change the - // way flatbuffers are built. - Straddle(vtable, table, table); // Early out: since all fields inside the table must point forwards in // memory, if the insertion point is before the table we can stop here. auto tableloc = reinterpret_cast(table); - if (startptr_ <= tableloc) return; - // Check each field. - auto fielddefs = objectdef.fields(); - for (auto it = fielddefs->begin(); it != fielddefs->end(); ++it) { - auto &fielddef = **it; - auto base_type = fielddef.type()->base_type(); - // Ignore scalars. - if (base_type <= reflection::Double) continue; - // Ignore fields that are not stored. - auto offset = table->GetOptionalFieldOffset(fielddef.offset()); - if (!offset) continue; - // Ignore structs. - auto subobjectdef = base_type == reflection::Obj ? - schema_.objects()->Get(fielddef.type()->index()) : nullptr; - if (subobjectdef && subobjectdef->is_struct()) continue; - // Get this fields' offset, and read it if safe. - auto offsetloc = tableloc + offset; - if (DagCheck(offsetloc)) - continue; // This offset already visited. - auto ref = offsetloc + ReadScalar(offsetloc); - Straddle(offsetloc, ref, offsetloc); - // Recurse. - switch (base_type) { - case reflection::Obj: { - ResizeTable(*subobjectdef, reinterpret_cast(ref)); - break; - } - case reflection::Vector: { - auto elem_type = fielddef.type()->element(); - if (elem_type != reflection::Obj && elem_type != reflection::String) + if (startptr_ <= tableloc) { + // Check if insertion point is between the table and a vtable that + // precedes it. This can't happen in current construction code, but check + // just in case we ever change the way flatbuffers are built. + Straddle(vtable, table, table); + } else { + // Check each field. + auto fielddefs = objectdef.fields(); + for (auto it = fielddefs->begin(); it != fielddefs->end(); ++it) { + auto &fielddef = **it; + auto base_type = fielddef.type()->base_type(); + // Ignore scalars. + if (base_type <= reflection::Double) continue; + // Ignore fields that are not stored. + auto offset = table->GetOptionalFieldOffset(fielddef.offset()); + if (!offset) continue; + // Ignore structs. + auto subobjectdef = base_type == reflection::Obj ? + schema_.objects()->Get(fielddef.type()->index()) : nullptr; + if (subobjectdef && subobjectdef->is_struct()) continue; + // Get this fields' offset, and read it if safe. + auto offsetloc = tableloc + offset; + if (DagCheck(offsetloc)) + continue; // This offset already visited. + auto ref = offsetloc + ReadScalar(offsetloc); + Straddle(offsetloc, ref, offsetloc); + // Recurse. + switch (base_type) { + case reflection::Obj: { + ResizeTable(*subobjectdef, reinterpret_cast
(ref)); break; - auto vec = reinterpret_cast *>(ref); - auto elemobjectdef = elem_type == reflection::Obj - ? schema_.objects()->Get(fielddef.type()->index()) - : nullptr; - if (elemobjectdef && elemobjectdef->is_struct()) break; - for (uoffset_t i = 0; i < vec->size(); i++) { - auto loc = vec->Data() + i * sizeof(uoffset_t); - if (DagCheck(loc)) - continue; // This offset already visited. - auto dest = loc + vec->Get(i); - Straddle(loc, dest ,loc); - if (elemobjectdef) - ResizeTable(*elemobjectdef, reinterpret_cast
(dest)); } - break; + case reflection::Vector: { + auto elem_type = fielddef.type()->element(); + if (elem_type != reflection::Obj && elem_type != reflection::String) + break; + auto vec = reinterpret_cast *>(ref); + auto elemobjectdef = elem_type == reflection::Obj + ? schema_.objects()->Get(fielddef.type()->index()) + : nullptr; + if (elemobjectdef && elemobjectdef->is_struct()) break; + for (uoffset_t i = 0; i < vec->size(); i++) { + auto loc = vec->Data() + i * sizeof(uoffset_t); + if (DagCheck(loc)) + continue; // This offset already visited. + auto dest = loc + vec->Get(i); + Straddle(loc, dest ,loc); + if (elemobjectdef) + ResizeTable(*elemobjectdef, reinterpret_cast
(dest)); + } + break; + } + case reflection::Union: { + ResizeTable(GetUnionType(schema_, objectdef, fielddef, *table), + reinterpret_cast
(ref)); + break; + } + case reflection::String: + break; + default: + assert(false); } - case reflection::Union: { - ResizeTable(GetUnionType(schema_, objectdef, fielddef, *table), - reinterpret_cast
(ref)); - break; - } - case reflection::String: - break; - default: - assert(false); } + // Check if the vtable offset points beyond the insertion point. + // Must do this last, since GetOptionalFieldOffset above still reads + // this value. + Straddle(table, vtable, table); } } diff --git a/tests/MyGame/Example/Any.go b/tests/MyGame/Example/Any.go index df9f823fc..d69b141b7 100644 --- a/tests/MyGame/Example/Any.go +++ b/tests/MyGame/Example/Any.go @@ -8,3 +8,11 @@ const ( AnyTestSimpleTableWithEnum = 2 AnyMyGame_Example2_Monster = 3 ) + +var EnumNamesAny = map[int]string{ + AnyNONE:"NONE", + AnyMonster:"Monster", + AnyTestSimpleTableWithEnum:"TestSimpleTableWithEnum", + AnyMyGame_Example2_Monster:"MyGame_Example2_Monster", +} + diff --git a/tests/MyGame/Example/Color.go b/tests/MyGame/Example/Color.go index 09f6d5805..d1eac5406 100644 --- a/tests/MyGame/Example/Color.go +++ b/tests/MyGame/Example/Color.go @@ -7,3 +7,10 @@ const ( ColorGreen = 2 ColorBlue = 8 ) + +var EnumNamesColor = map[int]string{ + ColorRed:"Red", + ColorGreen:"Green", + ColorBlue:"Blue", +} + diff --git a/tests/MyGame/Example2/Monster.go b/tests/MyGame/Example2/Monster.go index e12b05453..789d46782 100644 --- a/tests/MyGame/Example2/Monster.go +++ b/tests/MyGame/Example2/Monster.go @@ -9,6 +9,13 @@ type Monster struct { _tab flatbuffers.Table } +func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &Monster{} + x.Init(buf, n + offset) + return x +} + func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/MyGame/Example2/Monster.py b/tests/MyGame/Example2/Monster.py index 0b98211e4..d334f8ea2 100644 --- a/tests/MyGame/Example2/Monster.py +++ b/tests/MyGame/Example2/Monster.py @@ -7,6 +7,13 @@ import flatbuffers class Monster(object): __slots__ = ['_tab'] + @classmethod + def GetRootAsMonster(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = Monster() + x.Init(buf, n + offset) + return x + # Monster def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) diff --git a/tests/generate_code.sh b/tests/generate_code.sh index 1b347ba79..bf6f3c8eb 100644 --- a/tests/generate_code.sh +++ b/tests/generate_code.sh @@ -17,4 +17,7 @@ ../flatc --cpp --java --csharp --go --binary --python --js --php --grpc --gen-mutable --gen-object-api --no-includes monster_test.fbs monsterdata_test.json ../flatc --cpp --java --csharp --go --binary --python --js --php --gen-mutable -o namespace_test namespace_test/namespace_test1.fbs namespace_test/namespace_test2.fbs ../flatc --binary --schema monster_test.fbs - +cd ../samples +../flatc --cpp --gen-mutable --gen-object-api monster.fbs +cd ../reflection +sh generate_code.sh diff --git a/tests/go_test.go b/tests/go_test.go index e4e96de8c..75d6b1f57 100644 --- a/tests/go_test.go +++ b/tests/go_test.go @@ -100,6 +100,9 @@ func TestAll(t *testing.T) { // Verify that vtables are deduplicated when written: CheckVtableDeduplication(t.Fatalf) + // Verify the enum names + CheckEnumNames(t.Fatalf) + // Verify that the Go code used in FlatBuffers documentation passes // some sanity checks: CheckDocExample(generated, off, t.Fatalf) @@ -1314,6 +1317,37 @@ func CheckFinishedBytesError(fail func(string, ...interface{})) { b.FinishedBytes() } +// CheckEnumNames checks that the generated enum names are correct. +func CheckEnumNames(fail func(string, ...interface{})) { + type testEnumNames struct { + EnumNames map[int]string + Expected map[int]string + } + data := [...]testEnumNames{ + {example.EnumNamesAny, + map[int]string{ + example.AnyNONE: "NONE", + example.AnyMonster: "Monster", + example.AnyTestSimpleTableWithEnum: "TestSimpleTableWithEnum", + }, + }, + {example.EnumNamesColor, + map[int]string{ + example.ColorRed: "Red", + example.ColorGreen: "Green", + example.ColorBlue: "Blue", + }, + }, + } + for _, t := range data { + for val, name := range t.Expected { + if name != t.EnumNames[val] { + fail("enum name is not equal") + } + } + } +} + // CheckDocExample checks that the code given in FlatBuffers documentation // is syntactically correct. func CheckDocExample(buf []byte, off flatbuffers.UOffsetT, fail func(string, ...interface{})) { diff --git a/tests/monster_test.bfbs b/tests/monster_test.bfbs index 1e8a270d8..e131ac8c2 100644 Binary files a/tests/monster_test.bfbs and b/tests/monster_test.bfbs differ diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go index c956fb42c..2d7705730 100644 --- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go +++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.go @@ -9,6 +9,13 @@ type TableInNestedNS struct { _tab flatbuffers.Table } +func GetRootAsTableInNestedNS(buf []byte, offset flatbuffers.UOffsetT) *TableInNestedNS { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &TableInNestedNS{} + x.Init(buf, n + offset) + return x +} + func (rcv *TableInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py index e8e1f2ba7..d6d167409 100644 --- a/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py +++ b/tests/namespace_test/NamespaceA/NamespaceB/TableInNestedNS.py @@ -7,6 +7,13 @@ import flatbuffers class TableInNestedNS(object): __slots__ = ['_tab'] + @classmethod + def GetRootAsTableInNestedNS(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = TableInNestedNS() + x.Init(buf, n + offset) + return x + # TableInNestedNS def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.go b/tests/namespace_test/NamespaceA/SecondTableInA.go index efc7713f8..40454419f 100644 --- a/tests/namespace_test/NamespaceA/SecondTableInA.go +++ b/tests/namespace_test/NamespaceA/SecondTableInA.go @@ -9,6 +9,13 @@ type SecondTableInA struct { _tab flatbuffers.Table } +func GetRootAsSecondTableInA(buf []byte, offset flatbuffers.UOffsetT) *SecondTableInA { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &SecondTableInA{} + x.Init(buf, n + offset) + return x +} + func (rcv *SecondTableInA) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/namespace_test/NamespaceA/SecondTableInA.py b/tests/namespace_test/NamespaceA/SecondTableInA.py index ab11701a2..20dac3e26 100644 --- a/tests/namespace_test/NamespaceA/SecondTableInA.py +++ b/tests/namespace_test/NamespaceA/SecondTableInA.py @@ -7,6 +7,13 @@ import flatbuffers class SecondTableInA(object): __slots__ = ['_tab'] + @classmethod + def GetRootAsSecondTableInA(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = SecondTableInA() + x.Init(buf, n + offset) + return x + # SecondTableInA def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.go b/tests/namespace_test/NamespaceA/TableInFirstNS.go index 0a002b3b7..5122fd7ee 100644 --- a/tests/namespace_test/NamespaceA/TableInFirstNS.go +++ b/tests/namespace_test/NamespaceA/TableInFirstNS.go @@ -9,6 +9,13 @@ type TableInFirstNS struct { _tab flatbuffers.Table } +func GetRootAsTableInFirstNS(buf []byte, offset flatbuffers.UOffsetT) *TableInFirstNS { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &TableInFirstNS{} + x.Init(buf, n + offset) + return x +} + func (rcv *TableInFirstNS) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/namespace_test/NamespaceA/TableInFirstNS.py b/tests/namespace_test/NamespaceA/TableInFirstNS.py index 3a652f495..40cbeba0d 100644 --- a/tests/namespace_test/NamespaceA/TableInFirstNS.py +++ b/tests/namespace_test/NamespaceA/TableInFirstNS.py @@ -7,6 +7,13 @@ import flatbuffers class TableInFirstNS(object): __slots__ = ['_tab'] + @classmethod + def GetRootAsTableInFirstNS(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = TableInFirstNS() + x.Init(buf, n + offset) + return x + # TableInFirstNS def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) diff --git a/tests/namespace_test/NamespaceC/TableInC.go b/tests/namespace_test/NamespaceC/TableInC.go index dc75c45c2..81c59f17e 100644 --- a/tests/namespace_test/NamespaceC/TableInC.go +++ b/tests/namespace_test/NamespaceC/TableInC.go @@ -9,6 +9,13 @@ type TableInC struct { _tab flatbuffers.Table } +func GetRootAsTableInC(buf []byte, offset flatbuffers.UOffsetT) *TableInC { + n := flatbuffers.GetUOffsetT(buf[offset:]) + x := &TableInC{} + x.Init(buf, n + offset) + return x +} + func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i diff --git a/tests/namespace_test/NamespaceC/TableInC.py b/tests/namespace_test/NamespaceC/TableInC.py index 5a4376ed8..90b8736c1 100644 --- a/tests/namespace_test/NamespaceC/TableInC.py +++ b/tests/namespace_test/NamespaceC/TableInC.py @@ -7,6 +7,13 @@ import flatbuffers class TableInC(object): __slots__ = ['_tab'] + @classmethod + def GetRootAsTableInC(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = TableInC() + x.Init(buf, n + offset) + return x + # TableInC def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)