本文整理汇总了C++中ObjRef::next方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjRef::next方法的具体用法?C++ ObjRef::next怎么用?C++ ObjRef::next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjRef
的用法示例。
在下文中一共展示了ObjRef::next方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: retrieveCmetaIdsFromCellmlElement
void CellmlFile::retrieveCmetaIdsFromCellmlElement(iface::cellml_api::CellMLElement *pElement)
{
// Keep track of the given CellML element's cmeta:id
QString cmetaId = QString::fromStdWString(pElement->cmetaId());
if (!cmetaId.isEmpty())
mUsedCmetaIds << cmetaId;
// Do the same for all the child elements of the given CellML element
ObjRef<iface::cellml_api::CellMLElementSet> childElements = pElement->childElements();
ObjRef<iface::cellml_api::CellMLElementIterator> childElementsIter = childElements->iterate();
try {
for (ObjRef<iface::cellml_api::CellMLElement> childElement = childElementsIter->next();
childElement; childElement = childElementsIter->next()) {
retrieveCmetaIdsFromCellmlElement(childElement);
}
} catch (...) {
// Note: we should never reach this point, but it may still happen if a
// CellML file contains a child element that is not known to the
// CellML API. We are taking the view that this is a limitation of
// the CellML API and shouldn't therefore generate an error for
// something that should have been working fine in the first
// place...
}
}