/third_party/protobuf/python/google/protobuf/ |
H A D | descriptor_pool.py | 410 file_proto = self._internal_db.FindFileByName(file_name) 413 file_proto = self._descriptor_db.FindFileByName(file_name) 416 if not file_proto: 418 return self._ConvertFileProtoToFileDescriptor(file_proto) 658 file_proto = self._descriptor_db.FindFileContainingExtension( 661 if file_proto is None: 665 self._ConvertFileProtoToFileDescriptor(file_proto) 668 (file_proto.name, number)) 718 file_proto = self._internal_db.FindFileContainingSymbol(symbol) 721 file_proto [all...] |
H A D | message_factory.py | 153 file_by_name = {file_proto.name: file_proto for file_proto in file_protos} 154 def _AddFile(file_proto): 155 for dependency in file_proto.dependency: 159 _FACTORY.pool.Add(file_proto) 162 return _FACTORY.GetMessages([file_proto.name for file_proto in file_protos])
|
H A D | proto_builder.py | 119 file_proto = descriptor_pb2.FileDescriptorProto() 120 file_proto.name = os.path.join(package.replace('.', '/'), proto_file_name) 121 file_proto.package = package 122 desc_proto = file_proto.message_type.add() 130 return file_proto
|
/third_party/protobuf/src/google/protobuf/ |
H A D | descriptor_unittest.cc | 2035 FileDescriptorProto file_proto; in TEST_F() local 2037 FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); in TEST_F() 2038 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); in TEST_F() 2044 file_proto.Clear(); in TEST_F() 2045 file_proto.set_name("foo.proto"); in TEST_F() 2046 file_proto.add_dependency("google/protobuf/descriptor.proto"); in TEST_F() 2047 AddExtension(&file_proto, "google.protobuf.FieldOptions", "option1", 1000, in TEST_F() 2050 ASSERT_TRUE(pool.BuildFile(file_proto) != nullptr); in TEST_F() 2056 file_proto.Clear(); in TEST_F() 2057 file_proto in TEST_F() 2282 FileDescriptorProto file_proto; GetFieldDescriptorOfType() local 2510 FileDescriptorProto file_proto; TEST_F() local 2632 FileDescriptorProto file_proto; TEST_F() local 3147 FileDescriptorProto file_proto; TEST() local 3205 FileDescriptorProto file_proto; TEST() local 3282 FileDescriptorProto file_proto; TEST() local 3362 FileDescriptorProto file_proto; TEST() local 3484 FileDescriptorProto file_proto; TEST() local 3514 FileDescriptorProto file_proto; TEST() local 3563 FileDescriptorProto file_proto; TEST() local 3645 FileDescriptorProto file_proto; BuildFile() local 3655 FileDescriptorProto file_proto; BuildFileWithErrors() local 3669 FileDescriptorProto file_proto; BuildFileWithWarnings() local 3679 FileDescriptorProto file_proto; BuildFileInTestPool() local 5794 FileDescriptorProto file_proto; TEST_F() local 5888 FillValidMapEntry(FileDescriptorProto* file_proto) FillValidMapEntry() argument 5924 FileDescriptorProto file_proto; TEST_F() local 5930 FileDescriptorProto file_proto; TEST_F() local 5941 FileDescriptorProto file_proto; TEST_F() local 5952 FileDescriptorProto file_proto; TEST_F() local 5963 FileDescriptorProto file_proto; TEST_F() local 5975 FileDescriptorProto file_proto; TEST_F() local 5989 FileDescriptorProto file_proto; TEST_F() local 5999 FileDescriptorProto file_proto; TEST_F() local 6007 FileDescriptorProto file_proto; TEST_F() local 6017 FileDescriptorProto file_proto; TEST_F() local 6027 FileDescriptorProto file_proto; TEST_F() local 6037 FileDescriptorProto file_proto; TEST_F() local 6047 FileDescriptorProto file_proto; TEST_F() local 6057 FileDescriptorProto file_proto; TEST_F() local 6067 FileDescriptorProto file_proto; TEST_F() local 6077 FileDescriptorProto file_proto; TEST_F() local 6087 FileDescriptorProto file_proto; TEST_F() local 6097 FileDescriptorProto file_proto; TEST_F() local 6107 FileDescriptorProto file_proto; TEST_F() local 6132 FileDescriptorProto file_proto; TEST_F() local 6143 FileDescriptorProto file_proto; TEST_F() local 6163 FileDescriptorProto file_proto; TEST_F() local 6179 FileDescriptorProto file_proto; TEST_F() local 6293 FileDescriptorProto file_proto; TEST_F() local 6527 FileDescriptorProto file_proto; TEST_F() local 6618 FileDescriptorProto file_proto; AddToDatabase() local [all...] |
H A D | descriptor_database_unittest.cc | 58 FileDescriptorProto file_proto; in AddToDatabase() local 59 EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); in AddToDatabase() 60 database->Add(file_proto); in AddToDatabase() 163 FileDescriptorProto file_proto; in AddToDatabase() local 164 EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); in AddToDatabase() 165 EXPECT_TRUE(test_case_->AddToDatabase(file_proto)); in AddToDatabase() 169 FileDescriptorProto file_proto; in AddToDatabaseWithError() local 170 EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); in AddToDatabaseWithError() 171 EXPECT_FALSE(test_case_->AddToDatabase(file_proto)); in AddToDatabaseWithError()
|
H A D | descriptor_database.cc | 63 void RecordMessageNames(const FileDescriptorProto& file_proto, in RecordMessageNames() argument 65 for (const auto& d : file_proto.message_type()) { in RecordMessageNames() 66 RecordMessageNames(d, file_proto.package(), output); in RecordMessageNames() 78 FileDescriptorProto file_proto; in ForAllFileProtos() local 80 file_proto.Clear(); in ForAllFileProtos() 81 if (!db->FindFileByName(f, &file_proto)) { in ForAllFileProtos() 85 callback(file_proto, &set); in ForAllFileProtos() 97 [](const FileDescriptorProto& file_proto, std::set<std::string>* set) { in FindAllPackageNames() 98 set->insert(file_proto.package()); in FindAllPackageNames() 106 [](const FileDescriptorProto& file_proto, st in FindAllMessageNames() 605 FileDescriptorProto file_proto; FindNameOfFileContainingSymbol() local [all...] |
H A D | descriptor.cc | 1877 FileDescriptorProto file_proto; in TryFindFileInFallbackDatabase() 1878 if (!fallback_database_->FindFileByName(name_string, &file_proto) || in TryFindFileInFallbackDatabase() 1879 BuildFileFromDatabase(file_proto) == nullptr) { in TryFindFileInFallbackDatabase() 1915 FileDescriptorProto file_proto; in TryFindSymbolInFallbackDatabase() 1935 || !fallback_database_->FindFileContainingSymbol(name_string, &file_proto) in TryFindSymbolInFallbackDatabase() 1940 || tables_->FindFile(file_proto.name()) != nullptr in TryFindSymbolInFallbackDatabase() 1943 || BuildFileFromDatabase(file_proto) == nullptr) { in TryFindSymbolInFallbackDatabase() 1955 FileDescriptorProto file_proto; in TryFindExtensionInFallbackDatabase() 1957 containing_type->full_name(), field_number, &file_proto)) { in TryFindExtensionInFallbackDatabase() 1961 if (tables_->FindFile(file_proto in TryFindExtensionInFallbackDatabase() [all...] |
/third_party/protobuf/php/src/Google/Protobuf/Internal/ |
H A D | GPBUtil.php | 267 $file_proto) 269 $option = $file_proto->getOptions(); 294 if ($file_proto->getPackage() === "google.protobuf") { 306 $file_proto) 309 return static::getClassNamePrefix($classname, $file_proto) . $classname; 314 $file_proto) 318 $parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i]; 326 $file_proto, 339 $package = $file_proto->getPackage(); 347 static::getClassNameWithoutPackage($message_name_without_package, $file_proto); [all...] |
H A D | Descriptor.php | 175 public static function buildFromProto($proto, $file_proto, $containing) 186 $file_proto, 203 $nested_proto, $file_proto, $message_name_without_package)); 209 $enum_proto, $file_proto, $message_name_without_package));
|
H A D | EnumDescriptor.php | 89 public static function buildFromProto($proto, $file_proto, $containing) 100 $file_proto,
|
H A D | DescriptorPool.php | 63 foreach($files->getFile() as $file_proto) { 64 $file = FileDescriptor::buildFromProto($file_proto);
|
/third_party/protobuf/python/google/protobuf/pyext/ |
H A D | descriptor_database.cc | 76 FileDescriptorProto* file_proto = in GetFileDescriptorProto() local 78 *output = *file_proto; in GetFileDescriptorProto() 99 FileDescriptorProto file_proto; in GetFileDescriptorProto() local 100 if (!file_proto.ParseFromArray(str, len)) { in GetFileDescriptorProto() 105 *output = file_proto; in GetFileDescriptorProto()
|
H A D | descriptor_pool.cc | 589 FileDescriptorProto file_proto; in AddSerializedFile() local 590 if (!file_proto.ParseFromArray(message_type, message_len)) { in AddSerializedFile() 599 generated_file = self->underlay->FindFileByName(file_proto.name()); in AddSerializedFile() 608 self->pool->BuildFileCollectingErrors(file_proto, in AddSerializedFile()
|
H A D | descriptor.cc | 1351 FileDescriptorProto file_proto; in GetSerializedPb() local 1352 _GetDescriptor(self)->CopyTo(&file_proto); in GetSerializedPb() 1354 file_proto.SerializePartialToString(&contents); in GetSerializedPb()
|
/third_party/protobuf/src/google/protobuf/compiler/java/ |
H A D | java_file.cc | 124 void CollectExtensions(const FileDescriptorProto& file_proto, in CollectExtensions() argument 128 if (!CollectExtensions(file_proto, extensions)) { in CollectExtensions() 129 // There are unknown fields in the file_proto, which are probably in CollectExtensions() 133 file_proto.GetDescriptor()->full_name()); in CollectExtensions() 136 << file_proto.name() in CollectExtensions() 152 << file_proto.name() in CollectExtensions() 436 // in proto compiler. When we put the descriptor data in the file_proto, those in GenerateDescriptorInitializationCodeForImmutable() 440 // in the file_proto message, and prepare an ExtensionRegistry to return. in GenerateDescriptorInitializationCodeForImmutable() 445 FileDescriptorProto file_proto; in GenerateDescriptorInitializationCodeForImmutable() local 446 file_->CopyTo(&file_proto); in GenerateDescriptorInitializationCodeForImmutable() 514 FileDescriptorProto file_proto; GenerateDescriptorInitializationCodeForMutable() local [all...] |
H A D | java_shared_code_generator.cc | 129 FileDescriptorProto file_proto; in GenerateDescriptors() local 130 file_->CopyTo(&file_proto); in GenerateDescriptors() 133 file_proto.SerializeToString(&file_data); in GenerateDescriptors()
|
/third_party/protobuf/ruby/ext/google/protobuf_c/ |
H A D | defs.c | 140 * definition can live in either the symtab or the file_proto. 143 const upb_symtab* symtab, google_protobuf_FileDescriptorProto* file_proto) { in rewrite_enum_defaults() 146 google_protobuf_FileDescriptorProto_mutable_message_type(file_proto, &n); in rewrite_enum_defaults() 153 rewrite_enum_default(symtab, file_proto, fields[j]); in rewrite_enum_defaults() 250 google_protobuf_FileDescriptorProto* file_proto) { in rewrite_names() 262 if (google_protobuf_FileDescriptorProto_has_package(file_proto)) { in rewrite_names() 264 google_protobuf_FileDescriptorProto_package(file_proto); in rewrite_names() 268 msgs = google_protobuf_FileDescriptorProto_mutable_message_type(file_proto, in rewrite_names() 275 enums = google_protobuf_FileDescriptorProto_mutable_enum_type(file_proto, in rewrite_names() 296 google_protobuf_FileDescriptorProto_set_package(file_proto, in rewrite_names() 142 rewrite_enum_defaults( const upb_symtab* symtab, google_protobuf_FileDescriptorProto* file_proto) rewrite_enum_defaults() argument 249 rewrite_names(VALUE _file_builder, google_protobuf_FileDescriptorProto* file_proto) rewrite_names() argument 1459 google_protobuf_FileDescriptorProto* file_proto = file_builder->file_proto; MessageBuilderContext_initialize() local 1970 google_protobuf_FileDescriptorProto* file_proto = file_builder->file_proto; EnumBuilderContext_initialize() local [all...] |
H A D | upb.c | 4677 const google_protobuf_FileDescriptorProto *file_proto, in count_types_in_file() 4682 msgs = google_protobuf_FileDescriptorProto_message_type(file_proto, &n); in count_types_in_file() 4687 google_protobuf_FileDescriptorProto_enum_type(file_proto, &n); in count_types_in_file() 4690 google_protobuf_FileDescriptorProto_extension(file_proto, &n); in count_types_in_file() 4765 const google_protobuf_FileDescriptorProto *file_proto) { in build_filedef() 4775 count_types_in_file(file_proto, &counts); in build_filedef() 4790 if (!google_protobuf_FileDescriptorProto_has_name(file_proto)) { in build_filedef() 4796 strviewdup(ctx, google_protobuf_FileDescriptorProto_name(file_proto)); in build_filedef() 4800 if (google_protobuf_FileDescriptorProto_has_package(file_proto)) { in build_filedef() 4802 google_protobuf_FileDescriptorProto_package(file_proto); in build_filedef() 4676 count_types_in_file( const google_protobuf_FileDescriptorProto *file_proto, decl_counts *counts) count_types_in_file() argument 4763 build_filedef( symtab_addctx *ctx, upb_filedef *file, const google_protobuf_FileDescriptorProto *file_proto) build_filedef() argument 5021 _upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, const upb_msglayout **layouts, upb_status *status) _upb_symtab_addfile() argument 5048 upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, upb_status *status) upb_symtab_addfile() argument [all...] |
H A D | protobuf.h | 166 google_protobuf_FileDescriptorProto* file_proto; member
|
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | descriptor_test.py | 68 file_proto = descriptor_pb2.FileDescriptorProto( 71 message_proto = file_proto.message_type.add( 84 file_proto.message_type.add(name='ResponseMessage') 85 service_proto = file_proto.service.add( 96 self.pool.Add(file_proto) 97 self.my_file = self.pool.FindFileByName(file_proto.name) 430 file_proto = descriptor_pb2.FileDescriptorProto() 431 self.my_file.CopyToProto(file_proto) 433 file_proto.SerializeToString()) 932 file_proto [all...] |
H A D | descriptor_pool_test.py | 627 file_proto = descriptor_pb2.FileDescriptorProto() 628 file_proto.package = 'collector' 629 file_proto.name = 'error_file' 630 message_type = file_proto.message_type.add() 640 enum_type = file_proto.enum_type.add() 645 self.db.Add(file_proto) 998 file_proto = descriptor_pb2.FileDescriptorProto( 1000 message_proto = file_proto.message_type.add( 1007 enum_proto = file_proto.enum_type.add(name='TopEnum') 1009 file_proto [all...] |
/third_party/protobuf/src/google/protobuf/compiler/php/ |
H A D | php_generator.cc | 977 FileDescriptorProto* file_proto = files.add_file(); in GenerateAddFileToPool() local 978 file->CopyTo(file_proto); in GenerateAddFileToPool() 981 RepeatedPtrField<string>* dependency = file_proto->mutable_dependency(); in GenerateAddFileToPool() 991 file_proto->clear_extension(); in GenerateAddFileToPool() 993 file_proto->mutable_message_type(); in GenerateAddFileToPool() 1107 auto file_proto = sorted_file_set.add_file(); in GenerateAddFilesToPool() local 1108 file->CopyTo(file_proto); in GenerateAddFilesToPool() 1111 RepeatedPtrField<string>* dependency = file_proto->mutable_dependency(); in GenerateAddFilesToPool() 1121 file_proto->clear_extension(); in GenerateAddFilesToPool() 1123 file_proto in GenerateAddFilesToPool() [all...] |
/third_party/protobuf/php/ext/google/protobuf/ |
H A D | php-upb.c | 5148 const google_protobuf_FileDescriptorProto *file_proto, in count_types_in_file() 5153 msgs = google_protobuf_FileDescriptorProto_message_type(file_proto, &n); in count_types_in_file() 5158 google_protobuf_FileDescriptorProto_enum_type(file_proto, &n); in count_types_in_file() 5161 google_protobuf_FileDescriptorProto_extension(file_proto, &n); in count_types_in_file() 5236 const google_protobuf_FileDescriptorProto *file_proto) { in build_filedef() 5246 count_types_in_file(file_proto, &counts); in build_filedef() 5261 if (!google_protobuf_FileDescriptorProto_has_name(file_proto)) { in build_filedef() 5267 strviewdup(ctx, google_protobuf_FileDescriptorProto_name(file_proto)); in build_filedef() 5271 if (google_protobuf_FileDescriptorProto_has_package(file_proto)) { in build_filedef() 5273 google_protobuf_FileDescriptorProto_package(file_proto); in build_filedef() 5147 count_types_in_file( const google_protobuf_FileDescriptorProto *file_proto, decl_counts *counts) count_types_in_file() argument 5234 build_filedef( symtab_addctx *ctx, upb_filedef *file, const google_protobuf_FileDescriptorProto *file_proto) build_filedef() argument 5498 _upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, const upb_msglayout **layouts, upb_status *status) _upb_symtab_addfile() argument 5523 upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, upb_status *status) upb_symtab_addfile() argument [all...] |
/third_party/protobuf/src/google/protobuf/compiler/cpp/ |
H A D | cpp_file.cc | 832 FileDescriptorProto file_proto; in GenerateReflectionInitializationCode() local 833 file_->CopyTo(&file_proto); in GenerateReflectionInitializationCode() 835 file_proto.SerializeToString(&file_data); in GenerateReflectionInitializationCode()
|
/third_party/protobuf/src/google/protobuf/compiler/ |
H A D | parser_unittest.cc | 2197 void StripFieldTypeName(FileDescriptorProto* file_proto) { in StripFieldTypeName() argument 2198 for (int i = 0; i < file_proto->message_type_size(); ++i) { in StripFieldTypeName() 2199 StripFieldTypeName(file_proto->mutable_message_type(i)); in StripFieldTypeName()
|