Home
last modified time | relevance | path

Searched refs:message_descriptor (Results 1 – 25 of 27) sorted by relevance

12

/external/protobuf/python/google/protobuf/internal/
Ddescriptor_test.py143 message_descriptor = (unittest_custom_options_pb2.
145 field_descriptor = message_descriptor.fields_by_name['field1']
146 oneof_descriptor = message_descriptor.oneofs_by_name['AnOneof']
147 enum_descriptor = message_descriptor.enum_types_by_name['AnEnum']
148 enum_value_descriptor = (message_descriptor.
150 other_enum_value_descriptor = (message_descriptor.
159 message_options = message_descriptor.GetOptions()
185 message_descriptor = (
188 self.assertFalse(message_descriptor.has_options)
196 message_descriptor = (unittest_custom_options_pb2.
[all …]
Dpython_message.py241 def _AddSlots(message_descriptor, dictionary): argument
473 def _AddInitMethod(message_descriptor, cls): argument
509 field = _GetFieldByName(message_descriptor, field_name)
512 (message_descriptor.name, field_name))
545 _ReraiseTypeErrorWithFieldName(message_descriptor.name, field_name)
553 _ReraiseTypeErrorWithFieldName(message_descriptor.name, field_name)
560 def _GetFieldByName(message_descriptor, field_name): argument
570 return message_descriptor.fields_by_name[field_name]
573 (message_descriptor.name, field_name))
811 def _AddListFieldsMethod(message_descriptor, cls): argument
[all …]
Dwell_known_types.py432 def IsValidForDescriptor(self, message_descriptor): argument
435 if not _IsValidPath(message_descriptor, path):
439 def AllFieldsFromDescriptor(self, message_descriptor): argument
442 for field in message_descriptor.fields:
494 def _IsValidPath(message_descriptor, path): argument
499 field = message_descriptor.fields_by_name.get(name)
504 message_descriptor = field.message_type
505 return last in message_descriptor.fields_by_name
510 message_descriptor = message.DESCRIPTOR
511 if (message_descriptor.name != 'FieldMask' or
[all …]
Dcontainers.py354 def __init__(self, message_listener, message_descriptor): argument
370 self._message_descriptor = message_descriptor
554 def __init__(self, message_listener, message_descriptor, key_checker, argument
568 self._message_descriptor = message_descriptor
Dgenerator_test.py145 message_descriptor = unittest_pb2.TestRequired.DESCRIPTOR
146 non_extension_descriptor = message_descriptor.fields_by_name['a']
/external/protobuf/python/google/protobuf/
Djson_format.py197 message_descriptor = message.DESCRIPTOR
198 full_name = message_descriptor.full_name
199 if _IsWrapperMessage(message_descriptor):
244 message_descriptor = message.DESCRIPTOR
245 for field in message_descriptor.fields:
316 message_descriptor = sub_message.DESCRIPTOR
317 full_name = message_descriptor.full_name
318 if _IsWrapperMessage(message_descriptor):
367 def _IsWrapperMessage(message_descriptor): argument
368 return message_descriptor.file.name == 'google/protobuf/wrappers.proto'
[all …]
Ddescriptor_pool.py495 message_descriptor = self.FindMessageTypeByName(message_name)
496 return message_descriptor.fields_by_name[field_name]
512 message_descriptor = self.FindMessageTypeByName(message_name)
513 return message_descriptor.oneofs_by_name[oneof_name]
545 def FindExtensionByNumber(self, message_descriptor, number): argument
563 return self._extensions_by_number[message_descriptor][number]
565 self._TryLoadExtensionFromDB(message_descriptor, number)
566 return self._extensions_by_number[message_descriptor][number]
568 def FindAllExtensions(self, message_descriptor): argument
583 full_name = message_descriptor.full_name
[all …]
Dtext_format.py295 message_descriptor = descriptor_pool.FindMessageTypeByName(type_name)
298 message_type = database.GetPrototype(message_descriptor)
816 message_descriptor = message.DESCRIPTOR
817 if (message_descriptor.full_name == _ANY_FULL_TYPE_NAME and
847 if not message_descriptor.is_extendable:
850 message_descriptor.full_name)
864 elif message_descriptor != field.containing_type:
867 (name, message_descriptor.full_name))
875 field = message_descriptor.fields_by_number.get(number, None)
876 if not field and message_descriptor.is_extendable:
[all …]
Dsymbol_database.py85 def RegisterMessageDescriptor(self, message_descriptor): argument
91 self.pool.AddDescriptor(message_descriptor)
/external/protobuf/src/google/protobuf/compiler/python/
Dpython_generator.cc691 void Generator::PrintDescriptor(const Descriptor& message_descriptor) const { in PrintDescriptor()
692 PrintNestedDescriptors(message_descriptor); in PrintDescriptor()
697 ModuleLevelDescriptorName(message_descriptor)); in PrintDescriptor()
700 m["name"] = message_descriptor.name(); in PrintDescriptor()
701 m["full_name"] = message_descriptor.full_name(); in PrintDescriptor()
710 PrintFieldsInDescriptor(message_descriptor); in PrintDescriptor()
711 PrintExtensionsInDescriptor(message_descriptor); in PrintDescriptor()
715 for (int i = 0; i < message_descriptor.nested_type_count(); ++i) { in PrintDescriptor()
717 ModuleLevelDescriptorName(*message_descriptor.nested_type(i)); in PrintDescriptor()
725 for (int i = 0; i < message_descriptor.enum_type_count(); ++i) { in PrintDescriptor()
[all …]
Dpython_generator.h90 const Descriptor& message_descriptor, bool is_extension,
93 void PrintFieldsInDescriptor(const Descriptor& message_descriptor) const;
94 void PrintExtensionsInDescriptor(const Descriptor& message_descriptor) const;
96 void PrintDescriptor(const Descriptor& message_descriptor) const;
100 void PrintMessage(const Descriptor& message_descriptor,
/external/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/
Ddescriptor_test.py140 message_descriptor =\
142 field_descriptor = message_descriptor.fields_by_name["field1"]
143 enum_descriptor = message_descriptor.enum_types_by_name["AnEnum"]
145 message_descriptor.enum_values_by_name["ANENUM_VAL2"]
153 message_options = message_descriptor.GetOptions()
184 message_descriptor =\
186 message_options = message_descriptor.GetOptions()
210 message_descriptor =\
212 message_options = message_descriptor.GetOptions()
236 message_descriptor =\
[all …]
Dgenerator_test.py139 message_descriptor = unittest_pb2.TestRequired.DESCRIPTOR
140 non_extension_descriptor = message_descriptor.fields_by_name['a']
/external/grpc-grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/
Dreflection.py76 message_descriptor = self._pool.FindMessageTypeByName(
79 message_descriptor, extension_number)
89 message_descriptor = self._pool.FindMessageTypeByName(
95 message_descriptor)))
102 base_type_name=message_descriptor.full_name,
/external/protobuf/python/google/protobuf/pyext/
Dmessage_factory.h83 const Descriptor* message_descriptor,
88 const Descriptor* message_descriptor);
92 const Descriptor* message_descriptor);
Ddescriptor_pool.cc241 const Descriptor* message_descriptor = in FindMessageByName() local
245 if (message_descriptor == NULL) { in FindMessageByName()
252 return PyMessageDescriptor_FromDescriptor(message_descriptor); in FindMessageByName()
421 PyObject* message_descriptor; in FindExtensionByNumber() local
423 if (!PyArg_ParseTuple(args, "Oi", &message_descriptor, &number)) { in FindExtensionByNumber()
427 message_descriptor); in FindExtensionByNumber()
504 const Descriptor* message_descriptor = in AddDescriptor() local
506 if (!message_descriptor) { in AddDescriptor()
509 if (message_descriptor != in AddDescriptor()
511 message_descriptor->full_name())) { in AddDescriptor()
[all …]
Dmessage_factory.cc141 const Descriptor* message_descriptor, in RegisterMessageClass() argument
146 std::make_pair(message_descriptor, message_class)); in RegisterMessageClass()
224 const Descriptor* message_descriptor) { in GetMessageClass() argument
226 iterator ret = self->classes_by_descriptor->find(message_descriptor); in GetMessageClass()
229 message_descriptor->full_name().c_str()); in GetMessageClass()
Dextension_dict.cc242 const Descriptor* message_descriptor = pool->pool->FindMessageTypeByName( in _FindExtensionByName() local
244 if (message_descriptor && message_descriptor->extension_count() > 0) { in _FindExtensionByName()
245 const FieldDescriptor* extension = message_descriptor->extension(0); in _FindExtensionByName()
Dmessage.cc238 const Descriptor* message_descriptor = in New() local
240 if (message_descriptor == NULL) { in New()
254 WKT_classes, message_descriptor->full_name().c_str()); in New()
288 newtype->message_descriptor = descriptor; in New()
363 if (self->message_descriptor == NULL) { in GetExtensionsByName()
373 pool->pool->FindAllExtensions(self->message_descriptor, &extensions); in GetExtensionsByName()
393 if (self->message_descriptor == NULL) { in GetExtensionsByNumber()
403 pool->pool->FindAllExtensions(self->message_descriptor, &extensions); in GetExtensionsByNumber()
443 self->message_descriptor->FindFieldByLowercaseName(field_name); in GetClassAttribute()
447 self->message_descriptor->FindExtensionByLowercaseName(field_name); in GetClassAttribute()
[all …]
Ddescriptor_containers.h56 namespace message_descriptor {
Ddescriptor.cc464 namespace message_descriptor { namespace
716 message_descriptor::Methods, // tp_methods
718 message_descriptor::Getters, // tp_getset
723 const Descriptor* message_descriptor) { in PyMessageDescriptor_FromDescriptor() argument
725 &PyMessageDescriptor_Type, message_descriptor, NULL); in PyMessageDescriptor_FromDescriptor()
Dmessage.h154 const Descriptor* message_descriptor; member
/external/python/apitools/apitools/base/protorpclite/
Ddescriptor.py350 message_descriptor = MessageDescriptor()
351 message_descriptor.name = message_definition.definition_name().split(
357 message_descriptor.fields = [describe_field(field) for field in fields]
369 message_descriptor.message_types = message_descriptors
381 message_descriptor.enum_types = enum_descriptors
383 return message_descriptor
/external/python/apitools/apitools/gen/
Dmessage_registry.py170 message_descriptor = self.LookupDescriptor(name)
171 if message_descriptor is None:
173 return message_descriptor
187 def __DescriptorEnv(self, message_descriptor): argument
190 self.__current_path.append(message_descriptor.name)
191 self.__current_env = message_descriptor
/external/protobuf/src/google/protobuf/compiler/java/
Djava_name_resolver.cc76 const Descriptor* message_descriptor = descriptor->containing_type(); in ClassNameWithoutPackage() local
77 if (message_descriptor == NULL) { in ClassNameWithoutPackage()
80 return ClassNameWithoutPackage(message_descriptor, immutable) + "." + in ClassNameWithoutPackage()

12