// breyta nafninu á þessu falli.. ekki subroutine private void insertSubroutine(int cellIdx, int value) { CellToDLI DLIdata = new CellToDLI(cellIdx, value, this._grid.Length); string nodeId = "D" + cellIdx.ToString(); // here we use Node´s column node constructor // these are the column nodes that each respective data node below points to. Node celColumnNode = this._colObjContainer[DLIdata.CelDLIdx]; Node rowColumnNode = this._colObjContainer[DLIdata.RowDLIdx]; Node colColumnNode = this._colObjContainer[DLIdata.ColDLIdx]; Node boxColumnNode = this._colObjContainer[DLIdata.BoxDLIdx]; // here we use Node´s data node constructor. Node celDataNode = new Node(nodeId, "dataNode", "cell", celColumnNode, DLIdata.RowData); Node rowDataNode = new Node(nodeId, "dataNode", "row", rowColumnNode, DLIdata.RowData); Node colDataNode = new Node(nodeId, "dataNode", "col", colColumnNode, DLIdata.RowData); Node boxDataNode = new Node(nodeId, "dataNode", "box", boxColumnNode, DLIdata.RowData); insertRow( cellIdx, DLIdata, celDataNode, rowDataNode, colDataNode, boxDataNode ); }
private void insertRow(int cellIdx, CellToDLI indices, Node cel, Node row, Node col, Node box) { connectRowNodes(cel, row, col, box); insertNode(cellIdx, cel, indices.CelDLIdx); insertNode(cellIdx, row, indices.RowDLIdx); insertNode(cellIdx, col, indices.ColDLIdx); insertNode(cellIdx, box, indices.BoxDLIdx); }