本文整理汇总了C++中ProfileNode::traverseNextNodePreOrder方法的典型用法代码示例。如果您正苦于以下问题:C++ ProfileNode::traverseNextNodePreOrder方法的具体用法?C++ ProfileNode::traverseNextNodePreOrder怎么用?C++ ProfileNode::traverseNextNodePreOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProfileNode
的用法示例。
在下文中一共展示了ProfileNode::traverseNextNodePreOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: focus
void Profile::focus(const ProfileNode* profileNode)
{
if (!profileNode || !m_head)
return;
bool processChildren;
const CallIdentifier& callIdentifier = profileNode->callIdentifier();
for (ProfileNode* currentNode = m_head.get(); currentNode; currentNode = currentNode->traverseNextNodePreOrder(processChildren))
processChildren = currentNode->focus(callIdentifier);
// Set the visible time of all nodes so that the %s display correctly.
forEach(&ProfileNode::calculateVisibleTotalTime);
}
示例2: setTreeVisible
void ProfileNode::setTreeVisible(ProfileNode* node, bool visible)
{
ProfileNode* nodeParent = node->parent();
ProfileNode* nodeSibling = node->nextSibling();
node->setParent(0);
node->setNextSibling(0);
for (ProfileNode* currentNode = node; currentNode; currentNode = currentNode->traverseNextNodePreOrder())
currentNode->setVisible(visible);
node->setParent(nodeParent);
node->setNextSibling(nodeSibling);
}
示例3: exclude
void Profile::exclude(const ProfileNode* profileNode)
{
if (!profileNode || !m_head)
return;
const CallIdentifier& callIdentifier = profileNode->callIdentifier();
for (ProfileNode* currentNode = m_head.get(); currentNode; currentNode = currentNode->traverseNextNodePreOrder())
currentNode->exclude(callIdentifier);
// Set the visible time of the head so the %s display correctly.
m_head->setVisibleTotalTime(m_head->totalTime() - m_head->selfTime());
m_head->setVisibleSelfTime(0.0);
}