예제 #1
0
 public override void Travers(TraversOrder order, funcTravers travers, StarNode <T> root)
 {
     if (root != null)
     {
         travers(root);
         if (root.IsRoot)
         {
             m_objects.Travers(order, root.m_objects);
         }
     }
 }
예제 #2
0
 public override void Travers(TraversOrder order, StarNode <T> root)
 {
     if (root != null)
     {
         Console.WriteLine("Stargraph IsRoot: {0}", root.IsRoot);
         if (root.IsRoot)
         {
             m_objects.Travers(order, root.m_objects);
         }
     }
 }
예제 #3
0
 public override StarNode <T> removeNode(StarNode <T> node, ref bool removed)
 {
     if (Root == null)
     {
         m_objects.removeNode(node.Name, ref removed);
     }
     if (removed)
     {
         OnRemoveNode(node);
     }
     return(this);
 }
예제 #4
0
        public override StarNode <T> setNode(StarNode <T> node)
        {
            if (getNode(node.Name) != null)
            {
                return(this);
            }

            if (Root == null)
            {
                node.Root = this;
                OnSetNode(node);

                m_objects.setNode(new ListNode <StarNode <T> > (node.Name, node));
            }

            return(this);
        }
예제 #5
0
        public ListNode <StarNode <T> > setNode(string name, T data)
        {
            StarNode <T> node = new StarNode <T>(name); node.Entry = data;

            return(m_objects.setNode(new ListNode <StarNode <T> > (name, node)));
        }
예제 #6
0
        public override StarNode <T> removeNode(string name, ref bool removed)
        {
            StarNode <T> node = getNode(name);

            return(removeNode(node, ref removed));
        }