/// <summary> /// <c>VisitChildren</c> method is used to visit child nodes of the node given /// as a parameter. This method provides default functionality for /// </summary> /// <param name="currentNode">The current node.</param> /// <returns></returns> public virtual Return VisitChildren(CASTElement currentNode) { CAbstractIterator <CASTElement> it = m_iteratorFactory.CreateIteratorASTElementDescentantsFlatten(currentNode); Return r = default(Return); // Call Accept to all children of the current node for (it.ItBegin(); !it.ItEnd(); it.ITNext()) { r = AggregateResult(it.M_item.AcceptVisitor(this)); } return(r); }
/// <summary> /// Visits the children of the specified context in the currentNode /// </summary> /// <param name="currentNode">The current node.</param> /// <returns></returns> public virtual Return VisitContext(CASTElement currentNode, ContextType context) { CAbstractIterator <CASTElement> it = m_iteratorFactory.CreateIteratorASTElementDescentantsContext(currentNode); // Call Accept to all children in the specified context of the current node for (it.ItBegin(context); !it.ItEnd(); it.ITNext()) { it.M_item.AcceptVisitor(this); } return(default(Return)); }
/// <summary> /// Visits the children of the specified node <c>current</c> raising events /// at specific sequence points determined by the iterator /// </summary> /// <param name="currentNode">The current node.</param> /// <returns></returns> public virtual Return VisitChildrenEvents(CASTElement currentNode) { CAbstractIterator <CASTElement> it = m_iteratorFactory.CreateIteratorASTElementDescentantsFlattenEvents(currentNode, m_events, this); // Call Accept to all children of the current node for (it.ItBegin(); !it.ItEnd(); it.ITNext()) { it.M_item.AcceptVisitor(this); } return(default(Return)); }