Home
last modified time | relevance | path

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

/external/protobuf/python/google/protobuf/
Ddescriptor_pool.py198 file_proto = self._internal_db.FindFileByName(file_name)
201 file_proto = self._descriptor_db.FindFileByName(file_name)
204 if not file_proto:
206 return self._ConvertFileProtoToFileDescriptor(file_proto)
233 file_proto = self._internal_db.FindFileContainingSymbol(symbol)
236 file_proto = self._descriptor_db.FindFileContainingSymbol(symbol)
239 if not file_proto:
241 return self._ConvertFileProtoToFileDescriptor(file_proto)
306 def _ConvertFileProtoToFileDescriptor(self, file_proto): argument
319 if file_proto.name not in self._file_descriptors:
[all …]
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
Dmessage_factory.py145 for file_proto in file_protos:
146 _FACTORY.pool.Add(file_proto)
147 return _FACTORY.GetMessages([file_proto.name for file_proto in file_protos])
/external/protobuf/src/google/protobuf/
Ddescriptor_unittest.cc1866 FileDescriptorProto file_proto; in TEST_F() local
1868 FileDescriptorProto::descriptor()->file()->CopyTo(&file_proto); in TEST_F()
1869 ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); in TEST_F()
1875 file_proto.Clear(); in TEST_F()
1876 file_proto.set_name("foo.proto"); in TEST_F()
1877 file_proto.add_dependency("google/protobuf/descriptor.proto"); in TEST_F()
1878 AddExtension(&file_proto, "google.protobuf.FieldOptions", "option1", 1000, in TEST_F()
1881 ASSERT_TRUE(pool.BuildFile(file_proto) != NULL); in TEST_F()
1887 file_proto.Clear(); in TEST_F()
1888 file_proto.set_name("bar.proto"); in TEST_F()
[all …]
Ddescriptor_database_unittest.cc61 FileDescriptorProto file_proto; in AddToDatabase() local
62 EXPECT_TRUE(TextFormat::ParseFromString(file_text, &file_proto)); in AddToDatabase()
63 database->Add(file_proto); in AddToDatabase()
173 FileDescriptorProto file_proto; in AddToDatabase() local
174 EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); in AddToDatabase()
175 EXPECT_TRUE(test_case_->AddToDatabase(file_proto)); in AddToDatabase()
179 FileDescriptorProto file_proto; in AddToDatabaseWithError() local
180 EXPECT_TRUE(TextFormat::ParseFromString(file_descriptor_text, &file_proto)); in AddToDatabaseWithError()
181 EXPECT_FALSE(test_case_->AddToDatabase(file_proto)); in AddToDatabaseWithError()
Ddescriptor_database.cc360 FileDescriptorProto file_proto; in FindNameOfFileContainingSymbol() local
361 if (!file_proto.ParseFromArray(encoded_file.first, encoded_file.second)) { in FindNameOfFileContainingSymbol()
364 *output = file_proto.name(); in FindNameOfFileContainingSymbol()
Ddescriptor.cc1579 FileDescriptorProto file_proto; in TryFindFileInFallbackDatabase() local
1580 if (!fallback_database_->FindFileByName(name, &file_proto) || in TryFindFileInFallbackDatabase()
1581 BuildFileFromDatabase(file_proto) == NULL) { in TryFindFileInFallbackDatabase()
1615 FileDescriptorProto file_proto; in TryFindSymbolInFallbackDatabase() local
1635 || !fallback_database_->FindFileContainingSymbol(name, &file_proto) in TryFindSymbolInFallbackDatabase()
1640 || tables_->FindFile(file_proto.name()) != NULL in TryFindSymbolInFallbackDatabase()
1643 || BuildFileFromDatabase(file_proto) == NULL) { in TryFindSymbolInFallbackDatabase()
1655 FileDescriptorProto file_proto; in TryFindExtensionInFallbackDatabase() local
1657 containing_type->full_name(), field_number, &file_proto)) { in TryFindExtensionInFallbackDatabase()
1661 if (tables_->FindFile(file_proto.name()) != NULL) { in TryFindExtensionInFallbackDatabase()
[all …]
/external/protobuf/src/google/protobuf/compiler/java/
Djava_file.cc122 void CollectExtensions(const FileDescriptorProto& file_proto, in CollectExtensions() argument
126 if (!CollectExtensions(file_proto, extensions)) { in CollectExtensions()
131 file_proto.GetDescriptor()->full_name()); in CollectExtensions()
134 << file_proto.name() in CollectExtensions()
150 << file_proto.name() in CollectExtensions()
413 FileDescriptorProto file_proto; in GenerateDescriptorInitializationCodeForImmutable() local
414 file_->CopyTo(&file_proto); in GenerateDescriptorInitializationCodeForImmutable()
416 file_proto.SerializeToString(&file_data); in GenerateDescriptorInitializationCodeForImmutable()
418 CollectExtensions(file_proto, *file_->pool(), &extensions, file_data); in GenerateDescriptorInitializationCodeForImmutable()
484 FileDescriptorProto file_proto; in GenerateDescriptorInitializationCodeForMutable() local
[all …]
Djava_shared_code_generator.cc118 FileDescriptorProto file_proto; in GenerateDescriptors() local
119 file_->CopyTo(&file_proto); in GenerateDescriptors()
123 file_proto.SerializeToString(&file_data); in GenerateDescriptors()
/external/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.cc426 FileDescriptorProto file_proto; in AddSerializedFile() local
427 if (!file_proto.ParseFromArray(message_type, message_len)) { in AddSerializedFile()
436 generated_file = self->underlay->FindFileByName(file_proto.name()); in AddSerializedFile()
445 self->pool->BuildFileCollectingErrors(file_proto, in AddSerializedFile()
Ddescriptor.cc1253 FileDescriptorProto file_proto; in GetSerializedPb() local
1254 _GetDescriptor(self)->CopyTo(&file_proto); in GetSerializedPb()
1256 file_proto.SerializePartialToString(&contents); in GetSerializedPb()
/external/tensorflow/tensorflow/contrib/proto/python/kernel_tests/
Ddescriptor_source_test_base.py57 file_proto = set_proto.file.add(
61 enum_proto = file_proto.enum_type.add(name='DataType')
65 file_proto = set_proto.file.add(
69 message_proto = file_proto.message_type.add(name='TestCase')
93 message_proto = file_proto.message_type.add(
106 message_proto = file_proto.message_type.add(
/external/protobuf/src/google/protobuf/compiler/javamicro/
Djavamicro_file.cc97 FileDescriptorProto file_proto; in Validate() local
98 file_->CopyTo(&file_proto); in Validate()
99 if (UsesExtensions(file_proto)) { in Validate()
/external/grpc-grpc/test/cpp/util/
Dproto_reflection_descriptor_database.cc301 const protobuf::FileDescriptorProto file_proto = in AddFileFromResponse() local
303 if (known_files_.find(file_proto.name()) == known_files_.end()) { in AddFileFromResponse()
304 known_files_.insert(file_proto.name()); in AddFileFromResponse()
305 cached_db_.Add(file_proto); in AddFileFromResponse()
/external/protobuf/src/google/protobuf/compiler/javanano/
Djavanano_file.cc98 FileDescriptorProto file_proto; in Validate() local
99 file_->CopyTo(&file_proto); in Validate()
100 if (UsesExtensions(file_proto) && !params_.store_unknown_fields()) { in Validate()
/external/protobuf/python/google/protobuf/internal/
Ddescriptor_test.py64 file_proto = descriptor_pb2.FileDescriptorProto(
67 message_proto = file_proto.message_type.add(
81 self.pool.Add(file_proto)
82 self.my_file = self.pool.FindFileByName(file_proto.name)
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_file.cc601 FileDescriptorProto file_proto; in GenerateBuildDescriptors() local
602 file_->CopyTo(&file_proto); in GenerateBuildDescriptors()
604 file_proto.SerializeToString(&file_data); in GenerateBuildDescriptors()
/external/protobuf/src/google/protobuf/compiler/
Dcommand_line_interface.cc1699 FileDescriptorProto* file_proto = file_set.add_file(); in WriteDescriptorSet() local
1700 parsed_files[i]->CopyTo(file_proto); in WriteDescriptorSet()
1701 parsed_files[i]->CopyJsonNameTo(file_proto); in WriteDescriptorSet()
1703 parsed_files[i]->CopySourceCodeInfoTo(file_proto); in WriteDescriptorSet()
Dparser_unittest.cc1750 void StripFieldTypeName(FileDescriptorProto* file_proto) { in StripFieldTypeName() argument
1751 for (int i = 0; i < file_proto->message_type_size(); ++i) { in StripFieldTypeName()
1752 StripFieldTypeName(file_proto->mutable_message_type(i)); in StripFieldTypeName()