Home
last modified time | relevance | path

Searched refs:union_type (Results 1 – 25 of 25) sorted by relevance

/third_party/flatbuffers/src/
Didl_gen_json_schema.cpp119 const auto &union_type = *ut; in GenType() local
120 if (union_type->union_type.base_type == BASE_TYPE_NONE) { continue; } in GenType()
121 if (union_type->union_type.base_type == BASE_TYPE_STRUCT) { in GenType()
123 "{ " + GenTypeRef(union_type->union_type.struct_def) + " }"); in GenType()
125 if (union_type != *type.enum_def->Vals().rbegin()) { in GenType()
Didl_gen_ts.cpp412 return !ev->IsZero() && IsString(ev->union_type); in UnionHasStringType()
434 if (IsString(ev.union_type)) { in GenUnionTypeTS()
436 } else if (ev.union_type.base_type == BASE_TYPE_STRUCT) { in GenUnionTypeTS()
437 type = AddImport(imports, union_enum, *ev.union_type.struct_def); in GenUnionTypeTS()
565 if (IsString(ev.union_type)) { in GenObjApiUnionTypeTS()
567 } else if (ev.union_type.base_type == BASE_TYPE_STRUCT) { in GenObjApiUnionTypeTS()
569 AddImport(imports, union_enum, *ev.union_type.struct_def), opts); in GenObjApiUnionTypeTS()
593 std::string GenUnionConvFunc(const Type &union_type, import_set &imports) { in GenUnionConvFunc() argument
594 if (union_type.enum_def) { in GenUnionConvFunc()
595 const auto &enum_def = *union_type.enum_def; in GenUnionConvFunc()
[all …]
Didl_gen_csharp.cpp319 if (IsString(val.union_type)) { return true; } in HasUnionStringValue()
773 if (val->union_type.base_type == BASE_TYPE_NONE) { continue; } in GenStruct()
774 auto union_field_type_name = GenTypeGet(val->union_type); in GenStruct()
776 if (val->union_type.base_type == BASE_TYPE_STRUCT && in GenStruct()
777 val->union_type.struct_def->attributes.Lookup("private")) { in GenStruct()
785 if (IsString(val->union_type)) { in GenStruct()
1311 if (ev.union_type.base_type == BASE_TYPE_NONE) continue; in GenEnum_ObjectAPI()
1312 auto type_name = GenTypeGet_ObjectAPI(ev.union_type, opts); in GenEnum_ObjectAPI()
1313 if (ev.union_type.base_type == BASE_TYPE_STRUCT && in GenEnum_ObjectAPI()
1314 ev.union_type.struct_def->attributes.Lookup("private")) { in GenEnum_ObjectAPI()
[all …]
Didl_gen_cpp.cpp889 if (ev.union_type.base_type == BASE_TYPE_STRUCT) { in GetUnionElement()
890 auto name = ev.union_type.struct_def->name; in GetUnionElement()
892 name = NativeName(name, ev.union_type.struct_def, opts); in GetUnionElement()
894 return WrapInNameSpace(ev.union_type.struct_def->defined_namespace, name); in GetUnionElement()
895 } else if (IsString(ev.union_type)) { in GetUnionElement()
995 types.push_back(enum_def->is_union ? ev.union_type in GenMiniReflect()
1420 if (ev.union_type.base_type == BASE_TYPE_STRUCT) { in GenUnionPost()
1421 if (ev.union_type.struct_def->fixed) { in GenUnionPost()
1429 } else if (IsString(ev.union_type)) { in GenUnionPost()
1474 if (ev.union_type.base_type == BASE_TYPE_STRUCT) { in GenUnionPost()
[all …]
Didl_parser.cpp1130 if (enum_val->union_type.base_type == BASE_TYPE_STRUCT) { in ParseAnyValue()
1131 ECHECK(ParseTable(*enum_val->union_type.struct_def, &val.constant, in ParseAnyValue()
1133 if (enum_val->union_type.struct_def->fixed) { in ParseAnyValue()
1135 SerializeStruct(*enum_val->union_type.struct_def, val); in ParseAnyValue()
1139 } else if (IsString(enum_val->union_type)) { in ParseAnyValue()
2210 FLATBUFFERS_ASSERT((temp->union_type.enum_def == nullptr) || in AcceptEnumerator()
2211 (temp->union_type.enum_def == &enum_def)); in AcceptEnumerator()
2343 ECHECK(ParseType(ev.union_type)); in ParseEnum()
2344 if (ev.union_type.base_type != BASE_TYPE_STRUCT && in ParseEnum()
2345 ev.union_type.base_type != BASE_TYPE_STRING) in ParseEnum()
[all …]
Didl_gen_swift.cpp1303 auto type = GenType(field.union_type); in BuildUnionEnumSwitchCaseWritter()
1304 auto is_struct = IsStruct(field.union_type) ? type + Mutable() : type; in BuildUnionEnumSwitchCaseWritter()
1305 if (field.union_type.base_type == BASE_TYPE_NONE) { continue; } in BuildUnionEnumSwitchCaseWritter()
1308 code_ += "var __obj = value as? " + GenType(field.union_type, true); in BuildUnionEnumSwitchCaseWritter()
1332 if (field.union_type.base_type == BASE_TYPE_NONE) { continue; } in BuildUnionEnumSwitchCase()
1333 auto type = IsStruct(field.union_type) in BuildUnionEnumSwitchCase()
1334 ? GenType(field.union_type) + Mutable() in BuildUnionEnumSwitchCase()
1335 : GenType(field.union_type); in BuildUnionEnumSwitchCase()
Didl_gen_fbs.cpp116 schema += " " + GenType(ev.union_type) + ",\n"; in GenerateFBS()
Didl_gen_python.cpp891 switch (ev.union_type.base_type) { in GenUnionInit()
893 field_type = GenTypeGet(ev.union_type) + "T"; in GenUnionInit()
895 auto package_reference = GenPackageReference(ev.union_type); in GenUnionInit()
1565 auto field_type = GenTypeGet(ev.union_type) + "T"; in GenUnionCreatorForStruct()
1570 auto package_reference = GenPackageReference(ev.union_type); in GenUnionCreatorForStruct()
1605 switch (ev.union_type.base_type) { in GenUnionCreator()
Didl_gen_rust.cpp810 if (enum_val.union_type.base_type == BASE_TYPE_NONE) continue; in ForAllUnionObjectVariantsBesidesNone()
815 NamespacedNativeName(*enum_val.union_type.struct_def)); in ForAllUnionObjectVariantsBesidesNone()
1495 if (ev.union_type.base_type == BASE_TYPE_NONE) { continue; } in ForAllUnionVariantsBesidesNone()
1501 WrapInNameSpace(ev.union_type.struct_def->defined_namespace, in ForAllUnionVariantsBesidesNone()
1502 ev.union_type.struct_def->name)); in ForAllUnionVariantsBesidesNone()
Didl_gen_lobster.cpp170 NamespacedName(*ev.union_type.struct_def) + in GenStructAccessor()
Didl_gen_text.cpp183 return PrintOffset(val, enum_val->union_type, indent, nullptr, -1); in PrintOffset()
Didl_gen_go.cpp838 code += "\t\treturn t.Value.(" + NativeType(ev.union_type) + in GenNativeUnionPack()
859 code += "\t\tx := " + ev.union_type.struct_def->name + "{_tab: table}\n"; in GenNativeUnionUnPack()
Dreflection.cpp532 auto elem_type = fb_enum->values()->Get(utype)->union_type(); in VerifyUnion()
Didl_gen_dart.cpp529 enum_def.defined_namespace, ev.union_type); in GenImplementationGetters()
/third_party/flatbuffers/reflection/
Dreflection.fbs51 object:Object; // Will be deprecated in favor of union_type in the future.
52 union_type:Type;
/third_party/flatbuffers/include/flatbuffers/
Dminireflect.h195 auto union_type = *prev_val; // Always a uint8_t. in IterateValue() local
198 union_type = type_vec->Get(static_cast<uoffset_t>(vector_index)); in IterateValue()
201 LookupEnum(union_type, type_table->values, type_table->num_elems); in IterateValue()
Dreflection_generated.h322 const reflection::Type *union_type() const { in union_type() function
336 verifier.VerifyTable(union_type()) && in Verify()
357 void add_union_type(flatbuffers::Offset<reflection::Type> union_type) { in add_union_type()
358 fbb_.AddOffset(EnumVal::VT_UNION_TYPE, union_type); in add_union_type()
380 flatbuffers::Offset<reflection::Type> union_type = 0,
385 builder_.add_union_type(union_type);
396 flatbuffers::Offset<reflection::Type> union_type = 0,
405 union_type,
Dreflection.h413 auto union_type = GetFieldI<uint8_t>(table, *type_field); in GetUnionType() local
414 auto enumval = enumdef->values()->LookupByKey(union_type); in GetUnionType()
Didl.h401 Type union_type; member
/third_party/libffi/doc/
Dlibffi.info509 ffi_type union_type;
517 union_type.size = union_type.alignment = 0;
518 union_type.type = FFI_TYPE_STRUCT;
519 union_type.elements = element_types;
526 if (union_elements[i]->size > union_type.size)
528 union_type.size = union_elements[i];
531 if (union_elements[i]->alignment > union_type.alignment)
532 union_type.alignment = union_elements[i]->alignment;
Dlibffi.texi552 ffi_type union_type;
560 union_type.size = union_type.alignment = 0;
561 union_type.type = FFI_TYPE_STRUCT;
562 union_type.elements = element_types;
569 if (union_elements[i]->size > union_type.size)
571 union_type.size = union_elements[i];
574 if (union_elements[i]->alignment > union_type.alignment)
575 union_type.alignment = union_elements[i]->alignment;
/third_party/node/test/fixtures/wpt/resources/webidl2/lib/
Dwebidl2.js371 function union_type(typeName) { function
387 return single_type(typeName) || union_type(typeName);
392 const ret = single_type(typeName) || union_type(typeName);
/third_party/flatbuffers/docs/source/
DTutorial.md2973 auto union_type = monster.equipped_type();
2975 if (union_type == Equipment_Weapon) {
3046 union_type = monster.EquippedType()
3048 if union_type == MyGame.Sample.Equipment.Equipment().Weapon:
3080 $union_type = $monster->getEquippedType();
3082 if ($union_type == \MyGame\Sample\Equipment::Weapon) {
3127 union_type = monster.equipped_type
3129 if union_type == MyGame_Sample_Equipment_Weapon:
/third_party/flatbuffers/tests/
Dpy_test.py578 union_type = MyGame.Example.Any.Any
579 asserter(monster.TestType() == union_type.Monster)
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/BinaryFormat/
DDwarf.def143 HANDLE_DW_TAG(0x0017, union_type, 2, DWARF, DW_KIND_TYPE)