webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Public Attributes | List of all members
google.protobuf.message_factory.MessageFactory Class Reference
Inheritance diagram for google.protobuf.message_factory.MessageFactory:

Public Member Functions

def __init__ (self, pool=None)
 
def GetPrototype (self, descriptor)
 
def GetMessages (self, files)
 

Public Attributes

 pool
 

Detailed Description

Factory for creating Proto2 messages from descriptors in a pool.

Constructor & Destructor Documentation

◆ __init__()

def google.protobuf.message_factory.MessageFactory.__init__ (   self,
  pool = None 
)
Initializes a new factory.

Member Function Documentation

◆ 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.

◆ 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.

Member Data Documentation

◆ pool

google.protobuf.message_factory.MessageFactory.pool

The documentation for this class was generated from the following file: