parameters: (self, file_desc_proto)
docstring: Adds the FileDescriptorProto and its types to this database.
  
      Args:
        file_desc_proto: The FileDescriptorProto to add.
      Raises:
        DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
          add a proto with the same name but different definition than an
          existing proto in the database.
docstring_summary: Adds the FileDescriptorProto and its types to this database.
docstring_tokens: Adds the FileDescriptorProto and its types to this database .
function: def Add(self, file_desc_proto):
      """Adds the FileDescriptorProto and its types to this database.
  
      Args:
        file_desc_proto: The FileDescriptorProto to add.
      Raises:
        DescriptorDatabaseConflictingDefinitionError: if an attempt is made to
          add a proto with the same name but different definition than an
          existing proto in the database.
      """
      proto_name = file_desc_proto.name
      if proto_name not in self._file_desc_protos_by_file:
        self._file_desc_protos_by_file[proto_name] = file_desc_proto
      elif self._file_desc_protos_by_file[proto_name] != file_desc_proto:
        raise DescriptorDatabaseConflictingDefinitionError(
            '%s already added, but with different descriptor.' % proto_name)
      else:
        return
  
      # Add all the top-level descriptors to the index.
      package = file_desc_proto.package
      for message in file_desc_proto.message_type:
        for name in _ExtractSymbols(message, package):
          self._AddSymbol(name, file_desc_proto)
      for enum in file_desc_proto.enum_type:
        self._AddSymbol(('.'.join((package, enum.name))), file_desc_proto)
        for enum_value in enum.value:
          self._file_desc_protos_by_symbol[
              '.'.join((package, enum_value.name))] = file_desc_proto
      for extension in file_desc_proto.extension:
        self._AddSymbol(('.'.join((package, extension.name))), file_desc_proto)
      for service in file_desc_proto.service:
        self._AddSymbol(('.'.join((package, service.name))), file_desc_proto)
function_tokens: def Add ( self , file_desc_proto ) : proto_name = file_desc_proto . name if proto_name not in self . _file_desc_protos_by_file : self . _file_desc_protos_by_file [ proto_name ] = file_desc_proto elif self . _file_desc_protos_by_file [ proto_name ] != file_desc_proto : raise DescriptorDatabaseConflictingDefinitionError ( '%s already added, but with different descriptor.' % proto_name ) else : return # Add all the top-level descriptors to the index. package = file_desc_proto . package for message in file_desc_proto . message_type : for name in _ExtractSymbols ( message , package ) : self . _AddSymbol ( name , file_desc_proto ) for enum in file_desc_proto . enum_type : self . _AddSymbol ( ( '.' . join ( ( package , enum . name ) ) ) , file_desc_proto ) for enum_value in enum . value : self . _file_desc_protos_by_symbol [ '.' . join ( ( package , enum_value . name ) ) ] = file_desc_proto for extension in file_desc_proto . extension : self . _AddSymbol ( ( '.' . join ( ( package , extension . name ) ) ) , file_desc_proto ) for service in file_desc_proto . service : self . _AddSymbol ( ( '.' . join ( ( package , service . name ) ) ) , file_desc_proto )