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 Add (self, file_desc_proto)
 
def FindAllExtensionNumbers (self, extendee_name)
 
def FindFileByName (self, name)
 
def FindFileContainingExtension (self, extendee_name, extension_number)
 
def FindFileContainingSymbol (self, symbol)
 

Private Member Functions

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 descriptor_database.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 49 of file descriptor_database.py.

Member Function Documentation

◆ _AddSymbol()

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

Definition at line 151 of file descriptor_database.py.

◆ Add()

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 descriptor_database.py.

◆ FindAllExtensionNumbers()

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

Definition at line 147 of file descriptor_database.py.

◆ FindFileByName()

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 descriptor_database.py.

◆ FindFileContainingExtension()

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

Definition at line 143 of file descriptor_database.py.

◆ FindFileContainingSymbol()

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 descriptor_database.py.

Member Data Documentation

◆ _file_desc_protos_by_file

google.protobuf.descriptor_database.DescriptorDatabase._file_desc_protos_by_file
private

Definition at line 50 of file descriptor_database.py.

◆ _file_desc_protos_by_symbol

google.protobuf.descriptor_database.DescriptorDatabase._file_desc_protos_by_symbol
private

Definition at line 51 of file descriptor_database.py.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:09