Esempio n. 1
0
        /// <summary>
        /// Visists the given visitor with the specified custom node.
        /// </summary>
        public static bool Accept(IGenericNode node, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(node))
            {
                foreach (var child in node.Nodes)
                {
                    if (!child.Accept(visitor))
                    {
                        break;
                    }
                }
            }

            return(visitor.VisitLeave(node));
        }
Esempio n. 2
0
 public bool VisitLeave(IGenericNode node) => true;
Esempio n. 3
0
 public bool VisitEnter(IGenericNode node) => false;
		public bool VisitLeave(IGenericNode node) => true;
		public bool VisitEnter(IGenericNode node) => true;
Esempio n. 6
0
		public bool VisitLeave (IGenericNode node)
		{
			throw new NotImplementedException ();
		}
Esempio n. 7
0
        /// <summary>
        /// Visists the given visitor with the specified custom node.
        /// </summary>
        public static bool Accept(IGenericNode node, ISolutionVisitor visitor)
        {
            if (visitor.VisitEnter(node))
            {
                foreach (var child in node.Nodes)
                {
                    if (!child.Accept(visitor))
                        break;
                }
            }

            return visitor.VisitLeave(node);
        }
Esempio n. 8
0
 /// <summary>
 /// Begins visiting a custom node.
 /// </summary>
 /// <param name="node">The custom node being visited.</param>
 /// <returns><see langword="true" /> if the node children should be visited; <see langword="false" /> otherwise.</returns>
 public bool VisitEnter(IGenericNode node) => true;
Esempio n. 9
0
 public bool VisitLeave(IGenericNode node)
 {
     throw new NotImplementedException();
 }