HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //lib/python3.9/site-packages/google/protobuf/__pycache__/descriptor_database.cpython-39.opt-1.pyc
a

x��g��@sLdZdZddlZGdd�de�ZGdd�de�ZGdd	�d	e�Zd
d�ZdS)z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)�Nc@seZdZdS)�ErrorN)�__name__�
__module__�__qualname__�rr�G/usr/lib/python3.9/site-packages/google/protobuf/descriptor_database.pyr&src@seZdZdZdS)�,DescriptorDatabaseConflictingDefinitionErrorzGRaised when a proto is added with the same name & different descriptor.N)rrr�__doc__rrrrr*src@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�DescriptorDatabasezEA container accepting FileDescriptorProtos and maps DescriptorProtos.cCsi|_i|_dS�N)�_file_desc_protos_by_file�_file_desc_protos_by_symbol)�selfrrr�__init__1szDescriptorDatabase.__init__c
Cs�|j}||jvr||j|<n |j||kr8td|��ndS|j}|jD] }t||�D]}|�||�qVqH|jD]>}|�d�||jf�|�|j	D]}||j
d�||jf�<q�qp|jD]}|�d�||jf�|�q�|jD]}	|�d�||	jf�|�q�dS)aLAdds 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.
    z0%s already added, but with different descriptor.N�.)
�namerr�packageZmessage_type�_ExtractSymbols�
_AddSymbol�	enum_type�join�valuer
�	extension�service)
r�file_desc_protoZ
proto_namer�messager�enumZ
enum_valuerrrrr�Add5s.

�


��

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)rrrrr�FindFileByNameWsz!DescriptorDatabase.FindFileByNamecCs`z|j|WStyZ|�d�\}}}z|j|WYStyTt|��Yn0Yn0dS)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�FindFileContainingSymboljsz+DescriptorDatabase.FindFileContainingSymbolcCsdSrr)r�
extendee_nameZextension_numberrrr�FindFileContainingExtension�sz.DescriptorDatabase.FindFileContainingExtensioncCsgSrr)rr$rrr�FindAllExtensionNumbers�sz*DescriptorDatabase.FindAllExtensionNumberscCsJ||jvr<d|jd|d|j|jd}t�|t�||j|<dS)NzConflict register for file "z": z is already defined in file "�")r
r�warnings�warn�RuntimeWarning)rrrZwarn_msgrrrr�s
���
��zDescriptorDatabase._AddSymbolN)rrrr	rrrr#r%r&rrrrrr
.s"%r
ccsb|r|d|jn|j}|V|jD]}t||�D]
}|Vq2q$|jD]}d�||jf�VqFdS)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



r)	r	�
__author__r(�	Exceptionrr�objectr
rrrrr�<module>ss