本文整理汇总了C++中GNEEdge::getMicrosimID方法的典型用法代码示例。如果您正苦于以下问题:C++ GNEEdge::getMicrosimID方法的具体用法?C++ GNEEdge::getMicrosimID怎么用?C++ GNEEdge::getMicrosimID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GNEEdge
的用法示例。
在下文中一共展示了GNEEdge::getMicrosimID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool
GNETLSEditorFrame::controlsEdge(GNEEdge& edge) const {
if (myEditedDef != 0) {
const NBConnectionVector& links = myEditedDef->getControlledLinks();
for (NBConnectionVector::const_iterator it = links.begin(); it != links.end(); it++) {
if ((*it).getFrom()->getID() == edge.getMicrosimID()) {
return true;
}
}
}
return false;
}
示例2: assert
void
GNENet::replaceJunctionByGeometry(GNEJunction* junction, GNEUndoList* undoList) {
undoList->p_begin("Replace junction by geometry");
assert(junction->getNBNode()->checkIsRemovable());
std::vector<std::pair<NBEdge*, NBEdge*> > toJoin = junction->getNBNode()->getEdgesToJoin();
for (std::vector<std::pair<NBEdge*, NBEdge*> >::iterator j = toJoin.begin(); j != toJoin.end(); j++) {
GNEEdge* begin = myEdges[(*j).first->getID()];
GNEEdge* continuation = myEdges[(*j).second->getID()];
deleteEdge(begin, undoList);
deleteEdge(continuation, undoList);
GNEEdge* newEdge = createEdge(begin->getSource(), continuation->getDest(), begin, undoList, begin->getMicrosimID(), false, true);
PositionVector newShape = begin->getNBEdge()->getInnerGeometry();
newShape.push_back(junction->getNBNode()->getPosition());
newShape.append(continuation->getNBEdge()->getInnerGeometry());
newEdge->setAttribute(SUMO_ATTR_SHAPE, toString(newShape), undoList);
// @todo what about trafficlights at the end of oontinuation?
}
deleteJunction(junction, undoList);
undoList->p_end();
}