void network::verticesMatching(nodeList &res, node *n) { // TODO bug ? // throw "stub verticesSimilar"; if (n == network::stdNode) verticesMatching (res, _dynNode_); else { networkElementType nodeType= n->getNodeInfo().theNodeType; nodeIterator vi; for(vi = theNodes.begin(); vi != theNodes.end(); vi++) // if n has standard parameter -> match if node type is equal { dynNode *x = (dynNode*)node::theNodes[*vi]; if ( ((dynNode*) n)->isStandard()) { if (node::theNodes[*vi]->getNodeInfo().theNodeType == nodeType) res.insert(*vi); } else // if n has specified parameter -> match after node type and parameters { if ((node::theNodes[*vi]->getNodeInfo().theNodeType == nodeType) && (( x-> row == ((dynNode*)n)-> params<baseType>::row) || ( x->compareSheets( x-> row , ((dynNode*)n)-> params<baseType>::row) ))) // match nodes, if their parameter are the same. res.insert(*vi); } } } }
//! Fügt der Liste res alle Knoten vom Typ nodetyp hinzu. void network::verticesMatching(nodeList &res, int networkElementType) { nodeIterator vi; for(vi = theNodes.begin(); vi != theNodes.end(); vi++) if (node::theNodes[*vi]->getNodeInfo().theNodeType == networkElementType) res.insert(*vi); }
void network::verticesMatching(nodeList &res, nodeKind nodeKind) { nodeIterator vi; for(vi = theNodes.begin(); vi != theNodes.end(); vi++) if (node::theNodes[*vi]->getNodeInfo().theNodeKind & nodeKind) res.insert(*vi); }
//! Fügt der Liste res alle Knoten vom Typ nodetyp hinzu. void network::verticesMatching(nodeList &res, networkElementType nt) { nodeIterator vi; for(vi = theNodes.begin(); vi != theNodes.end();vi++) if (dynNode::lookUp(*vi)->getNodeInfo().theNodeType == nt) res.insert(*vi); }