Home
last modified time | relevance | path

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

12345678910>>...20

/external/rust/crates/protobuf-codegen/src/
Doneof.rs53 oneof: &OneofWithContext<'a>, in parse()
58 let boxed = OneofField::need_boxed(field, root_scope, &oneof.message.name_absolute().path); in parse()
63 oneof_rust_field_name: oneof.field_name().into(), in parse()
64 oneof_type_name: RustType::Oneof(oneof.rust_name().to_string()), in parse()
81 oneof: &'a OneofGen<'a>, field
91 oneof: &'a OneofGen<'a>, in parse()
98 oneof, in parse()
103 oneof.type_name.to_code(&field.customize), in parse()
107 variant.oneof, in parse()
109 field.oneof().elem.clone(), in parse()
[all …]
Dmessage.rs9 use oneof::OneofGen;
10 use oneof::OneofVariantGen;
92 .map(|oneof| OneofGen::parse(self, oneof, &self.customize)) in oneofs()
135 for oneof in self.oneofs() { in write_match_each_oneof_variant()
138 &format!("self.{}", oneof.oneof.field_name())[..], in write_match_each_oneof_variant()
141 for variant in oneof.variants_except_group() { in write_match_each_oneof_variant()
541 for oneof in self.oneofs() { in write_struct()
548 oneof.oneof.field_name().get(), in write_struct()
549 &oneof.full_storage_type().to_code(&self.customize), in write_struct()
590 for oneof in self.oneofs() { in write()
[all …]
Dscope.rs354 .map(|(index, oneof)| OneofWithContext { in oneofs()
356 oneof: oneof, in oneofs()
483 pub fn oneof(&self) -> Option<OneofWithContext<'a>> { in oneof() method
518 pub oneof: &'a OneofWithContext<'a>, field
524 pub oneof: &'a OneofDescriptorProto, field
531 return rust_field_name_for_protobuf_field_name(self.oneof.get_name()); in field_name()
539 self.oneof.get_name() in rust_name()
549 oneof: self, in variants()
/external/tensorflow/tensorflow/core/framework/
Ddataset_options.proto29 oneof optional_num_devices {
36 oneof optional_enabled {
42 oneof optional_use_choose_fastest {
50 oneof optional_apply_default_optimizations {
54 oneof optional_autotune {
59 oneof optional_autotune_buffers {
65 oneof optional_autotune_cpu_budget {
71 oneof optional_autotune_ram_budget {
75 oneof optional_filter_fusion {
80 oneof optional_filter_with_random_uniform_fusion {
[all …]
/external/protobuf/objectivec/Tests/
DGPBSwiftTests.swift293 let autoCreated = msg.oneof // Default create one. in testProto2OneOfSupport()
301 XCTAssertTrue(msg.oneof === autoCreated) // Still the same in testProto2OneOfSupport()
308 XCTAssertTrue(msg.oneof === autoCreated) // Still the same in testProto2OneOfSupport()
315 XCTAssertTrue(msg.oneof === autoCreated) // Still the same in testProto2OneOfSupport()
319 msg.oneof.optionalInt32 = 200 in testProto2OneOfSupport()
323 XCTAssertTrue(msg.oneof === autoCreated) // Still the same in testProto2OneOfSupport()
324 XCTAssertEqual(msg.oneof.optionalInt32, Int32(200)) in testProto2OneOfSupport()
332 let autoCreated2 = msg.oneof // Default create one in testProto2OneOfSupport()
335 XCTAssertEqual(msg.oneof.optionalInt32, Int32(0)) // Default in testProto2OneOfSupport()
348 msg.oneof.optionalInt32 = 300 in testProto2OneOfSupport()
[all …]
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DFieldInfo.java49 private final OneofInfo oneof; field in FieldInfo
228 OneofInfo oneof, in forOneofMemberField() argument
234 checkNotNull(oneof, "oneof"); in forOneofMemberField()
252 oneof, in forOneofMemberField()
328 OneofInfo oneof, in FieldInfo() argument
341 this.oneof = oneof; in FieldInfo()
365 return oneof; in getOneof()
458 private OneofInfo oneof; field in FieldInfo.Builder
471 if (oneof != null) { in withField()
505 public Builder withOneof(OneofInfo oneof, Class<?> oneofStoredType) { in withOneof() argument
[all …]
DDynamicMessage.java171 public boolean hasOneof(OneofDescriptor oneof) { in hasOneof() argument
172 verifyOneofContainingType(oneof); in hasOneof()
173 FieldDescriptor field = oneofCases[oneof.getIndex()]; in hasOneof()
181 public FieldDescriptor getOneofFieldDescriptor(OneofDescriptor oneof) { in getOneofFieldDescriptor() argument
182 verifyOneofContainingType(oneof); in getOneofFieldDescriptor()
183 return oneofCases[oneof.getIndex()]; in getOneofFieldDescriptor()
310 private void verifyOneofContainingType(OneofDescriptor oneof) {
311 if (oneof.getContainingType() != type) {
475 public boolean hasOneof(OneofDescriptor oneof) {
476 verifyOneofContainingType(oneof);
[all …]
/external/grpc-grpc/third_party/nanopb/tests/anonymous_oneof/
DSConscript21 env2.NanopbProto('oneof')
24 'oneof.pb.c',
28 env2.RunTest("message1.txt", [dec, '$BUILD/oneof/message1.pb'], ARGS = ['1'])
29 env2.RunTest("message2.txt", [dec, '$BUILD/oneof/message2.pb'], ARGS = ['2'])
30 env2.RunTest("message3.txt", [dec, '$BUILD/oneof/message3.pb'], ARGS = ['3'])
/external/nanopb-c/tests/anonymous_oneof/
DSConscript21 env2.NanopbProto('oneof')
24 'oneof.pb.c',
28 env2.RunTest("message1.txt", [dec, '$BUILD/oneof/message1.pb'], ARGS = ['1'])
29 env2.RunTest("message2.txt", [dec, '$BUILD/oneof/message2.pb'], ARGS = ['2'])
30 env2.RunTest("message3.txt", [dec, '$BUILD/oneof/message3.pb'], ARGS = ['3'])
/external/protobuf/php/src/Google/Protobuf/Internal/
DOneofDescriptor.php69 $oneof = new OneofDescriptor();
70 $oneof->setName($oneof_proto->getName());
73 $oneof->addField($field);
76 return $oneof;
/external/protobuf/src/google/protobuf/compiler/java/
Djava_context.cc118 const OneofDescriptor* oneof = message->oneof_decl(i); in InitializeFieldGeneratorInfoForMessage() local
120 info.name = UnderscoresToCamelCase(oneof->name(), false); in InitializeFieldGeneratorInfoForMessage()
121 info.capitalized_name = UnderscoresToCamelCase(oneof->name(), true); in InitializeFieldGeneratorInfoForMessage()
122 oneof_generator_info_map_[oneof] = info; in InitializeFieldGeneratorInfoForMessage()
182 const OneofDescriptor* oneof) const { in GetOneofGeneratorInfo()
184 FindOrNull(oneof_generator_info_map_, oneof); in GetOneofGeneratorInfo()
187 << oneof->name(); in GetOneofGeneratorInfo()
Djava_message_lite.cc230 const OneofDescriptor* oneof = descriptor_->oneof_decl(i); in Generate() local
231 vars["oneof_name"] = context_->GetOneofGeneratorInfo(oneof)->name; in Generate()
233 context_->GetOneofGeneratorInfo(oneof)->capitalized_name; in Generate()
234 vars["oneof_index"] = StrCat(oneof->index()); in Generate()
244 for (int j = 0; j < oneof->field_count(); j++) { in Generate()
245 const FieldDescriptor* field = oneof->field(j); in Generate()
269 for (int j = 0; j < oneof->field_count(); j++) { in Generate()
270 const FieldDescriptor* field = oneof->field(j); in Generate()
497 const OneofDescriptor* oneof = descriptor_->oneof_decl(i); in GenerateDynamicMethodNewBuildMessageInfo() local
501 "oneof_name", context_->GetOneofGeneratorInfo(oneof)->name); in GenerateDynamicMethodNewBuildMessageInfo()
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_message.cc772 for (auto oneof : OneOfRange(descriptor_)) { in GenerateFieldAccessorDeclarations() local
774 format.Set("oneof_name", oneof->name()); in GenerateFieldAccessorDeclarations()
775 format.Set("camel_oneof_name", UnderscoresToCamelCase(oneof->name(), true)); in GenerateFieldAccessorDeclarations()
779 oneof); in GenerateFieldAccessorDeclarations()
826 for (auto oneof : OneOfRange(descriptor_)) { in GenerateOneofHasBits() local
827 format.Set("oneof_name", oneof->name()); in GenerateOneofHasBits()
828 format.Set("oneof_index", oneof->index()); in GenerateOneofHasBits()
829 format.Set("cap_oneof_name", ToUpper(oneof->name())); in GenerateOneofHasBits()
1143 for (auto oneof : OneOfRange(descriptor_)) { in GenerateClassDefinition() local
1144 format("enum $1$Case {\n", UnderscoresToCamelCase(oneof->name(), true)); in GenerateClassDefinition()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DDynamicMessageTest.java280 OneofDescriptor oneof = TestAllTypes.getDescriptor().getOneofs().get(0); in testDynamicOneofMessage() local
281 assertFalse(builder.hasOneof(oneof)); in testDynamicOneofMessage()
282 assertSame(null, builder.getOneofFieldDescriptor(oneof)); in testDynamicOneofMessage()
285 assertTrue(builder.hasOneof(oneof)); in testDynamicOneofMessage()
286 FieldDescriptor field = oneof.getField(3); in testDynamicOneofMessage()
287 assertSame(field, builder.getOneofFieldDescriptor(oneof)); in testDynamicOneofMessage()
290 assertTrue(message.hasOneof(oneof)); in testDynamicOneofMessage()
293 FieldDescriptor mergedField = oneof.getField(0); in testDynamicOneofMessage()
300 builder.clearOneof(oneof); in testDynamicOneofMessage()
301 assertSame(null, builder.getOneofFieldDescriptor(oneof)); in testDynamicOneofMessage()
[all …]
DProto3MessageInfoFactory.java152 OneofInfo oneof = new OneofInfo(0, field("testOneofCase_"), field("testOneof_")); in lookupFieldsByName() local
153 builder.withField(forOneofMemberField(53, FieldType.DOUBLE, oneof, Double.class, true, null)); in lookupFieldsByName()
154 builder.withField(forOneofMemberField(54, FieldType.FLOAT, oneof, Float.class, true, null)); in lookupFieldsByName()
155 builder.withField(forOneofMemberField(55, FieldType.INT64, oneof, Long.class, true, null)); in lookupFieldsByName()
156 builder.withField(forOneofMemberField(56, FieldType.UINT64, oneof, Long.class, true, null)); in lookupFieldsByName()
157 builder.withField(forOneofMemberField(57, FieldType.INT32, oneof, Integer.class, true, null)); in lookupFieldsByName()
158 builder.withField(forOneofMemberField(58, FieldType.FIXED64, oneof, Long.class, true, null)); in lookupFieldsByName()
159 builder.withField(forOneofMemberField(59, FieldType.FIXED32, oneof, Integer.class, true, null)); in lookupFieldsByName()
160 builder.withField(forOneofMemberField(60, FieldType.BOOL, oneof, Boolean.class, true, null)); in lookupFieldsByName()
161 builder.withField(forOneofMemberField(61, FieldType.STRING, oneof, String.class, true, null)); in lookupFieldsByName()
[all …]
DProto3MessageLiteInfoFactory.java363 OneofInfo oneof = in lookupFieldsByName() local
368 builder.withField(forOneofMemberField(53, FieldType.DOUBLE, oneof, Double.class, true, null)); in lookupFieldsByName()
369 builder.withField(forOneofMemberField(54, FieldType.FLOAT, oneof, Float.class, true, null)); in lookupFieldsByName()
370 builder.withField(forOneofMemberField(55, FieldType.INT64, oneof, Long.class, true, null)); in lookupFieldsByName()
371 builder.withField(forOneofMemberField(56, FieldType.UINT64, oneof, Long.class, true, null)); in lookupFieldsByName()
372 builder.withField(forOneofMemberField(57, FieldType.INT32, oneof, Integer.class, true, null)); in lookupFieldsByName()
373 builder.withField(forOneofMemberField(58, FieldType.FIXED64, oneof, Long.class, true, null)); in lookupFieldsByName()
374 builder.withField(forOneofMemberField(59, FieldType.FIXED32, oneof, Integer.class, true, null)); in lookupFieldsByName()
375 builder.withField(forOneofMemberField(60, FieldType.BOOL, oneof, Boolean.class, true, null)); in lookupFieldsByName()
376 builder.withField(forOneofMemberField(61, FieldType.STRING, oneof, String.class, true, null)); in lookupFieldsByName()
[all …]
DProto2MessageInfoFactory.java243 OneofInfo oneof = new OneofInfo(0, field("testOneofCase_"), field("testOneof_")); in lookupFieldsByName() local
244 builder.withField(forOneofMemberField(53, FieldType.DOUBLE, oneof, Double.class, false, null)); in lookupFieldsByName()
245 builder.withField(forOneofMemberField(54, FieldType.FLOAT, oneof, Float.class, false, null)); in lookupFieldsByName()
246 builder.withField(forOneofMemberField(55, FieldType.INT64, oneof, Long.class, false, null)); in lookupFieldsByName()
247 builder.withField(forOneofMemberField(56, FieldType.UINT64, oneof, Long.class, false, null)); in lookupFieldsByName()
248 builder.withField(forOneofMemberField(57, FieldType.INT32, oneof, Integer.class, false, null)); in lookupFieldsByName()
249 builder.withField(forOneofMemberField(58, FieldType.FIXED64, oneof, Long.class, false, null)); in lookupFieldsByName()
251 forOneofMemberField(59, FieldType.FIXED32, oneof, Integer.class, false, null)); in lookupFieldsByName()
252 builder.withField(forOneofMemberField(60, FieldType.BOOL, oneof, Boolean.class, false, null)); in lookupFieldsByName()
253 builder.withField(forOneofMemberField(61, FieldType.STRING, oneof, String.class, false, null)); in lookupFieldsByName()
[all …]
/external/nanopb-c/tests/oneof/
DSConscript1 # Test the 'oneof' feature for generating C unions.
16 env.NanopbProto('oneof')
19 'oneof.pb.c',
24 'oneof.pb.c',
/external/grpc-grpc/third_party/nanopb/tests/oneof/
DSConscript1 # Test the 'oneof' feature for generating C unions.
16 env.NanopbProto('oneof')
19 'oneof.pb.c',
24 'oneof.pb.c',
/external/rust/crates/grpcio-sys/grpc/third_party/upb/upbc/
Dmessage_layout.cc175 for (auto oneof : oneof_order) { in PlaceOneofFields() local
178 for (int i = 0; i < oneof->field_count(); i++) { in PlaceOneofFields()
179 oneof_maxsize.MaxFrom(SizeOf(oneof->field(i))); in PlaceOneofFields()
186 oneof_case_offsets_[oneof] = discriminator; in PlaceOneofFields()
188 for (int i = 0; i < oneof->field_count(); i++) { in PlaceOneofFields()
189 field_offsets_[oneof->field(i)] = data; in PlaceOneofFields()
/external/oss-fuzz/projects/xerces-c/
Dxml.proto20 oneof misc_oneof {
125 oneof notation_oneof {
148 oneof entity_oneof {
156 oneof pedef_oneof {
187 oneof extsubset_oneof {
198 oneof markup_oneof {
249 oneof content_oneof {
/external/nos/host/generic/nugget/proto/nugget/app/protoapi/
Dtesting_api.proto22 // TODO remove this when oneof support is added to nanopb
52 // TODO remove this when oneof support is added to nanopb
82 // a oneof would be good for this but nanopb doesn't support dynamic lengths
83 // inside of a oneof.
358 TODO look into adding callback support to oneof fields in nanopb
360 oneof test_parameters {
366 oneof test_results {
/external/oss-fuzz/projects/jsoncpp/
Djson.proto36 oneof value {
39 // null: null, will be used when 'oneof' contains nothing
85 // integer_value is used when oneof field below has nothing.
86 oneof value {
/external/protobuf/java/lite/src/test/java/com/google/protobuf/
DProto2MessageLiteInfoFactory.java583 OneofInfo oneof = in lookupFieldsByName() local
588 builder.withField(forOneofMemberField(53, FieldType.DOUBLE, oneof, Double.class, false, null)); in lookupFieldsByName()
589 builder.withField(forOneofMemberField(54, FieldType.FLOAT, oneof, Float.class, false, null)); in lookupFieldsByName()
590 builder.withField(forOneofMemberField(55, FieldType.INT64, oneof, Long.class, false, null)); in lookupFieldsByName()
591 builder.withField(forOneofMemberField(56, FieldType.UINT64, oneof, Long.class, false, null)); in lookupFieldsByName()
592 builder.withField(forOneofMemberField(57, FieldType.INT32, oneof, Integer.class, false, null)); in lookupFieldsByName()
593 builder.withField(forOneofMemberField(58, FieldType.FIXED64, oneof, Long.class, false, null)); in lookupFieldsByName()
595 forOneofMemberField(59, FieldType.FIXED32, oneof, Integer.class, false, null)); in lookupFieldsByName()
596 builder.withField(forOneofMemberField(60, FieldType.BOOL, oneof, Boolean.class, false, null)); in lookupFieldsByName()
597 builder.withField(forOneofMemberField(61, FieldType.STRING, oneof, String.class, false, null)); in lookupFieldsByName()
[all …]
/external/protobuf/csharp/protos/
Dunittest_issues.proto94 // order, and the oneof fields aren't contiguous either.
106 oneof o1 {
113 oneof o2 {
128 // oneof case, which is itself a message type, the submessages should
136 oneof value {

12345678910>>...20