Ë
    ímxiD  ã                   ó\   — d Z dZddlZ G d„ de«      Z G d„ de«      Z G d„ d	e«      Zd
„ Zy)z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)é    Nc                   ó   — e Zd Zy)ÚErrorN)Ú__name__Ú
__module__Ú__qualname__© ó    úZ/home/htdocs/ttos/venv/lib/python3.12/site-packages/google/protobuf/descriptor_database.pyr   r      s   „ Ør	   r   c                   ó   — e Zd ZdZy)Ú,DescriptorDatabaseConflictingDefinitionErrorzGRaised when a proto is added with the same name & different descriptor.N)r   r   r   Ú__doc__r   r	   r
   r   r      s   „ ÚOr	   r   c                   ó:   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
ÚDescriptorDatabasezEA container accepting FileDescriptorProtos and maps DescriptorProtos.c                 ó    — i | _         i | _        y ©N)Ú_file_desc_protos_by_fileÚ_file_desc_protos_by_symbol)Úselfs    r
   Ú__init__zDescriptorDatabase.__init__   s   € Ø%'€DÔ"Ø')€DÕ$r	   c                 ó  — |j                   }|| j                  vr|| j                  |<   n!| j                  |   |k7  rt        d|z  «      ‚y|j                  }|j                  D ]%  }t        ||«      D ]  }| j                  ||«       Œ Œ' |j                  D ]j  }| j                  dj                  ||j                   f«      |«       |j                  D ],  }|| j                  dj                  ||j                   f«      <   Œ. Œl |j                  D ]/  }| j                  dj                  ||j                   f«      |«       Œ1 |j                  D ]/  }	| j                  dj                  ||	j                   f«      |«       Œ1 y)aL  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.
    z0%s already added, but with different descriptor.Nú.)Únamer   r   ÚpackageÚmessage_typeÚ_ExtractSymbolsÚ
_AddSymbolÚ	enum_typeÚjoinÚvaluer   Ú	extensionÚservice)
r   Úfile_desc_protoÚ
proto_namer   Úmessager   ÚenumÚ
enum_valuer    r!   s
             r
   ÚAddzDescriptorDatabase.Add   sˆ  € ð !×%Ñ%€JØ˜×7Ñ7Ñ7Ø3B€d×$Ñ$ ZÒ0Ø	×	'Ñ	'¨
Ñ	3°Ò	FÜ8Ø
<¸zÑ
IóKð Kð ð ×%Ñ%€GØ"×/Ñ/ò /ˆÜ! '¨7Ó3ò /ˆ$Ø�‰˜˜oÕ.ñ/ð/ð  ×)Ñ)ò DˆØ
‡o�o�s—x‘x ¨$¯)©)Ð 4Ó5¸ÔHØŸ
™
ò Dˆ*à4Cð 	×(Ñ(Ø�H‰H�g˜zŸ™Ð/Ó0ò	2ñDðDð
 %×.Ñ.ò Nˆ	Ø
‡o�o�s—x‘x ¨)¯.©.Ð 9Ó:¸_ÕMðNà"×*Ñ*ò LˆØ
‡o�o�s—x‘x ¨'¯,©,Ð 7Ó8¸?ÕKñLr	   c                 ó    — | 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   r   s     r
   ÚFindFileByNamez!DescriptorDatabase.FindFileByName@   s   € ð" ×)Ñ)¨$Ñ/Ð/r	   c                 óº   — 	 | j                   |   S # t        $ r@ |j                  d«      \  }}}	 | j                   |   cY S # t        $ r t        |«      ‚w xY ww xY w)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.
    r   )r   ÚKeyErrorÚ
rpartition)r   ÚsymbolÚ	top_levelÚ_s       r
   ÚFindFileContainingSymbolz+DescriptorDatabase.FindFileContainingSymbolS   so   € ð,Ø×-Ñ-¨fÑ5Ð5øÜò ð ×)Ñ)¨#Ó.�o€i��AðØ×/Ñ/°	Ñ:Ò:øÜò ä�vÓÐðúðús   ‚ ‘A°A¾AÁAÁAc                  ó   — y r   r   )r   Úextendee_nameÚextension_numbers      r
   ÚFindFileContainingExtensionz.DescriptorDatabase.FindFileContainingExtensionx   s   € àr	   c                 ó   — g S r   r   )r   r2   s     r
   ÚFindAllExtensionNumbersz*DescriptorDatabase.FindAllExtensionNumbers|   s   € à€Ir	   c                 óÜ   — || j                   v rOd|j                  z   dz   |z   dz   | j                   |   j                  z   dz   }t        j                  |t        «       || j                   |<   y )NzConflict register for file "z": z is already defined in file "ú")r   r   ÚwarningsÚwarnÚRuntimeWarning)r   r   r"   Úwarn_msgs       r
   r   zDescriptorDatabase._AddSymbol€   s€   € Øˆt×/Ñ/Ñ/Ø0°?×3GÑ3GÑGØñØñà1ñ2ð ×2Ñ2°4Ñ8×=Ñ=ñ>ð ADñD€hô ‡m�m�HœnÔ-Ø-<€D×$Ñ$ TÒ*r	   N)r   r   r   r   r   r'   r)   r0   r4   r6   r   r   r	   r
   r   r      s+   „ ÙMò*ò LòD0ò&#òJòó=r	   r   c              #   ó   K  — |r|dz   | j                   z   n| j                   }|–— | j                  D ]  }t        ||«      D ]  }|–— Œ Œ | j                  D ]!  }dj	                  ||j                   f«      –— Œ# y­w)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.
  r   N)r   Únested_typer   r   r   )Ú
desc_protor   Úmessage_namer>   r-   r   s         r
   r   r   Š   s‡   è ø€ ñ 5<�˜3‘ §¡Ò0ÀÇÁ€,ØÒØ×+Ñ+ò €kÜ! +¨|Ó<ò ˆØƒlñðð ×'Ñ'ò 3€iØ
�(‰(�L )§.¡.Ð1Ó
2Ó2ñ3ùs   ‚A<A>)	r   Ú
__author__r9   Ú	Exceptionr   r   Úobjectr   r   r   r	   r
   ú<module>rD      s@   ðñ 1à1€
ã ôˆIô ôP°5ô Pôp=˜ô p=óf3r	   