/external/flatbuffers/src/ |
D | idl_gen_lua.cpp | 82 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument 84 code += "local " + NormalizedName(struct_def) + " = {} -- the module\n"; in BeginClass() 85 code += "local " + NormalizedMetaName(struct_def) + " = {} -- the class metatable\n"; in BeginClass() 123 void GenerateNewObjectPrototype(const StructDef &struct_def, in GenerateNewObjectPrototype() argument 127 code += "function " + NormalizedName(struct_def) + ".New()\n"; in GenerateNewObjectPrototype() 129 …code += std::string(Indent) + "setmetatable(o, {__index = " + NormalizedMetaName(struct_def) + "})… in GenerateNewObjectPrototype() 135 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument 139 …code += "function " + NormalizedName(struct_def) + ".GetRootAs" + NormalizedName(struct_def) + "(b… in NewRootTypeFromBuffer() 141 code += std::string(Indent) + "local o = " + NormalizedName(struct_def) + ".New()\n"; in NewRootTypeFromBuffer() 148 void InitializeExisting(const StructDef &struct_def, in InitializeExisting() argument [all …]
|
D | idl_gen_python.cpp | 89 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument 91 code += "class " + NormalizedName(struct_def) + "(object):\n"; in BeginClass() 130 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument 136 code += NormalizedName(struct_def); in NewRootTypeFromBuffer() 142 code += Indent + Indent + "x = " + NormalizedName(struct_def) + "()\n"; in NewRootTypeFromBuffer() 149 void InitializeExisting(const StructDef &struct_def, in InitializeExisting() argument 153 GenReceiver(struct_def, code_ptr); in InitializeExisting() 160 void GetVectorLen(const StructDef &struct_def, const FieldDef &field, in GetVectorLen() argument 164 GenReceiver(struct_def, code_ptr); in GetVectorLen() 172 void GetScalarFieldOfStruct(const StructDef &struct_def, in GetScalarFieldOfStruct() argument [all …]
|
D | idl_gen_go.cpp | 126 void BeginClass(const StructDef &struct_def, std::string *code_ptr) { in BeginClass() argument 129 code += "type " + struct_def.name + " struct {\n\t"; in BeginClass() 133 code += struct_def.fixed ? "flatbuffers.Struct" : "flatbuffers.Table"; in BeginClass() 201 void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument 206 code += struct_def.name; in NewRootTypeFromBuffer() 208 code += "*" + struct_def.name + ""; in NewRootTypeFromBuffer() 211 code += "\tx := &" + struct_def.name + "{}\n"; in NewRootTypeFromBuffer() 218 void InitializeExisting(const StructDef &struct_def, std::string *code_ptr) { in InitializeExisting() argument 221 GenReceiver(struct_def, code_ptr); in InitializeExisting() 230 void GenTableAccessor(const StructDef &struct_def, std::string *code_ptr) { in GenTableAccessor() argument [all …]
|
D | idl_gen_lobster.cpp | 94 void GenStructAccessor(const StructDef &struct_def, in GenStructAccessor() argument 101 if (struct_def.fixed) { in GenStructAccessor() 114 auto name = NamespacedName(*field.value.type.struct_def); in GenStructAccessor() 116 if (struct_def.fixed) { in GenStructAccessor() 120 (field.value.type.struct_def->fixed ? "struct" : "table") + in GenStructAccessor() 136 if (!(vectortype.struct_def->fixed)) { in GenStructAccessor() 139 code += NamespacedName(*field.value.type.struct_def) + " { buf_, " + in GenStructAccessor() 157 NamespacedName(*ev.union_type.struct_def) + in GenStructAccessor() 174 void GenTableBuilders(const StructDef &struct_def, in GenTableBuilders() argument 177 code += "def " + NormalizedName(struct_def) + in GenTableBuilders() [all …]
|
D | idl_gen_cpp.cpp | 228 const auto &struct_def = **it; in generate() local 229 if (!struct_def.generated) { in generate() 230 SetNameSpace(struct_def.defined_namespace); in generate() 231 code_ += "struct " + Name(struct_def) + ";"; in generate() 233 auto nativeName = NativeName(Name(struct_def), &struct_def, parser_.opts); in generate() 234 if (!struct_def.fixed) { in generate() 246 const auto &struct_def = **it; in generate() local 247 if (!struct_def.generated) { in generate() 248 SetNameSpace(struct_def.defined_namespace); in generate() 249 auto nativeName = NativeName(Name(struct_def), &struct_def, parser_.opts); in generate() [all …]
|
D | idl_gen_dart.cpp | 168 auto &struct_def = **it; in GenerateStructs() local 169 GenStruct(struct_def, namespace_code); in GenerateStructs() 319 case BASE_TYPE_STRUCT: return type.struct_def->name; in GenType() 376 type.struct_def->name + (addBuilder ? "ObjectBuilder" : ""), in GenDartTypeName() 392 if (field.value.type.struct_def) { in MaybeWrapNamespace() 394 BuildNamespaceName(*field.value.type.struct_def->defined_namespace); in MaybeWrapNamespace() 408 void GenStruct(const StructDef &struct_def, in GenStruct() argument 410 if (struct_def.generated) return; in GenStruct() 412 auto object_namespace = BuildNamespaceName(*struct_def.defined_namespace); in GenStruct() 415 auto object_name = struct_def.name; in GenStruct() [all …]
|
D | idl_gen_php.cpp | 56 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() 137 static void NewRootTypeFromBuffer(const StructDef &struct_def, in NewRootTypeFromBuffer() argument 143 code += Indent + " * @return " + struct_def.name + "\n"; in NewRootTypeFromBuffer() 146 code += struct_def.name; in NewRootTypeFromBuffer() [all …]
|
D | idl_gen_rust.cpp | 102 if (type.struct_def->fixed) { in GetFullType() 331 const auto &struct_def = **it; in generate() local 332 if (struct_def.defined_namespace != ns) { continue; } in generate() 333 if (struct_def.fixed && !struct_def.generated) { in generate() 334 SetNameSpace(struct_def.defined_namespace); in generate() 335 GenStruct(struct_def); in generate() 342 const auto &struct_def = **it; in generate() local 343 if (struct_def.defined_namespace != ns) { continue; } in generate() 344 if (!struct_def.fixed && !struct_def.generated) { in generate() 345 SetNameSpace(struct_def.defined_namespace); in generate() [all …]
|
D | idl_gen_general.cpp | 183 auto &struct_def = **it; in generate() local 185 cur_name_space_ = struct_def.defined_namespace; in generate() 186 GenStruct(struct_def, &declcode); in generate() 190 if (!SaveType(struct_def.name, *struct_def.defined_namespace, declcode, in generate() 284 return "Offset<" + WrapInNameSpace(*type.struct_def) + ">"; in GenTypeBasic() 305 case BASE_TYPE_STRUCT: return WrapInNameSpace(*type.struct_def); in GenTypePointer() 335 std::string GenOffsetType(const StructDef &struct_def) const { in GenOffsetType() 337 return "Offset<" + WrapInNameSpace(struct_def) + ">"; in GenOffsetType() 343 std::string GenOffsetConstruct(const StructDef &struct_def, in GenOffsetConstruct() argument 346 return "new Offset<" + WrapInNameSpace(struct_def) + ">(" + in GenOffsetConstruct() [all …]
|
D | idl_gen_js_ts.cpp | 181 auto &struct_def = **it; in generateStructs() local 182 GenStruct(parser_, struct_def, decl_code_ptr, exports_code_ptr, in generateStructs() 373 if (ev.union_type.struct_def) { in GenEnum() 375 GetNameSpace(*ev.union_type.struct_def), in GenEnum() 378 std::make_pair(ev.union_type.struct_def->file, std::move(desc))); in GenEnum() 402 case BASE_TYPE_STRUCT: return type.struct_def->name; in GenType() 477 name = WrapInNameSpace(*type.struct_def); in GenTypeName() 557 void GenStructArgs(const StructDef &struct_def, std::string *annotations, in GenStructArgs() argument 559 for (auto it = struct_def.fields.vec.begin(); in GenStructArgs() 560 it != struct_def.fields.vec.end(); ++it) { in GenStructArgs() [all …]
|
D | idl_parser.cpp | 540 type.struct_def = LookupCreateStruct(id); in ParseTypeIdent() 596 type = Type(BASE_TYPE_VECTOR, subtype.struct_def, subtype.enum_def); in ParseType() 605 CheckedError Parser::AddField(StructDef &struct_def, const std::string &name, in AddField() argument 609 FieldIndexToOffset(static_cast<voffset_t>(struct_def.fields.vec.size())); in AddField() 611 field.file = struct_def.file; in AddField() 613 if (struct_def.fixed) { // statically compute the field offset in AddField() 618 struct_def.minalign = std::max(struct_def.minalign, alignment); in AddField() 619 struct_def.PadLastField(alignment); in AddField() 620 field.value.offset = static_cast<voffset_t>(struct_def.bytesize); in AddField() 621 struct_def.bytesize += size; in AddField() [all …]
|
D | idl_gen_fbs.cpp | 29 return type.struct_def->defined_namespace->GetFullyQualifiedName( in GenType() 30 type.struct_def->name); in GenType() 113 StructDef &struct_def = **it; in GenerateFBS() local 114 GenNameSpace(*struct_def.defined_namespace, &schema, &last_namespace); in GenerateFBS() 115 GenComment(struct_def.doc_comment, &schema, nullptr); in GenerateFBS() 116 schema += "table " + struct_def.name + " {\n"; in GenerateFBS() 117 for (auto field_it = struct_def.fields.vec.begin(); in GenerateFBS() 118 field_it != struct_def.fields.vec.end(); ++field_it) { in GenerateFBS()
|
D | idl_gen_text.cpp | 26 static bool GenStruct(const StructDef &struct_def, const Table *table, 86 if (!Print(v.GetStructFromOffset(i * type.struct_def->bytesize), type, in PrintVector() 115 if (!GenStruct(*type.struct_def, reinterpret_cast<const Table *>(val), in Print() 171 static bool GenStruct(const StructDef &struct_def, const Table *table, 203 static bool GenStruct(const StructDef &struct_def, const Table *table, in GenStruct() argument 209 for (auto it = struct_def.fields.vec.begin(); in GenStruct() 210 it != struct_def.fields.vec.end(); ++it) { in GenStruct() 212 auto is_present = struct_def.fixed || table->CheckField(fd.value.offset); in GenStruct() 232 if (!GenField<CTYPE>(fd, table, struct_def.fixed, \ in GenStruct() 245 if (!GenFieldOffset(fd, table, struct_def.fixed, indent + Indent(opts), in GenStruct()
|
D | idl_gen_json_schema.cpp | 77 typeline.append(GenTypeRef(type.struct_def)); in GenType() 85 return GenTypeRef(type.struct_def); in GenType() 95 "{ " + GenTypeRef(union_type->union_type.struct_def) + " }"); in GenType()
|
/external/flatbuffers/include/flatbuffers/ |
D | idl.h | 144 struct_def(_sd), in base_type() 149 struct_def == o.struct_def && enum_def == o.enum_def; 152 Type VectorType() const { return Type(element, struct_def, enum_def); } in VectorType() 160 StructDef *struct_def; // only set if t or element == BASE_TYPE_STRUCT member 319 return type.base_type == BASE_TYPE_STRUCT && type.struct_def->fixed; in IsStruct() 323 return IsStruct(type) ? type.struct_def->bytesize : SizeOf(type.base_type); in InlineSize() 327 return IsStruct(type) ? type.struct_def->minalign : SizeOf(type.base_type); in InlineAlignment() 370 (a.struct_def == b.struct_def || in EqualByName() 371 a.struct_def->name == b.struct_def->name) && in EqualByName() 714 FLATBUFFERS_CHECKED_ERROR AddField(StructDef &struct_def, [all …]
|
/external/libchrome/mojo/public/tools/bindings/generators/java_templates/ |
D | struct.java.tmpl | 1 {% from "data_types_definition.tmpl" import struct_def %} 4 {{ struct_def(struct) }}
|
D | interface_definition.tmpl | 3 {% from "data_types_definition.tmpl" import struct_def %} 222 {{ struct_def(method.param_struct, True)|indent(4) }} 226 {{ struct_def(response_struct, True)|indent(4) }}
|
D | data_types_definition.tmpl | 113 {%- macro struct_def(struct, inner_class=False) %}
|
/external/deqp/external/openglcts/modules/gl/ |
D | gl4cShadingLanguage420PackTests.cpp | 15269 static const GLchar* struct_def = "struct BasicStructure {\n" in getTypeDefinition() local 15300 type_definition = struct_def; in getTypeDefinition()
|