private void Insert(int index, CellTreeNode child) { this.m_attrs.Unite((IEnumerable <MemberPath>)child.Attributes); this.m_children.Insert(index, child); this.m_leftFragmentQuery = (FragmentQuery)null; this.m_rightFragmentQuery = (FragmentQuery)null; }
// effects: Inserts child at "index" while ensuring the constants // and attributes of the child are propagated into this private void Insert(int index, CellTreeNode child) { m_attrs.Unite(child.Attributes); m_children.Insert(index, child); // reset fragmentQuery so it's recomputed when property FragmentQuery is accessed m_leftFragmentQuery = null; m_rightFragmentQuery = null; }
// effects: Add child at the beginning of the current children list // while ensuring the constants and attributes of the child are // propagated into this (i.e., unioned) internal void AddFirst(CellTreeNode child) { Insert(0, child); }
// effects: Add child to the end of the current children list // while ensuring the constants and attributes of the child are // propagated into this (i.e., unioned) internal void Add(CellTreeNode child) { Insert(m_children.Count, child); }
internal static IEnumerable <LeafCellTreeNode> GetLeaves(CellTreeNode node) { var visitor = new LeafVisitor(); return(node.Accept(visitor, true)); }
internal static IEnumerable <LeafCellTreeNode> GetLeaves( CellTreeNode node) { CellTreeNode.LeafVisitor leafVisitor = new CellTreeNode.LeafVisitor(); return(node.Accept <bool, IEnumerable <LeafCellTreeNode> >((CellTreeNode.SimpleCellTreeVisitor <bool, IEnumerable <LeafCellTreeNode> >)leafVisitor, true)); }
internal void Add(CellTreeNode child) { this.Insert(this.m_children.Count, child); }