ó Du—ac@s[dZdZdefd„ƒYZdefd„ƒYZdefd„ƒYZd„Zd S( s*Provides a container for DescriptorProtos.s"matthewtoia@google.com (Matt Toia)tErrorcBseZRS((t__name__t __module__(((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyR$st,DescriptorDatabaseConflictingDefinitionErrorcBseZdZRS(sGRaised when a proto is added with the same name & different descriptor.(RRt__doc__(((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyR(stDescriptorDatabasecBs2eZdZd„Zd„Zd„Zd„ZRS(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 cs1ˆj}||jkr(ˆ|j|Hst.N( R RRtpackaget message_typeRtupdatet_ExtractSymbolst enum_typetjoint extensiontservice(RR t proto_nameRtmessagetenumRR((R sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytAdd3s   $##cCs |j|S(s¸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(RR ((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytFindFileByNameSscCsGy|j|SWn1tk rB|jdƒ\}}}|j|SXdS(s¢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(RtKeyErrort rpartition(Rtsymbolt top_levelt_((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pytFindFileContainingSymbolfs  (RRRR RRR (((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyR,s   ccs‡|r|d|jn|j}|Vx0|jD]%}xt||ƒD] }|VqEWq/Wx(|jD]}dj||jfƒVqbWdS(së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 t nested_typeRRR(t desc_protoRt message_nameR!RR((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyRˆs  N(Rt __author__t ExceptionRRtobjectRR(((sG/usr/lib/python2.7/site-packages/google/protobuf/descriptor_database.pyts \