public override void UnregisterChild(IShapeHierarchical child) { if (child != null && child.Parent == null) { this.children.Remove(child); } base.RegisterChild(child); }
public override void RegisterChild(IShapeHierarchical child) { if (child != null && child.Parent == this) { this.children.AddLast(child); } base.RegisterChild(child); }
/// <summary> /// Generate an <see cref="IShape"/> hierarchy by stating that the <paramref name="parent"/> is the parent of the <paramref name="child"/>. /// </summary> /// <param name='parent'> /// The associated name of the <see cref="IShape"/> that will become a parent of the <paramref name="child"/>. /// </param> /// <param name='child'> /// The associated name of the <see cref="IShape"/> that will become a child of the <paramref name="parent"/>. /// </param> public void BuildHierarchy(IFunctionInstance parent, IFunctionInstance child) { IShapeHierarchical schild = this.GetShape <IShapeHierarchical> (child); if (schild != null) { IShapeHierarchical sparnt = this.GetShape <IShapeHierarchical> (parent); if (sparnt != null) { schild.Parent = sparnt; } } }
public virtual void UnregisterChild(IShapeHierarchical child) { }
protected ShapeHierarchical(IFunctionInstance name, IShapeHierarchical parent) : base(name) { this.Parent = parent; }
public ShapePage(IFunctionInstance name, IShapeHierarchical parent, string title) : base(name, parent) { this.Title = title; }
public ShapePage(IFunctionInstance name, IShapeHierarchical parent) : this(name, parent, string.Empty) { }
protected ShapeModifiableHierarchical(IFunctionInstance name, IShapeHierarchical parent) : base(name, parent) { }