Пример #1
0
        /// <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(RASTElement currentNode, ContextType context)
        {
            RAbstractIterator <RASTElement> 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));
        }
Пример #2
0
        /// <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(RASTElement currentNode)
        {
            RAbstractIterator <RASTElement> it = m_iteratorFactory.CreateIteratorASTElementDescentantsFlatten(currentNode);

            // Call Accept to all children of the current node
            for (it.ItBegin(); !it.ItEnd(); it.ITNext())
            {
                it.M_item.AcceptVisitor(this);
            }

            return(default(Return));
        }