mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Put documentation to bfbs if it is not empty (#7649)
* Fix C/C++ Create<Type>Direct with sorted vectors If a struct has a key the vector has to be sorted. To sort the vector you can't use "const". * Changes due to code review * Improve code readability * Add generate of JSON schema to string to lib * option indent_step is supported * Remove unused variables * Fix break in test * Fix style to be consistent with rest of the code * [TS] Fix reserved words as arguments (#6955) * [TS] Fix generation of reserved words in object api (#7106) * [TS] Fix generation of object api * [TS] Fix MakeCamel -> ConvertCase * [C#] Fix collision of field name and type name * [TS] Add test for struct of struct of struct * Update generated files * Add missing files * [TS] Fix query of null/undefined fields in object api * Put documentation to bfbs if it is not empty * Fix monster test bfbs reference files * Fix generated monster test files Why they are different when generating it with linux and windows executable?
This commit is contained in:
Binary file not shown.
@@ -3798,7 +3798,7 @@ Offset<reflection::Object> StructDef::Serialize(FlatBufferBuilder *builder,
|
||||
const auto name__ = builder->CreateString(qualified_name);
|
||||
const auto flds__ = builder->CreateVectorOfSortedTables(&field_offsets);
|
||||
const auto attr__ = SerializeAttributes(builder, parser);
|
||||
const auto docs__ = parser.opts.binary_schema_comments
|
||||
const auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
std::string decl_file_in_project = declaration_file ? *declaration_file : "";
|
||||
@@ -3856,7 +3856,7 @@ Offset<reflection::Field> FieldDef::Serialize(FlatBufferBuilder *builder,
|
||||
auto name__ = builder->CreateString(name);
|
||||
auto type__ = value.type.Serialize(builder);
|
||||
auto attr__ = SerializeAttributes(builder, parser);
|
||||
auto docs__ = parser.opts.binary_schema_comments
|
||||
auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
double d;
|
||||
@@ -3909,7 +3909,7 @@ Offset<reflection::RPCCall> RPCCall::Serialize(FlatBufferBuilder *builder,
|
||||
const Parser &parser) const {
|
||||
auto name__ = builder->CreateString(name);
|
||||
auto attr__ = SerializeAttributes(builder, parser);
|
||||
auto docs__ = parser.opts.binary_schema_comments
|
||||
auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
return reflection::CreateRPCCall(
|
||||
@@ -3937,7 +3937,7 @@ Offset<reflection::Service> ServiceDef::Serialize(FlatBufferBuilder *builder,
|
||||
const auto name__ = builder->CreateString(qualified_name);
|
||||
const auto call__ = builder->CreateVector(servicecall_offsets);
|
||||
const auto attr__ = SerializeAttributes(builder, parser);
|
||||
const auto docs__ = parser.opts.binary_schema_comments
|
||||
const auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
std::string decl_file_in_project = declaration_file ? *declaration_file : "";
|
||||
@@ -3975,7 +3975,7 @@ Offset<reflection::Enum> EnumDef::Serialize(FlatBufferBuilder *builder,
|
||||
const auto vals__ = builder->CreateVector(enumval_offsets);
|
||||
const auto type__ = underlying_type.Serialize(builder);
|
||||
const auto attr__ = SerializeAttributes(builder, parser);
|
||||
const auto docs__ = parser.opts.binary_schema_comments
|
||||
const auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
std::string decl_file_in_project = declaration_file ? *declaration_file : "";
|
||||
@@ -4020,7 +4020,7 @@ Offset<reflection::EnumVal> EnumVal::Serialize(FlatBufferBuilder *builder,
|
||||
const auto name__ = builder->CreateString(name);
|
||||
const auto type__ = union_type.Serialize(builder);
|
||||
const auto attr__ = SerializeAttributes(builder, parser);
|
||||
const auto docs__ = parser.opts.binary_schema_comments
|
||||
const auto docs__ = parser.opts.binary_schema_comments && !doc_comment.empty()
|
||||
? builder->CreateVectorOfStrings(doc_comment)
|
||||
: 0;
|
||||
return reflection::CreateEnumVal(*builder, name__, value, type__, docs__,
|
||||
|
||||
Binary file not shown.
10719
tests/monster_test.afb
10719
tests/monster_test.afb
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user