Home
last modified time | relevance | path

Searched refs:file_proto (Results 1 – 25 of 32) sorted by relevance

12

/third_party/protobuf/python/google/protobuf/
Ddescriptor_pool.py410 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 = self._descriptor_db.FindFileContainingSymbol(symbol)
[all …]
Dmessage_factory.py153 file_by_name = {file_proto.name: file_proto for file_proto in file_protos}
154 def _AddFile(file_proto): argument
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])
Dproto_builder.py119 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/
Ddescriptor_unittest.cc2035 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.set_name("bar.proto"); in TEST_F()
[all …]
Ddescriptor_database_unittest.cc58 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()
Ddescriptor_database.cc63 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() argument
98 set->insert(file_proto.package()); in FindAllPackageNames()
106 [](const FileDescriptorProto& file_proto, std::set<std::string>* set) { in FindAllMessageNames() argument
[all …]
/third_party/protobuf/php/src/Google/Protobuf/Internal/
DGPBUtil.php267 $file_proto) argument
269 $option = $file_proto->getOptions();
294 if ($file_proto->getPackage() === "google.protobuf") {
306 $file_proto) argument
309 return static::getClassNamePrefix($classname, $file_proto) . $classname;
314 $file_proto) argument
318 $parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
326 $file_proto, argument
339 $package = $file_proto->getPackage();
347 static::getClassNameWithoutPackage($message_name_without_package, $file_proto);
[all …]
DDescriptor.php175 public static function buildFromProto($proto, $file_proto, $containing) argument
186 $file_proto,
203 $nested_proto, $file_proto, $message_name_without_package));
209 $enum_proto, $file_proto, $message_name_without_package));
DEnumDescriptor.php89 public static function buildFromProto($proto, $file_proto, $containing) argument
100 $file_proto,
DDescriptorPool.php63 foreach($files->getFile() as $file_proto) {
64 $file = FileDescriptor::buildFromProto($file_proto);
/third_party/protobuf/python/google/protobuf/pyext/
Ddescriptor_database.cc76 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()
Ddescriptor_pool.cc589 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()
/third_party/protobuf/src/google/protobuf/compiler/java/
Djava_file.cc124 void CollectExtensions(const FileDescriptorProto& file_proto, in CollectExtensions() argument
128 if (!CollectExtensions(file_proto, extensions)) { in CollectExtensions()
133 file_proto.GetDescriptor()->full_name()); in CollectExtensions()
136 << file_proto.name() in CollectExtensions()
152 << file_proto.name() in CollectExtensions()
445 FileDescriptorProto file_proto; in GenerateDescriptorInitializationCodeForImmutable() local
446 file_->CopyTo(&file_proto); in GenerateDescriptorInitializationCodeForImmutable()
448 file_proto.SerializeToString(&file_data); in GenerateDescriptorInitializationCodeForImmutable()
450 CollectExtensions(file_proto, *file_->pool(), &extensions, file_data); in GenerateDescriptorInitializationCodeForImmutable()
514 FileDescriptorProto file_proto; in GenerateDescriptorInitializationCodeForMutable() local
[all …]
Djava_shared_code_generator.cc129 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/
Ddefs.c143 const upb_symtab* symtab, google_protobuf_FileDescriptorProto* file_proto) { in rewrite_enum_defaults() argument
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() argument
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()
332 file_proto, RARRAY_LEN(msg_ents), arena); in rewrite_names()
[all …]
/third_party/grpc/third_party/upb/upb/bindings/lua/
Dupbc.cc90 protobuf::FileDescriptorProto file_proto; in Generate() local
91 file->CopyTo(&file_proto); in Generate()
93 file_proto.SerializeToString(&file_data); in Generate()
/third_party/grpc/third_party/upb/upbc/
Dprotoc-gen-upbdefs.cc106 protobuf::FileDescriptorProto file_proto; in WriteDefSource() local
107 file->CopyTo(&file_proto); in WriteDefSource()
109 file_proto.SerializeToString(&file_data); in WriteDefSource()
Dgenerator.cc885 protobuf::FileDescriptorProto file_proto; in WriteDefSource() local
886 file->CopyTo(&file_proto); in WriteDefSource()
888 file_proto.SerializeToString(&file_data); in WriteDefSource()
/third_party/grpc/test/cpp/util/
Dproto_reflection_descriptor_database.cc304 const protobuf::FileDescriptorProto file_proto = in AddFileFromResponse() local
306 if (known_files_.find(file_proto.name()) == known_files_.end()) { in AddFileFromResponse()
307 known_files_.insert(file_proto.name()); in AddFileFromResponse()
308 cached_db_.Add(file_proto); in AddFileFromResponse()
/third_party/grpc/third_party/upb/upb/
Ddef.c1869 const google_protobuf_FileDescriptorProto *file_proto, in count_types_in_file() argument
1874 msgs = google_protobuf_FileDescriptorProto_message_type(file_proto, &n); in count_types_in_file()
1879 google_protobuf_FileDescriptorProto_enum_type(file_proto, &n); in count_types_in_file()
1882 google_protobuf_FileDescriptorProto_extension(file_proto, &n); in count_types_in_file()
1938 const google_protobuf_FileDescriptorProto *file_proto) { in build_filedef() argument
1946 count_types_in_file(file_proto, file); in build_filedef()
1957 if (!google_protobuf_FileDescriptorProto_has_name(file_proto)) { in build_filedef()
1962 strviewdup(ctx, google_protobuf_FileDescriptorProto_name(file_proto)); in build_filedef()
1966 if (google_protobuf_FileDescriptorProto_has_package(file_proto)) { in build_filedef()
1968 google_protobuf_FileDescriptorProto_package(file_proto); in build_filedef()
[all …]
Ddef.hpp407 FileDefPtr AddFile(const google_protobuf_FileDescriptorProto* file_proto, in AddFile() argument
410 upb_symtab_addfile(ptr_.get(), file_proto, status->ptr())); in AddFile()
/third_party/protobuf/python/google/protobuf/internal/
Ddescriptor_test.py68 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 = descriptor_pb2.FileDescriptorProto()
[all …]
Ddescriptor_pool_test.py627 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.service.add(name='TopService')
[all …]
/third_party/protobuf/src/google/protobuf/compiler/php/
Dphp_generator.cc977 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->mutable_message_type(); in GenerateAddFilesToPool()
/third_party/protobuf/php/ext/google/protobuf/
Dphp-upb.c5148 const google_protobuf_FileDescriptorProto *file_proto, in count_types_in_file() argument
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() argument
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()
[all …]

12