Class Reference sElementList

A element of a list of schematic-elements. More...

Member

sElementList* nextElement
sElement* thisElement

Detailed Description

graph LR ce(sheet)--firstElement-->el(sElementList) el--thisElement-->e(sElement) el--nextElement-->el click ce "/layoutscript/api/sheet" click el "/layoutscript/api/selementlist" click e "/layoutscript/api/selement" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class el thisClas class ce,e clas

sElementList is one node in the linked list of schematic elements. thisElement points to an sElement; nextElement points to the next node. The head of the list is firstElement on a sheet or on a symbol. A typical loop starts at that head and walks until nextElement is NULL. Always test thisElement against NULL before you call isDevice or read parameters. You do not construct list nodes; adding or deleting an element on the sheet updates the list.

Example:

sElementList *el = schematic->drawing->currentSheet->firstElement;
while (el != NULL) {
 if (el->thisElement != NULL) {
 if (el->thisElement->isWire()) {
 pointArray p = el->thisElement->getPoints();
 }
 }
 el = el->nextElement;
}

Member Function Documentation


sElementList* sElementList::nextElement

Pointer to the next node in the list, or NULL at the end.


sElement* sElementList::thisElement

Pointer to the sElement stored in this node.