add children by assigning self as parent
 @overload add_children(*children,options={})
   @param [Object] children list of children
   @param [Hash] options
   @option options [Object] spouse if specified, children will have that spouse
 @return [Boolean]
334870
def add_children(*args)
      options = args.extract_options!
      raise_if_sex_undefined
      check_incompatible_relationship(:children, *args)
      transaction do
        args.inject(true) do |res,child|
          res &= case sex_before_type_cast
          when gclass.sex_male_value
            child.add_mother(options[:spouse]) if options[:spouse]
            child.add_father(self)
          when gclass.sex_female_value
            child.add_father(options[:spouse]) if options[:spouse]
            child.add_mother(self)
          else
            raise SexError, "Sex value not valid for #{self}"
          end
        end
      end
    end
708860
def add_child(*names)
      names.flatten!
      return unless name = names.shift
      node = children.find { |c| c.name == name }
      node ? node.add_child(names) : (children << TreeNode.new(name, names))
    end
383203
def _init_children(self, parent):
        

        for dir_name in self.get_children_paths(parent.full_path):
            child = Node(name=dir_name, parent=parent)
            parent.children.append(child)
            self._init_children(child)
859147
public function addChildren(Collection $children)
    {
        foreach ($children as $child) {
                $this->addChild($child);
        }

        return $this;
    }
68431
def has_children?(check = nil)
      post = obtain_record(check)
      post.blank? ? false : post.has_children?
    end
212277
def child_relationships
      child_relationships = []

      relationships.each do |relationship|
        next unless relationship.respond_to?(:collection_for)
        set_default_value(relationship)
        next unless relationship.loaded?(self)

        child_relationships << relationship
      end

      many_to_many, other = child_relationships.partition do |relationship|
        relationship.kind_of?(Associations::ManyToMany::Relationship)
      end

      many_to_many + other
    end
48110
def add_subtree(cls, for_node, node, options):
        
        if cls.is_loop_safe(for_node, node):
            options.append(
                (node.pk,
                 mark_safe(cls.mk_indent(node.get_depth()) + escape(node))))
            for subnode in node.get_children():
                cls.add_subtree(for_node, subnode, options)
1208983
def options=(options)
      @options = options
      children.each do |c|
        if c.is_a? Hash
          c.values.each {|v| v.options = options}
        else
          c.options = options
        end
      end
    end
278880
def _add_member(self, member):
        
        if member.id in self.children:
            return None
        else:
            self.children[member.id] = member
135639
def equal_children?(other)
      self.class.children.all? { |child| send(child) == other.send(child) }
    end
1312331
def children(opt = {})
      raise ArgumentError, '#children can not take an index value' if opt[:index]

      xpath_adjacent(opt.merge(adjacent: :child, plural: true))
    end
1142997
def parents
      @parents ||= Array(nesting).map do |p|
        if p.is_a?(Class) && p < ActiveRecord::Base
          parent_entry(p)
        else
          p
        end
      end
    end
99099
def _add node, allows_children=true, &block
      #raise ArgumentError, "Argument should be a node" if !node.is_a? TreeNode
      $log.debug " TODO remove from existing parent to avoid bugs XXX"
      if !node.is_a? TreeNode
        n = TreeNode.new node, allows_children, &block
        node = n
      end
      node.parent = self
      @children << node
      node
    end
764074
function addChildren(node) {
    var children = node._private.children;

    for (var i = 0; i < children.length; i++) {
      add(children[i]);
    }
  }
35236
private boolean add(ClusteringFeature[] children, ClusteringFeature child) {
    for(int i = 0; i < children.length; i++) {
      if(children[i] == null) {
        children[i] = child;
        return true;
      }
    }
    return false;
  }
929906
private function _appendChildren(array &$children, $name, array $_children)
  {
    foreach ($_children as $key => $value) {
      $children[$name . "/" . $key] = $value;
    }
  }
1213495
def add_child(self, child):
        
        # Make sure the child exists before adding it.
        if child:
            # Append child if it is allowed to exist under the parent.
            if child.tag in self.contained_children:
                self.children.append(child)
            else:
                raise DC_StructureException(
                    'Invalid child "%s" for parent "%s"' %
                    (child.tag, self.tag)
                )