webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __new__ (cls, descriptor_db=None) |
def | __init__ (self, descriptor_db=None) |
def | Add (self, file_desc_proto) |
def | AddSerializedFile (self, serialized_file_desc_proto) |
def | AddDescriptor (self, desc) |
def | AddEnumDescriptor (self, enum_desc) |
def | AddFileDescriptor (self, file_desc) |
def | FindFileByName (self, file_name) |
def | FindFileContainingSymbol (self, symbol) |
def | FindMessageTypeByName (self, full_name) |
def | FindEnumTypeByName (self, full_name) |
def | FindFieldByName (self, full_name) |
def | FindExtensionByName (self, full_name) |
A collection of protobufs dynamically constructed by descriptor protos.
def google.protobuf.descriptor_pool.DescriptorPool.__init__ | ( | self, | |
descriptor_db = None |
|||
) |
Initializes a Pool of proto buffs. The descriptor_db argument to the constructor is provided to allow specialized file descriptor proto lookup code to be triggered on demand. An example would be an implementation which will read and compile a file specified in a call to FindFileByName() and not require the call to Add() at all. Results from this database will be cached internally here as well. Args: descriptor_db: A secondary source of file descriptors.
def google.protobuf.descriptor_pool.DescriptorPool.__new__ | ( | cls, | |
descriptor_db = None |
|||
) |
def google.protobuf.descriptor_pool.DescriptorPool.Add | ( | self, | |
file_desc_proto | |||
) |
Adds the FileDescriptorProto and its types to this pool. Args: file_desc_proto: The FileDescriptorProto to add.
def google.protobuf.descriptor_pool.DescriptorPool.AddDescriptor | ( | self, | |
desc | |||
) |
Adds a Descriptor to the pool, non-recursively. If the Descriptor contains nested messages or enums, the caller must explicitly register them. This method also registers the FileDescriptor associated with the message. Args: desc: A Descriptor.
def google.protobuf.descriptor_pool.DescriptorPool.AddEnumDescriptor | ( | self, | |
enum_desc | |||
) |
Adds an EnumDescriptor to the pool. This method also registers the FileDescriptor associated with the message. Args: enum_desc: An EnumDescriptor.
def google.protobuf.descriptor_pool.DescriptorPool.AddFileDescriptor | ( | self, | |
file_desc | |||
) |
Adds a FileDescriptor to the pool, non-recursively. If the FileDescriptor contains messages or enums, the caller must explicitly register them. Args: file_desc: A FileDescriptor.
def google.protobuf.descriptor_pool.DescriptorPool.AddSerializedFile | ( | self, | |
serialized_file_desc_proto | |||
) |
Adds the FileDescriptorProto and its types to this pool. Args: serialized_file_desc_proto: A bytes string, serialization of the FileDescriptorProto to add.
def google.protobuf.descriptor_pool.DescriptorPool.FindEnumTypeByName | ( | self, | |
full_name | |||
) |
Loads the named enum descriptor from the pool. Args: full_name: The full name of the enum descriptor to load. Returns: The enum descriptor for the named type.
def google.protobuf.descriptor_pool.DescriptorPool.FindExtensionByName | ( | self, | |
full_name | |||
) |
Loads the named extension descriptor from the pool. Args: full_name: The full name of the extension descriptor to load. Returns: A FieldDescriptor, describing the named extension.
def google.protobuf.descriptor_pool.DescriptorPool.FindFieldByName | ( | self, | |
full_name | |||
) |
Loads the named field descriptor from the pool. Args: full_name: The full name of the field descriptor to load. Returns: The field descriptor for the named field.
def google.protobuf.descriptor_pool.DescriptorPool.FindFileByName | ( | self, | |
file_name | |||
) |
Gets a FileDescriptor by file name. Args: file_name: The path to the file to get a descriptor for. Returns: A FileDescriptor for the named file. Raises: KeyError: if the file can not be found in the pool.
def google.protobuf.descriptor_pool.DescriptorPool.FindFileContainingSymbol | ( | self, | |
symbol | |||
) |
Gets the FileDescriptor for the file containing the specified symbol. Args: symbol: The name of the symbol to search for. Returns: A FileDescriptor that contains the specified symbol. Raises: KeyError: if the file can not be found in the pool.
def google.protobuf.descriptor_pool.DescriptorPool.FindMessageTypeByName | ( | self, | |
full_name | |||
) |
Loads the named descriptor from the pool. Args: full_name: The full name of the descriptor to load. Returns: The descriptor for the named type.