Package google :: Package protobuf :: Module descriptor :: Class FileDescriptor
[hide private]
[frames] | no frames]

Class FileDescriptor

source code

    object --+    
             |    
DescriptorBase --+
                 |
                FileDescriptor

Descriptor for a file. Mimics the descriptor_pb2.FileDescriptorProto.

Note that enum_types_by_name, extensions_by_name, and dependencies
fields are only set by the message_factory module, and not by the
generated proto code.

name: name of file, relative to root of source tree.
package: name of the package
syntax: string indicating syntax of the file (can be "proto2" or "proto3")
serialized_pb: (str) Byte string of serialized
  descriptor_pb2.FileDescriptorProto.
dependencies: List of other FileDescriptors this FileDescriptor depends on.
public_dependencies: A list of FileDescriptors, subset of the dependencies
  above, which were declared as "public".
message_types_by_name: Dict of message names and their descriptors.
enum_types_by_name: Dict of enum names and their descriptors.
extensions_by_name: Dict of extension names and their descriptors.
services_by_name: Dict of services names and their descriptors.
pool: the DescriptorPool this descriptor belongs to.  When not passed to the
  constructor, the global default pool is used.

Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, name, package, options=None, serialized_options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None) source code
 
__init__(self, name, package, options=None, serialized_options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None)
Constructor.
source code
 
CopyToProto(self, proto)
Copies this to a descriptor_pb2.FileDescriptorProto.
source code

Inherited from DescriptorBase: GetOptions

Inherited from DescriptorBase (private): _SetOptions

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _C_DESCRIPTOR_CLASS = _message.FileDescriptor
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, name, package, options=None, serialized_options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__init__(self, name, package, options=None, serialized_options=None, serialized_pb=None, dependencies=None, public_dependencies=None, syntax=None, pool=None)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

CopyToProto(self, proto)

source code 
Copies this to a descriptor_pb2.FileDescriptorProto.

Args:
  proto: An empty descriptor_pb2.FileDescriptorProto.