Adds child to this Simon with setting the parent of the child.

@param simon future child of this Simon
960366
final void addChild(AbstractSimon simon) {
		children.add(simon);
		simon.setParent(this);
		simon.enabled = enabled;
	}
549201
@Override
    public void setParent(View parent)
    {

        if (parent == null && view != null) view.setParent(null);
        this.parent = parent;

        // if set new parent and has some element, try to load children
        // this element is a BranchElement ("collection"),
        // so we should have some LeafElements ("children")
        if ((parent != null) && (getElement() != null))
        {
            ViewFactory f = getViewFactory();
            loadChildren(f);
        }
    }
536336
protected final void register(Simon simon) {
		Object mBean = constructObject(simon);
		String name = constructObjectName(simon);
		registerSimonBean(mBean, name);
	}
492144
public void addChildCluster(Cluster<M> parent, Cluster<M> child) {
    hierarchy.add(parent, child);
  }
97428
public void setParent(Model parent) {
        if (parent == this) {
            throw new IllegalArgumentException("The model can't be its own parent");
        }
        if (parent == null) {
            this.parent.children.remove(this);
        } else {
            parent.children.add(this);
        }
        this.parent = parent;
    }
280383
def add(self, child):
        

        if isinstance(child, Assign):
            self.add_assign(child)
        else:
            raise ModelError('Unsupported child element')
416134
def add_child(self, child):
        
        child.parent = self
        self.children.append(child)
        return child
285997
def add_child(self, child):
        
        assert child != self
        child.parent = self
        child.ranks = self.ranks
        child.index = self.index
        assert child.tax_id not in self.index
        self.index[child.tax_id] = child
        self.children.add(child)
1022959
public void add(InteractionUnit interactionUnit)
    {
        if (interactionUnit != null)
        {
            interactionUnit.setParent(this);
            children.add(interactionUnit);
        }
    }
317292
public void addChildren( PlanNode first,
                             PlanNode second,
                             PlanNode third ) {
        if (first != null) this.addLastChild(first);
        if (second != null) this.addLastChild(second);
        if (third != null) this.addLastChild(third);
    }
986594
def add_child(self, child):
        
        # Make sure the child exists before adding it.
        if child:
            # Add the child if it is allowed to exist under the parent.
            if child.tag in self.contained_children:
                self.children.append(child)
            else:
                raise ETD_MS_StructureException(
                    'Invalid child "%s" for parent "%s"' %
                    (child.tag, self.tag)
                )
245740
def set_parent(self, parent):
        
        if self._parent == parent:
            return
        if self._parent:
            self._parent.remove_child(self)
        self._parent = parent
        if parent:
            parent.add_child(self)
570627
private void setParent(DepTreeNode parent) {
		if (this.name.length() == 0) {
			// A child node must have a name.
			throw new IllegalStateException();
		}
		this.parent = new WeakReference<DepTreeNode>(parent);
	}
4410
void setParent (Context2 parent)
    {
        this.parent = parent;
        parent.child = this;        // JJK: Doubly-linked
        declarations = null;
        prefixTable = parent.prefixTable;
        uriTable = parent.uriTable;
        elementNameTable = parent.elementNameTable;
        attributeNameTable = parent.attributeNameTable;
        defaultNS = parent.defaultNS;
        tablesDirty = false;
    }
401381
public void addChildBefore(Node newChild, Node node) {
        if (newChild.next != null)
            throw new RuntimeException(
                      "newChild had siblings in addChildBefore");
        if (first == node) {
            newChild.next = first;
            first = newChild;
            return;
        }
        Node prev = getChildBefore(node);
        addChildAfter(newChild, prev);
    }
1350470
public void addChild(C child) {
        SharedPreferences prefs = loadSharedPreferences("children");

        List<String> objects = getChildrenList();

        Model toPut = (Model) child;

        if (objects.indexOf(toPut.getId()) != ArrayUtils.INDEX_NOT_FOUND) {
            return;
        }

        objects.add(toPut.getId());

        toPut.save();

        prefs.edit().putString(String.valueOf(getId()), StringUtils.join(objects, ",")).commit();
    }
18595
public void addChild(int offset, TreeElement child)
            throws IllegalArgumentException
    {
        child.setSelected(false);
        child.setParent(this);
        if (_children == null)
            _children = new ArrayList();
        _children.add(offset, child);

        //Need to rename all affected!
        int size = _children.size();
        for (int i = offset; i < size; i++) {
            TreeElement thisChild = (TreeElement) _children.get(i);
            thisChild.updateName(this, i);
        }

    }