Q,Qc@s/dZdZdefdYZdZdS(s*Provides a container for DescriptorProtos.s"matthewtoia@google.com (Matt Toia)tDescriptorDatabasecBs2eZdZdZdZdZdZRS(sEA container accepting FileDescriptorProtos and maps DescriptorProtos.cCsi|_i|_dS(N(t_file_desc_protos_by_filet_file_desc_protos_by_symbol(tself((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyt__init__'s cs|jj<j}x:jD]/}|jjfdt||Dq#Wx0jD]%}|jdj||jf6st.N( RRtpackaget message_typeRtupdatet_ExtractSymbolst enum_typetjoin(RRR tmessagetenum((RsG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytAdd+s  $cCs |j|S(sFinds 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(RR((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytFindFileByName;scCs |j|S(swFinds 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' 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(Rtsymbol((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytFindFileContainingSymbolNs(t__name__t __module__t__doc__RRRR(((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyR$s    ccsdj||jf}|Vx[|jD]P}xt||D] }|Vq=Wx(|jD]}dj||jfVqVWq'WdS(sPulls 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(RRt nested_typeR R (t desc_protoR t message_nameRRR ((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyR gs  N(Rt __author__tobjectRR (((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytsC