Factory for creating Proto2 messages from descriptors in a pool.
Definition at line 56 of file message_factory.py.
◆ __init__()
def google.protobuf.message_factory.MessageFactory.__init__ |
( |
|
self, |
|
|
|
pool = None |
|
) |
| |
◆ GetMessages()
def google.protobuf.message_factory.MessageFactory.GetMessages |
( |
|
self, |
|
|
|
files |
|
) |
| |
Gets all the messages from a specified file.
This will find and resolve dependencies, failing if the descriptor
pool cannot satisfy them.
Args:
files: The file names to extract messages from.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dependent messages as well as any messages defined in the same file as
a specified message.
Reimplemented in google.protobuf.symbol_database.SymbolDatabase.
Definition at line 98 of file message_factory.py.
◆ GetPrototype()
def google.protobuf.message_factory.MessageFactory.GetPrototype |
( |
|
self, |
|
|
|
descriptor |
|
) |
| |
Builds a proto2 message class based on the passed in descriptor.
Passing a descriptor with a fully qualified name matching a previous
invocation will cause the same class to be returned.
Args:
descriptor: The descriptor to build from.
Returns:
A class describing the passed in descriptor.
Definition at line 66 of file message_factory.py.
◆ _classes
google.protobuf.message_factory.MessageFactory._classes |
|
private |
◆ pool
google.protobuf.message_factory.MessageFactory.pool |
The documentation for this class was generated from the following file: