public override NodeAVL SetParent(IPersistentStore store, NodeAVL n) { NodeAVLDisk node = this; RowAVLDisk row = this.row; if (!row.KeepInMemory(true)) { row = (RowAVLDisk)store.Get(this.row, true); node = (NodeAVLDisk)row.GetNode(this._iId); } if (!row.IsInMemory()) { row.KeepInMemory(false); throw Error.RuntimeError(0xc9, "NodeAVLDisk"); } row.SetNodesChanged(); node._iParent = (n == null) ? -1 : n.GetPos(); if ((n != null) && !n.IsInMemory()) { n = this.FindNode(store, n.GetPos()); } node.nParent = n; row.KeepInMemory(false); return(node); }
public bool Equals(NodeAVL n) { if (!(n is NodeAVLDisk)) { return(false); } if (this != n) { return(this.GetPos() == n.GetPos()); } return(true); }