Home | Trees | Indices | Help |
---|
|
object --+ | message_factory.MessageFactory --+ | SymbolDatabase
A database of Python generated symbols.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Registers the given message type in the local database. Calls to GetSymbol() and GetMessages() will return messages registered here. Args: message: a message.Message, to be registered. Returns: The provided message. |
Registers the given message descriptor in the local database. Args: message_descriptor: a descriptor.MessageDescriptor. |
Registers the given enum descriptor in the local database. Args: enum_descriptor: a descriptor.EnumDescriptor. Returns: The provided descriptor. |
Registers the given service descriptor in the local database. Args: service_descriptor: a descriptor.ServiceDescriptor. Returns: The provided descriptor. |
Registers the given file descriptor in the local database. Args: file_descriptor: a descriptor.FileDescriptor. Returns: The provided descriptor. |
Tries to find a symbol in the local database. Currently, this method only returns message.Message instances, however, if may be extended in future to support other symbol types. Args: symbol: A str, a protocol buffer symbol. Returns: A Python class corresponding to the symbol. Raises: KeyError: if the symbol could not be found. |
Gets all registered messages from a specified file. Only messages already created and registered will be returned; (this is the case for imported _pb2 modules) But unlike MessageFactory, this version also returns already defined nested messages, but does not register any message extensions. Args: files: The file names to extract messages from. Returns: A dictionary mapping proto names to the message classes. Raises: KeyError: if a file could not be found.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Sep 6 13:21:35 2019 | http://epydoc.sourceforge.net |