lakedaemon
15863c34a0
SetNameSpace algorithm documentation and more meaningful variable names
2016-06-07 14:46:25 +02:00
lakedaemon
a3a2bf890f
Better C++ namespace management
2016-06-02 23:11:51 +02:00
lakedaemon
a9194c4c68
cpp generator : pulling all methods inside the class
2016-06-02 21:56:27 +02:00
Wouter van Oortmerssen
ca32eb77f3
Merge pull request #3885 from Lakedaemon/shareWarningAndTwoMethods
...
Share warning and two methods
2016-06-02 11:35:41 -07:00
BogDan Vatra
3e52fecd1e
Don't generate MIN & MAX enum values if "--no-prefix" is used.
...
Close #3892
2016-06-01 10:23:44 +03:00
BogDan Vatra
cccd7003ed
MIN & MAX are useless for bit_flags
...
Instead we need NONE (0) and ANY (all orred values), if the user didn't
already defined them
2016-06-01 10:15:41 +03:00
BogDan Vatra
0b0cf58f24
We already know the underlying_type.
...
We just need to pass it to DEFINE_BITMASK_OPERATORS macro
2016-06-01 10:04:55 +03:00
BogDan Vatra
7dfe8e726b
Define bit mask operators for scoped enums bitfields
...
Close #3887
2016-05-30 14:04:37 +03:00
lakedaemon
cd1493b082
sharing the Flatbuffers warning
2016-05-26 15:26:58 +02:00
Wouter van Oortmerssen
06eb6e94e3
Merge pull request #3880 from Lakedaemon/IsEverythingGenerated
...
shared method that exits early if everything is generated
2016-05-25 10:38:56 -07:00
Lakedaemon
4a8801da34
shared method that exits early if everything is generated
2016-05-25 15:15:56 +02:00
Wouter van Oortmerssen
933c195e51
Merge pull request #3843 from Lakedaemon/refactoring
...
Transition 1 (nice diffs) Go, C++ and General generators with class
2016-04-27 13:59:16 -07:00
Lakedaemon
6765c19d45
memory leak fix + php/js/python transition to class based generator
2016-04-26 20:36:43 +02:00
Lakedaemon
38597160f2
Enforcing the google C++ style guide
2016-04-15 13:20:26 +02:00
Wouter van Oortmerssen
29d957ed5e
Fixed missing "f" on float default values in C++/Java/C#
...
Bug: 28145201
Change-Id: I5a1818c40c2f4fbd00cfec3362040407976f7a39
Tested: on Linux.
2016-04-13 17:29:03 -07:00
Lakedaemon
8a64afabfd
Transition 1 (with nice diffs) Go, Cpp and General code generators with class
2016-04-13 23:21:18 +02:00
Wouter van Oortmerssen
e597ad8f0f
Fixed pre-declarations of included types in generated code.
...
This was harmless, but unnecessary.
Change-Id: I1365a725e254d4ebbda081110a50277cb5118323
Tested: on Linux.
2016-04-11 11:05:42 -07:00
Nnamdi
35f6bb5060
Added --gen-name-strings command line option.
...
To support the use case described in issue google/flatbuffers#3826 , a new command line option --gen-name-strings
has been added, which will cause a static GetFullyQualifiedName function to be added
to the C++ output for tables/structs.
2016-03-29 22:25:04 +01:00
Wouter van Oortmerssen
20c0082ee5
Fixed namespace code generation for C++
...
The code generator was assuming all declarations for the current
file sit in the same namepace. Now uses the "on demand" namespace
switching we had for the forward declarations.
Also fixed a bug related to namespace lookup.
Change-Id: Ib54a3efbc752cbb9590302fa0707c0c73448db3d
Tested: on Linux.
2016-02-17 11:26:38 -08:00
Wouter van Oortmerssen
2ab7ebc82b
Merge pull request #3510 from jaakristioja/patch-1
...
Fixed comment typo
2016-01-19 15:36:45 -08:00
Wouter van Oortmerssen
d75d29e2fe
Merge branch 'master' of https://github.com/google/flatbuffers
2016-01-19 14:10:49 -08:00
Wouter van Oortmerssen
e848137ded
Added min/max values for enums/unions.
...
Bug: 21642898
Change-Id: Ifaf0b3c4274fe30ef29507ba1c1216d700efe85b
Tested: on Linux.
2016-01-19 14:05:27 -08:00
Jaak Ristioja
77a6a786b8
Fixed comment typo
2016-01-13 15:30:27 +02:00
Chandra Penke
b63ebad49d
Fix #3497 : Add support for compiling in g++ 4.4 and 4.5
...
- Removed uses of lambda expressions
- Added custom defines for constexpr and nullptr
- Removed trailing comma of last value from generated enums
2016-01-09 06:30:50 -06:00
Wouter van Oortmerssen
6fba6b6e71
Fixed compiler warnings for cast to bool in generated code.
...
Change-Id: I7727aeb478feb23d8ef66fd1ba9499b142b3ea7d
Tested: on Linux.
2015-12-09 12:56:24 -08:00
Jason Sanmiya
fe2f8d32aa
Do not create empty enums.
...
Mac build issued a warning for enum{}.
Change-Id: I9cab958538ac3cec61aeae289d1da0118ecac15f
Tested: Mac build no longer issues warnings.
2015-12-04 09:45:44 -08:00
Wouter van Oortmerssen
45bda6e08d
Added --gen-all to generate code for a schema and all its includes.
...
Also refactored the way options are stored.
Change-Id: I709ac908cd2aba396c9c282725cf1d42ccce0882
Tested: on Linux.
2015-12-04 09:44:31 -08:00
Wouter van Oortmerssen
7b06041a7c
C++ generated code now has constants for vtable offsets.
...
Besides making the generated code looking a lot more readable,
it also allows you to use these offsets in calls to
Table::CheckField, to see if a field is present in a table.
Change-Id: I1b4cc350c4f27c4e474c31add40c701ef4ae63b2
Tested: On Linux.
2015-12-02 11:12:39 -08:00
Wouter van Oortmerssen
3fc5387db7
Made C++ generated code use "bool" instead of uint8_t wire type.
...
Change-Id: I5756d15a758429ca67456264842017063d1f755e
Tested: on Linux.
2015-12-02 11:12:39 -08:00
Wouter van Oortmerssen
b7d8c2af1a
Made generated C++ code respect gcc -Werror=shadow.
...
Change-Id: I17de0bcc462770124227a9967e2aab620467f6eb
Tested: on Linux.
2015-12-02 11:12:39 -08:00
takaken1994
c4966370e2
C++: Fixed generated header file cannot be compiled when the type of key is enum class
2015-11-15 21:24:08 +09:00
Wouter van Oortmerssen
94680f5483
Added support for imports and many other .proto features.
...
Change-Id: I6600021b7ec8c486794349511232c3e604421c5b
Tested: on Linux.
2015-10-13 14:01:55 -07:00
vijairaj
c02b16e195
Implemented option --scoped-enum for C++ generator
...
This generates C++11 style scoped and strongly typed enums.
Enabling this option also implies --no-prefix.
2015-09-15 16:13:52 +05:30
Wouter van Oortmerssen
81312c2128
Initial reflection and resizing functionality.
...
Tested: on Linux.
Change-Id: I8f7bccf9b1ad87fea788f85e23fa69435758feca
2015-06-15 15:53:10 -07:00
Wouter van Oortmerssen
b8681d8031
fixed the windows build files
2015-05-13 17:26:20 -07:00
rw
48dfc69ee6
Port FlatBuffers to Python.
...
Implement code generation and self-contained runtime library for Python.
The test suite verifies:
- Correctness of generated Python code by comparing output to that of
the other language ports.
- The exact bytes in the Builder buffer during many scenarios.
- Vtable deduplication correctness.
- Edge cases for table construction, via a fuzzer derived from the Go
implementation.
- All code is simultaneously valid in Python 2.6, 2.7, and 3.4.
The test suite includes benchmarks for:
- Building 'gold' data.
- Parsing 'gold' data.
- Deduplicating vtables.
All tests pass on this author's system for the following Python
implementations:
- CPython 2.6.7
- CPython 2.7.8
- CPython 3.4.2
- PyPy 2.5.0 (CPython 2.7.8 compatible)
2015-05-12 15:40:29 -07:00
Brett Cooley
249f71a12b
Initial support for propagating namespaces from schema files to generated code
...
Change-Id: Ifc10c54845ea7553586d1896d509314d68e9ab0f
2015-05-05 17:10:53 -07:00
Wouter van Oortmerssen
37e6efe1f9
Added accessor for file_extension in generated code.
...
Change-Id: I2de7d14dbb1f7b8f81022dd2c9da65060ae49300
Tested: on Linux.
2015-05-04 13:38:20 -07:00
Wouter van Oortmerssen
3ec5dddb00
Mutable FlatBuffers: in-place updates.
...
This commit contains the first step in providing mutable FlatBuffers,
non-const accessors and mutation functions for existing fields generated
from --gen-mutable.
Change-Id: Iebee3975f05c1001f8e22824725edeaa6d85fbee
Tested: on Linux.
Bug: 15777024
2015-04-29 10:58:45 -07:00
Advay Mengle
b8708beeec
Generate Java doc comments in JavaDoc style
...
Tested by regenerating all tests/ generated sources; note that only
Monster.java changes. Ran flattests as well.
Change-Id: I65b6ea7d208b0ccd6a0b34761162fed6ba391fc5
2015-04-01 17:10:52 -07:00
Hyungjin Kim
c9a840e935
Change nested_root accessor to be const function.
...
The `<field>_nested_root()` is not viable from const object. (We usually get `const Monster *`.)
Change-Id: I0d0adcb38dd974318608417ee3094c34fb9c480d
2015-02-11 10:54:03 -08:00
Gabriel Martinez
df4909e5f6
Add options to print build rule dependencies
...
Tested: on Linux
Bug: 16465909
Change-Id: I2f1a6def13e47716110426b00990c2c625c03251
2015-01-28 11:27:05 -08:00
Wouter van Oortmerssen
3550899987
Sorted Vector & binary search functionality.
...
Bug: 16659276
Tested: on Linux & Windows.
Change-Id: Ie7a73810345fad4cf0a3ad03dfaa5464e3ed5ac8
2015-01-16 10:59:52 -08:00
Wouter van Oortmerssen
352b743c71
Union verification functions were not correctly namespaced.
...
Bug: 18908613
Change-Id: Ifed8a33b6b976b64eed9d190d930b08de1d5f41e
Tested: on Linux.
2015-01-07 13:37:25 -08:00
Lars Magnusson
354fd906a5
Generate C++ function returning the file_identifier of a flatbuffer
...
Change-Id: I6ee09cf1e86a41b73bb3aa79b68871afb1a4e34f
2014-12-08 17:00:56 -08:00
Wouter van Oortmerssen
285501f7be
Added "final" to generated types to block inheritance.
...
People sometimes accidentally inherit from these types.
Bug: 18224703
Change-Id: Ia09489a834ac4941f9b4a46f240cbdcf456f03a1
Tested: on Windows and Linux.
2014-11-19 13:41:15 -08:00
Wouter van Oortmerssen
d38b9af243
Added .proto parsing and convertion to .fbs.
...
Bug: 15777858
Change-Id: Iabef9b8c8044e593bb89510feebdee00d2f1840b
Tested: on Linux and Windows.
2014-10-15 17:42:31 -07:00
Wouter van Oortmerssen
7b8053570e
Enums in C++ are now strongly typed.
...
Accessors and constructors now take enum types rather than ints.
Bug: 16570507
Change-Id: I4b50fd64ad2e662ea2481bc0ccea784326fb31c0
Tested: on Linux and Windows.
2014-09-23 17:25:50 -07:00
Wouter van Oortmerssen
30642c5a6f
Added option to flatc to generate dependent header statements.
...
Bug: 17322776
Change-Id: I3a4d3cb4ccd40bc3200a87653aa0ab8ecb90ce60
Tested: on Linux.
2014-09-23 14:13:35 -07:00
Wouter van Oortmerssen
517c964fe2
Support for required fields.
...
Change-Id: I560c7ca11b3d665eecafb528f3737b7e139ca9b0
Tested: on Linux and Windows.
2014-09-22 15:53:19 -07:00