Home
last modified time | relevance | path

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

12

/external/protobuf/src/google/protobuf/
Dpreserve_unknown_enum_test.cc196 const google::protobuf::EnumValueDescriptor* enum_value = r->GetEnum(message, field); in TEST() local
197 EXPECT_EQ(enum_value->number(), in TEST()
203 EXPECT_EQ(enum_value, enum_value_second); in TEST()
208 enum_value = r->GetRepeatedEnum(message, repeated_field, 0); in TEST()
209 EXPECT_EQ(enum_value->number(), in TEST()
212 EXPECT_EQ(enum_value, enum_value_second); in TEST()
217 r->SetEnum(m, field, enum_value); in TEST()
218 EXPECT_EQ(enum_value, r->GetEnum(*m, field)); in TEST()
239 const google::protobuf::EnumValueDescriptor* enum_value = r->GetEnum(message, in TEST() local
241 EXPECT_EQ(42, enum_value->number()); in TEST()
[all …]
Ddrop_unknown_fields_test.cc56 static_cast<int>(foo.enum_value())); in TEST()
63 EXPECT_EQ(FooWithExtraFields::QUX, foo_with_extra_fields.enum_value()); in TEST()
82 EXPECT_EQ(FooWithExtraFields::QUX, foo_with_extra_fields.enum_value()); in TEST()
Dmap_test_util_impl.h69 template <typename EnumType, EnumType enum_value, typename MapMessage>
86 template <typename EnumType, EnumType enum_value, typename MapMessage>
221 template <typename EnumType, EnumType enum_value, typename MapMessage>
238 (*message->mutable_map_int32_enum())[1] = enum_value; in ModifyMapFields()
384 template <typename EnumType, EnumType enum_value, typename MapMessage>
420 EXPECT_EQ(enum_value, message.map_int32_enum().at(0)); in ExpectMapFieldsSetInitialized()
Dunittest_drop_unknown_fields.proto45 NestedEnum enum_value = 2; field
56 NestedEnum enum_value = 2; field
Dtext_format.cc707 const EnumValueDescriptor* enum_value = NULL; in ConsumeFieldValue() local
712 enum_value = enum_type->FindValueByName(value); in ConsumeFieldValue()
719 enum_value = enum_type->FindValueByNumber(int_value); in ConsumeFieldValue()
725 if (enum_value == NULL) { in ConsumeFieldValue()
737 SET_FIELD(Enum, enum_value); in ConsumeFieldValue()
1806 int enum_value = field->is_repeated() in PrintFieldValue() local
1810 field->enum_type()->FindValueByNumber(enum_value); in PrintFieldValue()
1812 generator.Print(printer->PrintEnum(enum_value, enum_desc->name())); in PrintFieldValue()
1820 generator.Print(printer->PrintEnum(enum_value, in PrintFieldValue()
1821 StringPrintf("%d", enum_value))); in PrintFieldValue()
Dwire_format.cc540 const EnumValueDescriptor* enum_value = in ParseAndMergeField() local
542 if (enum_value != NULL) { in ParseAndMergeField()
543 message_reflection->AddEnum(message, field, enum_value); in ParseAndMergeField()
617 const EnumValueDescriptor* enum_value = in ParseAndMergeField() local
619 if (enum_value != NULL) { in ParseAndMergeField()
621 message_reflection->AddEnum(message, field, enum_value); in ParseAndMergeField()
623 message_reflection->SetEnum(message, field, enum_value); in ParseAndMergeField()
/external/protobuf/src/google/protobuf/util/internal/
Dutility.cc181 const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i); in FindEnumValueByNameOrNull() local
182 if (enum_value.name() == enum_name) { in FindEnumValueByNameOrNull()
183 return &enum_value; in FindEnumValueByNameOrNull()
194 const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i); in FindEnumValueByNumberOrNull() local
195 if (enum_value.number() == value) { in FindEnumValueByNumberOrNull()
196 return &enum_value; in FindEnumValueByNumberOrNull()
Dprotostream_objectsource.cc856 const google::protobuf::EnumValue* enum_value = in RenderNonMessageField() local
858 if (enum_value != NULL) { in RenderNonMessageField()
860 ow->RenderString(field_name, ToCamelCase(enum_value->name())); in RenderNonMessageField()
862 ow->RenderString(field_name, enum_value->name()); in RenderNonMessageField()
980 const google::protobuf::EnumValue* enum_value = in ReadFieldValueAsString() local
982 if (enum_value != NULL) { in ReadFieldValueAsString()
983 result = enum_value->name(); in ReadFieldValueAsString()
Ddatapiece.cc280 if (const google::protobuf::EnumValue* enum_value = in ToEnum() local
282 return enum_value->number(); in ToEnum()
/external/libmojo/mojo/public/tools/bindings/pylib/mojom/parse/
Dtranslate.py92 def EnumValueToDict(enum_value): argument
93 assert isinstance(enum_value, ast.EnumValue)
94 data = {'name': enum_value.name}
95 _AddOptional(data, 'value', enum_value.value)
97 _AttributeListToDict(enum_value.attribute_list))
/external/nanopb-c/generator/google/protobuf/
Dtext_format.py125 enum_value = field.enum_type.values_by_number.get(value, None)
126 if enum_value is not None:
127 out.write(enum_value.name)
727 enum_value = enum_descriptor.values_by_name.get(value, None)
728 if enum_value is None:
734 enum_value = enum_descriptor.values_by_number.get(number, None)
735 if enum_value is None:
739 return enum_value.number
/external/llvm/bindings/python/llvm/tests/
Dtest_core.py13 for enum_name, enum_value in enum_spec:
23 self.assertEqual(v_attr.value, enum_value)
25 e = enum_cls.from_value(enum_value)
/external/protobuf/python/google/protobuf/pyext/
Drepeated_scalar_container.cc166 const EnumValueDescriptor* enum_value = in AssignItem() local
168 if (enum_value != NULL) { in AssignItem()
170 enum_value); in AssignItem()
252 const EnumValueDescriptor* enum_value = in Item() local
255 result = PyInt_FromLong(enum_value->number()); in Item()
409 const EnumValueDescriptor* enum_value = in Append() local
411 if (enum_value != NULL) { in Append()
412 reflection->AddEnum(message, field_descriptor, enum_value); in Append()
Dmessage.cc1140 ScopedPyObjectPtr enum_value( in CheckAndGetInteger() local
1142 if (enum_value == NULL) { in CheckAndGetInteger()
1146 rs_container, enum_value.get())); in CheckAndGetInteger()
2294 const EnumValueDescriptor* enum_value = in CheckAndGetInteger() local
2296 result = PyInt_FromLong(enum_value->number()); in CheckAndGetInteger()
2395 const EnumValueDescriptor* enum_value = in CheckAndGetInteger() local
2397 if (enum_value != NULL) { in CheckAndGetInteger()
2398 reflection->SetEnum(message, field_descriptor, enum_value); in CheckAndGetInteger()
/external/libmojo/mojo/public/tools/bindings/generators/java_templates/
Denum_definition.tmpl1 {%- macro enum_value(enum, field, index) -%}
15 public static final int {{field|name}} = {{enum_value(enum, field, loop.index0)}};
/external/protobuf/python/google/protobuf/
Djson_format.py180 enum_value = field.enum_type.values_by_number.get(value, None)
181 if enum_value is not None:
182 return enum_value.name
556 enum_value = field.enum_type.values_by_name.get(value, None)
557 if enum_value is None:
562 return enum_value.number
Dtext_format.py296 enum_value = field.enum_type.values_by_number.get(value, None)
297 if enum_value is not None:
298 out.write(enum_value.name)
1207 enum_value = enum_descriptor.values_by_name.get(value, None)
1208 if enum_value is None:
1214 enum_value = enum_descriptor.values_by_number.get(number, None)
1215 if enum_value is None:
1219 return enum_value.number
/external/clang/bindings/python/tests/cindex/
Dtest_cursor.py328 assert spam.enum_value == 1
330 assert egg.enum_value == 2
332 assert ham.enum_value == 40
347 assert spam.enum_value == -1
349 assert ham.enum_value == 0x10000000000
/external/flatbuffers/tests/union_vector/
Dunion_vector_generated.h43 static const Character enum_value = Character_NONE; member
47 static const Character enum_value = Character_MuLan;
51 static const Character enum_value = Character_Rapunzel;
55 static const Character enum_value = Character_Belle;
/external/vulkan-validation-layers/layers/
Dvk_layer_config.cpp111 auto enum_value = enum_data.find(option); in GetLayerOptionFlags() local
112 if (enum_value != enum_data.end()) { in GetLayerOptionFlags()
113 flags |= enum_value->second; in GetLayerOptionFlags()
/external/protobuf/src/google/protobuf/compiler/
Dparser.cc493 const EnumValueDescriptorProto enum_value = proto->value(i); in ValidateEnum() local
494 if (used_values.find(enum_value.number()) != used_values.end()) { in ValidateEnum()
498 used_values.insert(enum_value.number()); in ValidateEnum()
1730 bool Parser::ParseEnumConstant(EnumValueDescriptorProto* enum_value, in ParseEnumConstant() argument
1738 enum_value, DescriptorPool::ErrorCollector::NAME); in ParseEnumConstant()
1739 DO(ConsumeIdentifier(enum_value->mutable_name(), in ParseEnumConstant()
1750 enum_value, DescriptorPool::ErrorCollector::NUMBER); in ParseEnumConstant()
1754 enum_value->set_number(number); in ParseEnumConstant()
1757 DO(ParseEnumConstantOptions(enum_value, enum_value_location, in ParseEnumConstant()
/external/protobuf/src/google/protobuf/util/internal/testdata/
Ddefault_value_test.proto52 EnumDefault enum_value = 18; field
/external/protobuf/python/google/protobuf/internal/
Ddecoder.py413 (enum_value, pos) = _DecodeSignedVarint32(buffer, pos)
416 if enum_value in enum_type.values_by_number:
417 field_dict[key] = enum_value
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_helpers.cc198 string EnumValueName(const EnumValueDescriptor* enum_value) { in EnumValueName() argument
199 string result = enum_value->name(); in EnumValueName()
/external/flatbuffers/samples/
Dmonster_generated.h65 static const Equipment enum_value = Equipment_NONE; member
69 static const Equipment enum_value = Equipment_Weapon;
88 type = EquipmentTraits<typename T::TableType>::enum_value;

12