£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
3
h,                 @   sD   d Z dZG dd deZG dd deZG dd deZdd	 Zd
S )z*Provides a container for DescriptorProtos.z"matthewtoia@google.com (Matt Toia)c               @   s   e Zd ZdS )ErrorN)__name__
__module____qualname__ r   r   )/usr/lib/python3.6/descriptor_database.pyr   $   s   r   c               @   s   e Zd ZdZdS ),DescriptorDatabaseConflictingDefinitionErrorzGRaised when a proto is added with the same name & different descriptor.N)r   r   r   __doc__r   r   r   r   r   (   s   r   c               @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )DescriptorDatabasezEA container accepting FileDescriptorProtos and maps DescriptorProtos.c             C   s   i | _ i | _d S )N)_file_desc_protos_by_file_file_desc_protos_by_symbol)selfr   r   r   __init__/   s    zDescriptorDatabase.__init__c                s    j }|| jkr | j|< n| j|  kr6td|  j}x. jD ]$}| jj fddt||D  qDW x$ jD ]} | jdj	||j f< qtW x$ j
D ]} | jdj	||j f< qW x$ jD ]} | jdj	||j f< qW dS )aM  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.
    z0%s already added, but with different descriptor.c             3   s   | ]}| fV  qd S )Nr   ).0name)file_desc_protor   r   	<genexpr>H   s    z)DescriptorDatabase.Add.<locals>.<genexpr>.N)r   r
   r   packageZmessage_typer   update_ExtractSymbols	enum_typejoin	extensionservice)r   r   Z
proto_namer   messageenumr   r   r   )r   r   Add3   s     


zDescriptorDatabase.Addc             C   s
   | 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   r   r   r   FindFileByNameS   s    z!DescriptorDatabase.FindFileByNamec             C   s:   y
| j | S  tk
r4   |jd\}}}| j | S X dS )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   N)r   KeyError
rpartition)r   symbolZ	top_level_r   r   r   FindFileContainingSymbolf   s
    
z+DescriptorDatabase.FindFileContainingSymbolN)r   r   r   r   r   r   r   r"   r   r   r   r   r	   ,   s
    r	   c             c   sn   |r|d | j  n| j }|V  x(| jD ]}xt||D ]
}|V  q6W q&W x | jD ]}dj||j fV  qPW dS )zPulls 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   )Z
desc_protor   Zmessage_namer#   r    r   r   r   r   r      s    
r   N)r   
__author__	Exceptionr   r   objectr	   r   r   r   r   r   <module>   s
   \