/external/flatbuffers/src/ |
D | idl_gen_cpp.cpp | 272 const auto &enum_def = **it; in generate() local 273 if (!enum_def.generated) { in generate() 274 SetNameSpace(enum_def.defined_namespace); in generate() 275 GenEnum(enum_def); in generate() 308 const auto &enum_def = **it; in generate() local 309 if (enum_def.is_union && !enum_def.generated) { in generate() 310 SetNameSpace(enum_def.defined_namespace); in generate() 311 GenUnionPost(enum_def); in generate() 320 const auto &enum_def = **it; in generate() local 321 if (!enum_def.generated) { in generate() [all …]
|
D | idl_gen_fbs.cpp | 33 if (type.enum_def && !underlying) { in GenType() 34 return type.enum_def->defined_namespace->GetFullyQualifiedName( in GenType() 35 type.enum_def->name); in GenType() 91 EnumDef &enum_def = **enum_def_it; in GenerateFBS() local 92 GenNameSpace(*enum_def.defined_namespace, &schema, &last_namespace); in GenerateFBS() 93 GenComment(enum_def.doc_comment, &schema, nullptr); in GenerateFBS() 94 if (enum_def.is_union) in GenerateFBS() 95 schema += "union " + enum_def.name; in GenerateFBS() 97 schema += "enum " + enum_def.name + " : "; in GenerateFBS() 98 schema += GenType(enum_def.underlying_type, true) + " {\n"; in GenerateFBS() [all …]
|
D | idl_gen_rust.cpp | 139 } else if (type.enum_def != nullptr) { in GetFullType() 140 if (type.enum_def->is_union) { in GetFullType() 320 const auto &enum_def = **it; in generate() local 321 if (enum_def.defined_namespace != ns) { continue; } in generate() 322 if (!enum_def.generated) { in generate() 323 SetNameSpace(enum_def.defined_namespace); in generate() 324 GenEnum(enum_def); in generate() 526 if (type.enum_def) { return WrapInNameSpace(*type.enum_def); } in GetTypeBasic() 573 std::string GetEnumValUse(const EnumDef &enum_def, in GetEnumValUse() argument 575 return Name(enum_def) + "::" + Name(enum_val); in GetEnumValUse() [all …]
|
D | idl_gen_dart.cpp | 160 auto &enum_def = **it; in GenerateEnums() local 161 GenEnum(enum_def, namespace_code); // enum_code_ptr); in GenerateEnums() 216 void GenEnum(EnumDef &enum_def, namespace_code_map *namespace_code) { in GenEnum() argument 217 if (enum_def.generated) return; in GenEnum() 218 auto ns = BuildNamespaceName(*enum_def.defined_namespace); in GenEnum() 220 GenDocComment(enum_def.doc_comment, &code, ""); in GenEnum() 222 auto name = enum_def.is_union ? enum_def.name + "TypeId" : enum_def.name; in GenEnum() 223 auto is_bit_flags = enum_def.attributes.Lookup("bit_flags"); in GenEnum() 245 NumToString(enum_def.vals.vec.front()->value) + ";\n"; in GenEnum() 247 NumToString(enum_def.vals.vec.back()->value) + ";\n"; in GenEnum() [all …]
|
D | idl_gen_json_schema.cpp | 49 template<class T> std::string GenFullName(const T *enum_def) { in GenFullName() argument 51 const auto &name_spaces = enum_def->defined_namespace->components; in GenFullName() 55 full_name.append(enum_def->name); in GenFullName() 59 template<class T> std::string GenTypeRef(const T *enum_def) { in GenTypeRef() argument 60 return "\"$ref\" : \"#/definitions/" + GenFullName(enum_def) + "\""; in GenTypeRef() 68 if (type.enum_def != nullptr && !type.enum_def->is_union) { in GenType() 70 return GenTypeRef(type.enum_def); in GenType() 89 const auto &union_types = type.enum_def->vals.vec; in GenType() 97 if (union_type != *type.enum_def->vals.vec.rbegin()) { in GenType() 104 case BASE_TYPE_UTYPE: return GenTypeRef(type.enum_def); in GenType()
|
D | idl_parser.cpp | 534 auto enum_def = LookupEnum(id); in ParseTypeIdent() local 535 if (enum_def) { in ParseTypeIdent() 536 type = enum_def->underlying_type; in ParseTypeIdent() 537 if (enum_def->is_union) type.base_type = BASE_TYPE_UNION; in ParseTypeIdent() 596 type = Type(BASE_TYPE_VECTOR, subtype.struct_def, subtype.enum_def); in ParseType() 649 type.enum_def->underlying_type, &typefield)); in ParseField() 660 Type union_vector(BASE_TYPE_VECTOR, nullptr, type.enum_def); in ParseField() 677 if (type.enum_def && in ParseField() 678 !type.enum_def->is_union && in ParseField() 679 !type.enum_def->attributes.Lookup("bit_flags") && in ParseField() [all …]
|
D | idl_gen_go.cpp | 138 std::string GetEnumTypeName(const EnumDef &enum_def) { in GetEnumTypeName() argument 139 return WrapInNameSpaceAndTrack(cur_name_space_, GoIdentity(enum_def.name)); in GetEnumTypeName() 143 void GenEnumType(const EnumDef &enum_def, std::string *code_ptr) { in GenEnumType() argument 145 code += "type " + GetEnumTypeName(enum_def) + " = "; in GenEnumType() 146 code += GenTypeBasic(enum_def.underlying_type) + "\n"; in GenEnumType() 156 void EnumMember(const EnumDef &enum_def, const EnumVal ev, in EnumMember() argument 160 code += enum_def.name; in EnumMember() 163 code += GetEnumTypeName(enum_def); in EnumMember() 175 void BeginEnumNames(const EnumDef &enum_def, std::string *code_ptr) { in BeginEnumNames() argument 178 code += enum_def.name; in BeginEnumNames() [all …]
|
D | idl_gen_js_ts.cpp | 170 auto &enum_def = **it; in generateEnums() local 171 GenEnum(enum_def, enum_code_ptr, exports_code_ptr, reexports); in generateEnums() 324 void GenEnum(EnumDef &enum_def, std::string *code_ptr, in GenEnum() argument 326 if (enum_def.generated) return; in GenEnum() 329 GenDocComment(enum_def.doc_comment, code_ptr, "@enum"); in GenEnum() 330 std::string ns = GetNameSpace(enum_def); in GenEnum() 333 code += "export enum " + enum_def.name + "{\n"; in GenEnum() 335 if (enum_def.defined_namespace->components.empty()) { in GenEnum() 338 exports += "goog.exportSymbol('" + enum_def.name + "', " + in GenEnum() 339 enum_def.name + ");\n"; in GenEnum() [all …]
|
D | idl_gen_lobster.cpp | 152 for (auto it = field.value.type.enum_def->vals.vec.begin(); in GenStructAccessor() 153 it != field.value.type.enum_def->vals.vec.end(); ++it) { in GenStructAccessor() 256 void GenEnum(const EnumDef &enum_def, std::string *code_ptr) { in GenEnum() argument 257 if (enum_def.generated) return; in GenEnum() 259 CheckNameSpace(enum_def, &code); in GenEnum() 260 GenComment(enum_def.doc_comment, code_ptr, nullptr, ""); in GenEnum() 262 for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end(); in GenEnum() 266 code += " " + enum_def.name + "_" + NormalizedName(ev) + " = " + in GenEnum() 268 if (it + 1 != enum_def.vals.vec.end()) code += ","; in GenEnum() 343 auto &enum_def = **it; in generate() local [all …]
|
D | idl_gen_general.cpp | 168 auto &enum_def = **it; in generate() local 169 if (!parser_.opts.one_file) cur_name_space_ = enum_def.defined_namespace; in generate() 170 GenEnum(enum_def, &enumcode); in generate() 174 if (!SaveType(enum_def.name, *enum_def.defined_namespace, enumcode, in generate() 258 return type.enum_def != nullptr && IsInteger(type.base_type); in IsEnum() 282 if (IsEnum(type)) return WrapInNameSpace(*type.enum_def); in GenTypeBasic() 392 if (IsEnum(type)) return "(" + WrapInNameSpace(*type.enum_def) + ")"; in DestinationCast() 443 auto enum_def = value.type.enum_def; in GenEnumDefaultValue() local 444 auto vec = enum_def->vals.vec; in GenEnumDefaultValue() 451 result = WrapInNameSpace(*enum_def) + "." + enum_val.name; in GenEnumDefaultValue() [all …]
|
D | idl_gen_php.cpp | 45 auto &enum_def = **it; in GenerateEnums() local 47 GenEnum(enum_def, &enumcode); in GenerateEnums() 48 if (!SaveType(enum_def, enumcode, false)) return false; in GenerateEnums() 813 static void GenEnum(const EnumDef &enum_def, std::string *code_ptr) { in GenEnum() argument 814 if (enum_def.generated) return; in GenEnum() 816 GenComment(enum_def.doc_comment, code_ptr, nullptr); in GenEnum() 817 BeginEnum(enum_def.name, code_ptr); in GenEnum() 818 for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end(); in GenEnum() 828 for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end(); in GenEnum() 831 code += Indent + Indent + enum_def.name + "::" + ev.name + "=>" + "\"" + ev.name + "\",\n"; in GenEnum() [all …]
|
D | idl_gen_lua.cpp | 570 void GenEnum(const EnumDef &enum_def, std::string *code_ptr) { in GenEnum() argument 571 if (enum_def.generated) return; in GenEnum() 573 GenComment(enum_def.doc_comment, code_ptr, nullptr, Comment); in GenEnum() 574 BeginEnum(NormalizedName(enum_def), code_ptr); in GenEnum() 575 for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end(); in GenEnum() 664 auto &enum_def = **it; in generateEnums() local 666 GenEnum(enum_def, &enumcode); in generateEnums() 667 if (!SaveType(enum_def, enumcode, false)) return false; in generateEnums()
|
D | idl_gen_python.cpp | 587 void GenEnum(const EnumDef &enum_def, std::string *code_ptr) { in GenEnum() argument 588 if (enum_def.generated) return; in GenEnum() 590 GenComment(enum_def.doc_comment, code_ptr, nullptr, "# "); in GenEnum() 591 BeginEnum(NormalizedName(enum_def), code_ptr); in GenEnum() 592 for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end(); in GenEnum() 673 auto &enum_def = **it; in generateEnums() local 675 GenEnum(enum_def, &enumcode); in generateEnums() 676 if (!SaveType(enum_def, enumcode, false)) return false; in generateEnums()
|
D | idl_gen_text.cpp | 53 if (type.enum_def && opts.output_enum_identifiers) { in Print() 54 auto enum_val = type.enum_def->ReverseLookup(static_cast<int64_t>(val)); in Print() 253 auto enum_val = fd.value.type.enum_def->ReverseLookup( in GenStruct()
|
/external/libchrome/mojo/public/tools/bindings/generators/java_templates/ |
D | enum.java.tmpl | 1 {% from "enum_definition.tmpl" import enum_def %} 4 {{enum_def(enum, true)}}
|
D | enum_definition.tmpl | 11 {%- macro enum_def(enum, top_level) -%}
|
D | interface_definition.tmpl | 2 {% from "enum_definition.tmpl" import enum_def %} 143 {{enum_def(enum, false)|indent(4)}}
|
D | data_types_definition.tmpl | 2 {%- from "enum_definition.tmpl" import enum_def %} 129 {{enum_def(enum, false)|indent(4)}}
|
/external/flatbuffers/include/flatbuffers/ |
D | idl.h | 145 enum_def(_ed) {} 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() 161 EnumDef *enum_def; // set if t == BASE_TYPE_UNION / BASE_TYPE_UTYPE, member 372 (a.enum_def == b.enum_def || a.enum_def->name == b.enum_def->name); in EqualByName()
|
/external/libchrome/mojo/public/tools/bindings/generators/js_templates/ |
D | module_definition.tmpl | 7 {%- from "enum_definition.tmpl" import enum_def %} 9 var {{ enum_def(enum.name, enum) }}
|
D | enum_definition.tmpl | 1 {%- macro enum_def(enum_name, enum) -%}
|
D | struct_definition.tmpl | 8 {%- from "enum_definition.tmpl" import enum_def %} 10 {{enum_def("%s.%s"|format(struct.name, enum.name), enum)}}
|
D | interface_definition.tmpl | 247 {%- from "enum_definition.tmpl" import enum_def -%} 249 {{ enum_def("%s.%s"|format(interface.name, enum.name), enum) }}
|
/external/protobuf/php/ext/google/protobuf/ |
D | upb.c | 9338 const upb_enumdef *enum_def = upb_downcast_enumdef(upb_fielddef_subdef(f)); in STRINGIFY_MACROVAL() local 9339 const char *label = upb_enumdef_iton(enum_def, val); in STRINGIFY_MACROVAL()
|
/external/protobuf/ruby/ext/google/protobuf_c/ |
D | upb.c | 10012 const upb_enumdef *enum_def = upb_downcast_enumdef(upb_fielddef_subdef(f)); in STRINGIFY_MACROVAL() local 10013 const char *label = upb_enumdef_iton(enum_def, val); in STRINGIFY_MACROVAL()
|