Home
last modified time | relevance | path

Searched refs:struct_def (Results 1 – 23 of 23) sorted by relevance

/third_party/flatbuffers/src/
Didl_gen_lua.cpp63 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument
65 code += "local " + NormalizedName(struct_def) + " = {} -- the module\n"; in BeginClass()
66 code += "local " + NormalizedMetaName(struct_def) + in BeginClass()
107 void GenerateNewObjectPrototype(const StructDef &struct_def, in GenerateNewObjectPrototype() argument
111 code += "function " + NormalizedName(struct_def) + ".New()\n"; in GenerateNewObjectPrototype()
114 "setmetatable(o, {__index = " + NormalizedMetaName(struct_def) + in GenerateNewObjectPrototype()
121 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument
125 code += "function " + NormalizedName(struct_def) + ".GetRootAs" + in NewRootTypeFromBuffer()
126 NormalizedName(struct_def) + "(buf, offset)\n"; in NewRootTypeFromBuffer()
133 code += std::string(Indent) + "local o = " + NormalizedName(struct_def) + in NewRootTypeFromBuffer()
[all …]
Didl_gen_python.cpp64 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument
66 code += "class " + NormalizedName(struct_def) + "(object):\n"; in BeginClass()
123 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument
134 code += Indent + Indent + "x = " + NormalizedName(struct_def) + "()\n"; in NewRootTypeFromBuffer()
142 code += NormalizedName(struct_def); in NewRootTypeFromBuffer()
149 void InitializeExisting(const StructDef &struct_def, std::string *code_ptr) { in InitializeExisting() argument
152 GenReceiver(struct_def, code_ptr); in InitializeExisting()
159 void GetVectorLen(const StructDef &struct_def, const FieldDef &field, in GetVectorLen() argument
163 GenReceiver(struct_def, code_ptr); in GetVectorLen()
171 void GetVectorIsNone(const StructDef &struct_def, const FieldDef &field, in GetVectorIsNone() argument
[all …]
Didl_gen_go.cpp137 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument
140 code += "type " + struct_def.name + " struct {\n\t"; in BeginClass()
144 code += struct_def.fixed ? "flatbuffers.Struct" : "flatbuffers.Table"; in BeginClass()
255 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument
262 code += struct_def.name; in NewRootTypeFromBuffer()
264 code += "*" + struct_def.name + ""; in NewRootTypeFromBuffer()
273 code += "\tx := &" + struct_def.name + "{}\n"; in NewRootTypeFromBuffer()
285 void InitializeExisting(const StructDef &struct_def, std::string *code_ptr) { in InitializeExisting() argument
288 GenReceiver(struct_def, code_ptr); in InitializeExisting()
297 void GenTableAccessor(const StructDef &struct_def, std::string *code_ptr) { in GenTableAccessor() argument
[all …]
Didl_gen_lobster.cpp100 void GenStructAccessor(const StructDef &struct_def, const FieldDef &field, in GenStructAccessor() argument
108 if (struct_def.fixed) { in GenStructAccessor()
126 auto name = NamespacedName(*field.value.type.struct_def); in GenStructAccessor()
128 if (struct_def.fixed) { in GenStructAccessor()
132 (field.value.type.struct_def->fixed ? "struct" : "table") + in GenStructAccessor()
149 if (!(vectortype.struct_def->fixed)) { in GenStructAccessor()
152 code += NamespacedName(*field.value.type.struct_def) + " { buf_, " + in GenStructAccessor()
170 NamespacedName(*ev.union_type.struct_def) + in GenStructAccessor()
188 void GenTableBuilders(const StructDef &struct_def, std::string *code_ptr) { in GenTableBuilders() argument
190 code += "struct " + NormalizedName(struct_def) + in GenTableBuilders()
[all …]
Didl_gen_cpp.cpp251 auto &struct_def = *parser_.root_struct_def_; in generate_bfbs_embed() local
253 GenIncludeGuard(file_name_, *struct_def.defined_namespace, "bfbs"); in generate_bfbs_embed()
262 SetNameSpace(struct_def.defined_namespace); in generate_bfbs_embed()
263 auto name = Name(struct_def); in generate_bfbs_embed()
335 const auto &struct_def = **it; in generate() local
336 if (!struct_def.generated) { in generate()
337 SetNameSpace(struct_def.defined_namespace); in generate()
338 code_ += "struct " + Name(struct_def) + ";"; in generate()
339 if (!struct_def.fixed) { in generate()
340 code_ += "struct " + Name(struct_def) + "Builder;"; in generate()
[all …]
Didl_gen_ts.cpp101 auto &struct_def = **it; in generateStructs() local
103 GenStruct(parser_, struct_def, &declcode, imports); in generateStructs()
104 SaveType(struct_def, declcode, imports, bare_imports); in generateStructs()
187 case BASE_TYPE_STRUCT: return type.struct_def->name; in GenType()
260 name = AddImport(imports, owner, *type.struct_def); in GenTypeName()
307 void GenStructArgs(import_set &imports, const StructDef &struct_def, in GenStructArgs() argument
309 for (auto it = struct_def.fields.vec.begin(); in GenStructArgs()
310 it != struct_def.fields.vec.end(); ++it) { in GenStructArgs()
316 GenStructArgs(imports, *field.value.type.struct_def, arguments, in GenStructArgs()
326 static void GenStructBody(const StructDef &struct_def, std::string *body, in GenStructBody() argument
[all …]
Didl_gen_csharp.cpp76 auto &struct_def = **it; in generate() local
78 cur_name_space_ = struct_def.defined_namespace; in generate()
79 GenStruct(struct_def, &declcode, parser_.opts); in generate()
83 if (!SaveType(struct_def.name, *struct_def.defined_namespace, declcode, in generate()
139 return "Offset<" + WrapInNameSpace(*type.struct_def) + ">"; in GenTypeBasic()
154 case BASE_TYPE_STRUCT: return WrapInNameSpace(*type.struct_def); in GenTypePointer()
167 std::string GenOffsetType(const StructDef &struct_def) const { in GenOffsetType()
168 return "Offset<" + WrapInNameSpace(struct_def) + ">"; in GenOffsetType()
171 std::string GenOffsetConstruct(const StructDef &struct_def, in GenOffsetConstruct() argument
173 return "new Offset<" + WrapInNameSpace(struct_def) + ">(" + variable_name + in GenOffsetConstruct()
[all …]
Didl_gen_php.cpp56 auto &struct_def = **it; in GenerateStructs() local
58 GenStruct(struct_def, &declcode); in GenerateStructs()
59 if (!SaveType(struct_def, declcode, true)) return false; in GenerateStructs()
100 static void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument
102 if (struct_def.fixed) { in BeginClass()
103 code += "class " + struct_def.name + " extends Struct\n"; in BeginClass()
105 code += "class " + struct_def.name + " extends Table\n"; in BeginClass()
138 static void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument
144 code += Indent + " * @return " + struct_def.name + "\n"; in NewRootTypeFromBuffer()
147 code += struct_def.name; in NewRootTypeFromBuffer()
[all …]
Didl_gen_java.cpp71 auto &struct_def = **it; in generate() local
73 cur_name_space_ = struct_def.defined_namespace; in generate()
74 GenStruct(struct_def, &declcode); in generate()
78 if (!SaveType(struct_def.name, *struct_def.defined_namespace, declcode, in generate()
157 case BASE_TYPE_STRUCT: return WrapInNameSpace(*type.struct_def); in GenTypePointer()
417 void GenStructArgs(const StructDef &struct_def, std::string *code_ptr, in GenStructArgs() argument
420 for (auto it = struct_def.fields.vec.begin(); in GenStructArgs()
421 it != struct_def.fields.vec.end(); ++it) { in GenStructArgs()
432 GenStructArgs(*field_type.struct_def, code_ptr, in GenStructArgs()
448 void GenStructBody(const StructDef &struct_def, std::string *code_ptr, in GenStructBody() argument
[all …]
Didl_gen_swift.cpp154 const auto &struct_def = **it; in generate() local
155 if (struct_def.fixed && !struct_def.generated) { in generate()
156 GenStructReader(struct_def); in generate()
157 GenMutableStructReader(struct_def); in generate()
163 const auto &struct_def = **it; in generate() local
164 if (!struct_def.fixed && !struct_def.generated) { in generate()
165 GenTable(struct_def); in generate()
167 GenObjectAPI(struct_def); in generate()
185 void GenStructReader(const StructDef &struct_def) { in GenStructReader() argument
186 auto is_private_access = struct_def.attributes.Lookup("private"); in GenStructReader()
[all …]
Didl_gen_rust.cpp97 if (type.struct_def->fixed) { in GetFullType()
362 const auto &struct_def = **it; in generate() local
363 if (struct_def.defined_namespace == ns && struct_def.fixed && in generate()
364 !struct_def.generated) { in generate()
365 SetNameSpace(struct_def.defined_namespace); in generate()
366 GenStruct(struct_def); in generate()
373 const auto &struct_def = **it; in generate() local
374 if (struct_def.defined_namespace == ns && !struct_def.fixed && in generate()
375 !struct_def.generated) { in generate()
376 SetNameSpace(struct_def.defined_namespace); in generate()
[all …]
Didl_gen_kotlin.cpp88 auto &struct_def = **it; in generate() local
90 cur_name_space_ = struct_def.defined_namespace; in generate()
91 GenStruct(struct_def, structWriter, parser_.opts); in generate()
95 if (!SaveType(struct_def.name, *struct_def.defined_namespace, in generate()
157 case BASE_TYPE_STRUCT: return WrapInNameSpace(*type.struct_def); in GenTypePointer()
387 static void GenStructArgs(const StructDef &struct_def, CodeWriter &writer, in GenStructArgs() argument
389 for (auto it = struct_def.fields.vec.begin(); in GenStructArgs()
390 it != struct_def.fields.vec.end(); ++it) { in GenStructArgs()
397 GenStructArgs(*field.value.type.struct_def, writer, in GenStructArgs()
410 static void GenStructBody(const StructDef &struct_def, CodeWriter &writer, in GenStructBody() argument
[all …]
Didl_gen_dart.cpp174 auto &struct_def = **it; in GenerateStructs() local
175 GenStruct(struct_def, namespace_code); in GenerateStructs()
322 case BASE_TYPE_STRUCT: return type.struct_def->name; in GenType()
379 type.struct_def->name + (addBuilder ? "ObjectBuilder" : ""), in GenDartTypeName()
395 if (field.value.type.struct_def) { in MaybeWrapNamespace()
397 BuildNamespaceName(*field.value.type.struct_def->defined_namespace); in MaybeWrapNamespace()
411 void GenStruct(const StructDef &struct_def, in GenStruct() argument
413 if (struct_def.generated) return; in GenStruct()
415 auto object_namespace = BuildNamespaceName(*struct_def.defined_namespace); in GenStruct()
418 const auto &object_name = struct_def.name; in GenStruct()
[all …]
Didl_parser.cpp631 type.struct_def = LookupCreateStruct(id); in ParseTypeIdent()
701 type = Type(BASE_TYPE_ARRAY, subtype.struct_def, subtype.enum_def, in ParseType()
705 type = Type(BASE_TYPE_VECTOR, subtype.struct_def, subtype.enum_def); in ParseType()
715 CheckedError Parser::AddField(StructDef &struct_def, const std::string &name, in AddField() argument
719 FieldIndexToOffset(static_cast<voffset_t>(struct_def.fields.vec.size())); in AddField()
721 field.file = struct_def.file; in AddField()
723 if (struct_def.fixed) { // statically compute the field offset in AddField()
728 struct_def.minalign = std::max(struct_def.minalign, alignment); in AddField()
729 struct_def.PadLastField(alignment); in AddField()
730 field.value.offset = static_cast<voffset_t>(struct_def.bytesize); in AddField()
[all …]
Didl_gen_fbs.cpp29 return type.struct_def->defined_namespace->GetFullyQualifiedName( in GenType()
30 type.struct_def->name); in GenType()
125 StructDef &struct_def = **it; in GenerateFBS() local
126 if (parser.opts.include_dependence_headers && struct_def.generated) { in GenerateFBS()
129 GenNameSpace(*struct_def.defined_namespace, &schema, &last_namespace); in GenerateFBS()
130 GenComment(struct_def.doc_comment, &schema, nullptr); in GenerateFBS()
131 schema += "table " + struct_def.name + " {\n"; in GenerateFBS()
132 for (auto field_it = struct_def.fields.vec.begin(); in GenerateFBS()
133 field_it != struct_def.fields.vec.end(); ++field_it) { in GenerateFBS()
Didl_gen_text.cpp136 c.Data() + type.struct_def->bytesize * i) in PrintContainer()
189 return GenStruct(*type.struct_def, reinterpret_cast<const Table *>(val), in PrintOffset()
286 bool GenStruct(const StructDef &struct_def, const Table *table, int indent) { in GenStruct()
291 for (auto it = struct_def.fields.vec.begin(); in GenStruct()
292 it != struct_def.fields.vec.end(); ++it) { in GenStruct()
294 auto is_present = struct_def.fixed || table->CheckField(fd.value.offset); in GenStruct()
311 if (!GenField<CTYPE>(fd, table, struct_def.fixed, elem_indent)) { \ in GenStruct()
323 if (!GenFieldOffset(fd, table, struct_def.fixed, elem_indent, prev_val)) { in GenStruct()
330 if (struct_def.fixed) { in GenStruct()
353 const StructDef &struct_def, std::string *_text) { in GenerateTextImpl() argument
[all …]
Didl_gen_json_schema.cpp88 if (type.struct_def != nullptr) { return GenTypeRef(type.struct_def); } in GenBaseType()
95 if (type.struct_def != nullptr) { in GenArrayType()
96 element_type = GenTypeRef(type.struct_def); in GenArrayType()
113 return GenTypeRef(type.struct_def); in GenType()
123 "{ " + GenTypeRef(union_type->union_type.struct_def) + " }"); in GenType()
Dcode_generators.cpp338 auto &struct_def = **it; in JavaCSharpMakeRule() local
341 parser, path, *struct_def.defined_namespace); in JavaCSharpMakeRule()
342 make_rule += directory + struct_def.name + file_extension; in JavaCSharpMakeRule()
/third_party/flatbuffers/include/flatbuffers/
Didl.h166 struct_def(_sd), in base_type()
172 struct_def == o.struct_def && enum_def == o.enum_def;
176 return Type(element, struct_def, enum_def, fixed_length); in VectorType()
185 StructDef *struct_def; // only set if t or element == BASE_TYPE_STRUCT member
471 return type.base_type == BASE_TYPE_STRUCT && type.struct_def->fixed; in IsStruct()
496 ? type.struct_def->bytesize in InlineSize()
504 return type.struct_def->minalign; in InlineAlignment()
506 return IsStruct(type.VectorType()) ? type.struct_def->minalign in InlineAlignment()
521 (a.struct_def == b.struct_def || in EqualByName()
522 a.struct_def->name == b.struct_def->name) && in EqualByName()
[all …]
/third_party/mesa3d/src/microsoft/compiler/
Ddxil_module.c405 retval = type_list_equal(&lhs->struct_def.elem, &rhs->struct_def.elem); in types_equal()
598 if ((name == NULL) != (type->struct_def.name == NULL)) in dxil_module_get_struct_type()
601 if (name && strcmp(type->struct_def.name, name)) in dxil_module_get_struct_type()
604 if (type->struct_def.elem.num_types == num_elem_types && in dxil_module_get_struct_type()
605 !memcmp(type->struct_def.elem.types, elem_types, in dxil_module_get_struct_type()
613 type->struct_def.name = ralloc_strdup(type, name); in dxil_module_get_struct_type()
614 if (!type->struct_def.name) in dxil_module_get_struct_type()
617 type->struct_def.name = NULL; in dxil_module_get_struct_type()
619 type->struct_def.elem.types = ralloc_array(type, struct dxil_type *, in dxil_module_get_struct_type()
621 if (!type->struct_def.elem.types) in dxil_module_get_struct_type()
[all …]
Ddxil_dump.c212 _mesa_string_buffer_printf(d->buf, "struct %s", type->struct_def.name); in dump_type_name()
244 _mesa_string_buffer_printf(d->buf, "struct %s {\n", type->struct_def.name); in dump_type()
247 for (size_t i = 0; i < type->struct_def.elem.num_types; ++i) { in dump_type()
249 dump_type(d, type->struct_def.elem.types[i]); in dump_type()
Ddxil_internal.h61 } struct_def; member
/third_party/vk-gl-cts/external/openglcts/modules/gl/
Dgl4cShadingLanguage420PackTests.cpp15221 static const GLchar* struct_def = "struct BasicStructure {\n" in getTypeDefinition() local
15252 type_definition = struct_def; in getTypeDefinition()