class Xcodeproj::Project::ObjectList


@todo Cover all the mutations methods of the {Array} class.
usually are implemented in C
Moreover it is a moving target because the methods of array
the array methods should be covered, but this is not done yet.
which are overridden to inform objects reference count. Ideally all
@note Concerning the mutations methods it is safe to call only those
with reference count on modifications.
the project is not serialized with unreachable objects by updating the
It works in conjunction with the {AbstractObject} class to ensure that
This class represents an ordered relationship to many objects.

def +(objects)

Returns:
  • (void) -

Parameters:
  • object (Array) --
def +(objects)
  super
  perform_additions_operations(objects)
end

def <<(object)

Returns:
  • (void) -

Parameters:
  • object (AbstractObject, ObjectDictionary) --
def <<(object)
  super
  perform_additions_operations(object)
end

def clear

Returns:
  • (void) -
def clear
  objects.each do |object|
    perform_deletion_operations(object)
  end
  super
end

def delete(object)

Returns:
  • (void) -

Parameters:
  • object (AbstractObject, ObjectDictionary) --
def delete(object)
  super
  perform_deletion_operations(object)
end

def initialize(attribute, owner)


synthesized methods generated by {AbstractObject.has_many}.
{ObjectList}, it is always initialized empty and automatically by the
{Xcodeproj} clients are not expected to create instances of
def initialize(attribute, owner)
  @attribute = attribute
  @owner = owner
end

def objects

Returns:
  • (Array) -
def objects
  to_a
end

def perform_additions_operations(objects)

Returns:
  • (void) -
def perform_additions_operations(objects)
  objects = [objects] unless objects.is_a?(Array)
  objects.each do |obj|
    obj.add_referrer(owner)
    attribute.validate_value(obj) unless obj.is_a?(ObjectDictionary)
  end
end

def perform_deletion_operations(objects)

Returns:
  • (void) -
def perform_deletion_operations(objects)
  objects = [objects] unless objects.is_a?(Array)
  objects.each do |obj|
    obj.remove_referrer(owner) unless obj.is_a?(ObjectDictionary)
  end
end

def uuids

Returns:
  • (Array) -
def uuids
  map { |obj| obj.uuid }
end