Public Member Functions | Private Member Functions | Private Attributes | List of all members
google.protobuf.descriptor_database.DescriptorDatabase Class Reference
Inheritance diagram for google.protobuf.descriptor_database.DescriptorDatabase:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self)
 
def __init__ (self)
 
def Add (self, file_desc_proto)
 
def Add (self, file_desc_proto)
 
def FindAllExtensionNumbers (self, extendee_name)
 
def FindAllExtensionNumbers (self, extendee_name)
 
def FindFileByName (self, name)
 
def FindFileByName (self, name)
 
def FindFileContainingExtension (self, extendee_name, extension_number)
 
def FindFileContainingExtension (self, extendee_name, extension_number)
 
def FindFileContainingSymbol (self, symbol)
 
def FindFileContainingSymbol (self, symbol)
 

Private Member Functions

def _AddSymbol (self, name, file_desc_proto)
 
def _AddSymbol (self, name, file_desc_proto)
 

Private Attributes

 _file_desc_protos_by_file
 
 _file_desc_protos_by_symbol
 

Detailed Description

A container accepting FileDescriptorProtos and maps DescriptorProtos.

Definition at line 46 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor_database.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.__init__ (   self)

◆ __init__() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.__init__ (   self)

Member Function Documentation

◆ _AddSymbol() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase._AddSymbol (   self,
  name,
  file_desc_proto 
)
private

◆ _AddSymbol() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase._AddSymbol (   self,
  name,
  file_desc_proto 
)
private

◆ Add() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.Add (   self,
  file_desc_proto 
)
Adds the FileDescriptorProto and its types to this database.

Args:
  file_desc_proto: The FileDescriptorProto to add.
Raises:
  DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
add a proto with the same name but different definition than an
exisiting proto in the database.

Definition at line 53 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor_database.py.

◆ Add() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.Add (   self,
  file_desc_proto 
)
Adds the FileDescriptorProto and its types to this database.

Args:
  file_desc_proto: The FileDescriptorProto to add.
Raises:
  DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
add a proto with the same name but different definition than an
existing proto in the database.

Definition at line 53 of file protobuf/python/google/protobuf/descriptor_database.py.

◆ FindAllExtensionNumbers() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindAllExtensionNumbers (   self,
  extendee_name 
)

◆ FindAllExtensionNumbers() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindAllExtensionNumbers (   self,
  extendee_name 
)

◆ FindFileByName() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileByName (   self,
  name 
)
Finds the file descriptor proto by file name.

Typically the file name is a relative path ending to a .proto file. The
proto with the given name will have to have been added to this database
using the Add method or else an error will be raised.

Args:
  name: The file name to find.

Returns:
  The file descriptor proto matching the name.

Raises:
  KeyError if no file by the given name was added.

Definition at line 87 of file protobuf/python/google/protobuf/descriptor_database.py.

◆ FindFileByName() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileByName (   self,
  name 
)
Finds the file descriptor proto by file name.

Typically the file name is a relative path ending to a .proto file. The
proto with the given name will have to have been added to this database
using the Add method or else an error will be raised.

Args:
  name: The file name to find.

Returns:
  The file descriptor proto matching the name.

Raises:
  KeyError if no file by the given name was added.

Definition at line 87 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor_database.py.

◆ FindFileContainingExtension() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileContainingExtension (   self,
  extendee_name,
  extension_number 
)

◆ FindFileContainingExtension() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileContainingExtension (   self,
  extendee_name,
  extension_number 
)

◆ FindFileContainingSymbol() [1/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileContainingSymbol (   self,
  symbol 
)
Finds the file descriptor proto containing the specified symbol.

The symbol should be a fully qualified name including the file descriptor's
package and any containing messages. Some examples:

'some.package.name.Message'
'some.package.name.Message.NestedEnum'
'some.package.name.Message.some_field'

The file descriptor proto containing the specified symbol must be added to
this database using the Add method or else an error will be raised.

Args:
  symbol: The fully qualified symbol name.

Returns:
  The file descriptor proto containing the symbol.

Raises:
  KeyError if no file contains the specified symbol.

Definition at line 106 of file bloaty/third_party/protobuf/python/google/protobuf/descriptor_database.py.

◆ FindFileContainingSymbol() [2/2]

def google.protobuf.descriptor_database.DescriptorDatabase.FindFileContainingSymbol (   self,
  symbol 
)
Finds the file descriptor proto containing the specified symbol.

The symbol should be a fully qualified name including the file descriptor's
package and any containing messages. Some examples:

'some.package.name.Message'
'some.package.name.Message.NestedEnum'
'some.package.name.Message.some_field'

The file descriptor proto containing the specified symbol must be added to
this database using the Add method or else an error will be raised.

Args:
  symbol: The fully qualified symbol name.

Returns:
  The file descriptor proto containing the symbol.

Raises:
  KeyError if no file contains the specified symbol.

Definition at line 106 of file protobuf/python/google/protobuf/descriptor_database.py.

Member Data Documentation

◆ _file_desc_protos_by_file

google.protobuf.descriptor_database.DescriptorDatabase._file_desc_protos_by_file
private

◆ _file_desc_protos_by_symbol

google.protobuf.descriptor_database.DescriptorDatabase._file_desc_protos_by_symbol
private

The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:24