Class Reference cellList

A list element for cells. More...

Member

cellList* nextCell
cell* thisCell

Detailed Description

graph LR la(layout)--drawing-->dr(drawingField) dr--firstCell-->cl(cellList) cl==thisCell==>ce(cell) cl==nextCell==>cl click ce "/layoutscript/api/cell" click cl "/layoutscript/api/celllist" click la "/layoutscript/api/layout" click dr "/layoutscript/api/drawingfield" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class cl thisClas class la,dr,ce clas

A cellList node is one step in the linked list of all cells of a drawingField. thisCell points to the cell at this node; nextCell points to the following node, or NULL at the end of the list. The head of the list is layout->drawing->firstCell; the cell on screen is a different pointer, layout->drawing->currentCell, which may or may not be the first node. Walk the list when you need every cell, for example to rename, count or search. The example below visits each cell and skips empty thisCell pointers.

Example:

cellList *cl = layout->drawing->firstCell;
while (cl != NULL) {
 if (cl->thisCell != NULL) {
 // e.g. debug(cl->thisCell->cellName);
 }
 cl = cl->nextCell;
}

Member Function Documentation


cellList* cellList::nextCell

The next node in the list, or NULL after the last cell.


cell* cellList::thisCell

The cell stored at this node.