HEX
Server: LiteSpeed
System: Linux server334.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: richfield (1256)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/google/protobuf/__pycache__/descriptor_database.cpython-36.opt-1.pyc
3

���h,�@sDdZdZGdd�de�ZGdd�de�ZGdd�de�Zdd	�Zd
S)z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)c@seZdZdS)�ErrorN)�__name__�
__module__�__qualname__�rr�)/usr/lib/python3.6/descriptor_database.pyr$src@seZdZdZdS)�,DescriptorDatabaseConflictingDefinitionErrorzGRaised when a proto is added with the same name & different descriptor.N)rrr�__doc__rrrrr(src@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�DescriptorDatabasezEA container accepting FileDescriptorProtos and maps DescriptorProtos.cCsi|_i|_dS)N)�_file_desc_protos_by_file�_file_desc_protos_by_symbol)�selfrrr�__init__/szDescriptorDatabase.__init__cs��j}||jkr�|j|<n|j|�kr6td|���j}x.�jD]$}|jj�fdd�t||�D��qDWx$�jD]}�|jdj	||jf�<qtWx$�j
D]}�|jdj	||jf�<q�Wx$�jD]}�|jdj	||jf�<q�WdS)aMAdds 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.
    z0%s already added, but with different descriptor.c3s|]}|�fVqdS)Nr)�.0�name)�file_desc_protorr�	<genexpr>Hsz)DescriptorDatabase.Add.<locals>.<genexpr>�.N)rr
r�packageZmessage_typer�update�_ExtractSymbols�	enum_type�join�	extension�service)rrZ
proto_namer�message�enumrrr)rr�Add3s 


zDescriptorDatabase.AddcCs
|j|S)a�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.
    )r
)rrrrr�FindFileByNameSsz!DescriptorDatabase.FindFileByNamecCs:y
|j|Stk
r4|jd�\}}}|j|SXdS)a�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.
    rN)r�KeyError�
rpartition)r�symbolZ	top_level�_rrr�FindFileContainingSymbolfs

z+DescriptorDatabase.FindFileContainingSymbolN)rrrrr
rrr"rrrrr	,s
 r	ccsn|r|d|jn|j}|Vx(|jD]}xt||�D]
}|Vq6Wq&Wx |jD]}dj||jf�VqPWdS)z�Pulls out all the symbols from a descriptor proto.

  Args:
    desc_proto: The proto to extract symbols from.
    package: The package containing the descriptor type.

  Yields:
    The fully qualified name found in the descriptor.
  rN)r�nested_typerrr)Z
desc_protorZmessage_namer#r rrrrr�s
rN)r�
__author__�	Exceptionrr�objectr	rrrrr�<module>s
\