コード例 #1
0
ファイル: MgTree.cs プロジェクト: rinavin/RCJS
        /// <summary>
        ///   replicate tree
        /// </summary>
        /// <returns></returns>
        internal MgTreeBase replicate()
        {
            MgTree rep = (MgTree)MemberwiseClone();

            rep._root            = null;
            rep._allNodes        = new Dictionary <int, NodeBase>();
            rep._recordNodeIDs   = new Dictionary <int, List <int> >();
            rep._size            = 0;
            rep._lastRootSibling = null;
            rep.NodeInExpand     = null;
            rep._nodeInCreation  = null;
            if (_root != null)
            {
                _root.doForAllNodes(new NodeReplicator(rep));
            }

            return(rep);
        }
コード例 #2
0
ファイル: MgTree.cs プロジェクト: rinavin/RCJS
 /// <param name = "repDest">the replication destination tree</param>
 internal NodeReplicator(MgTree repDest)
 {
     _repDest    = repDest;
     _nodesStack = new Stack();
 }