class_docstr: A container accepting FileDescriptorProtos and maps DescriptorProtos.
docstr: 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.
docstr_tok: ["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","."]
code: 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
          )
  
file_path: catboost/contrib/python/protobuf/py2/google/protobuf/descriptor_database.py
imports: import warnings
label_desc: Use image node_id 2 for calling the DescriptorDatabase obj's underlying member method code with example usage: obj.Add(file_desc_proto) without return types