本文整理汇总了C++中TraceFunction::assoziation方法的典型用法代码示例。如果您正苦于以下问题:C++ TraceFunction::assoziation方法的具体用法?C++ TraceFunction::assoziation怎么用?C++ TraceFunction::assoziation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TraceFunction
的用法示例。
在下文中一共展示了TraceFunction::assoziation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refresh
void CoverageView::refresh()
{
clear();
setColumnWidth(0, 50);
if (!_showCallers)
setColumnWidth(1, 50);
if (!_data || !_activeItem) return;
TraceItem::CostType t = _activeItem->type();
TraceFunction* f = 0;
if (t == TraceItem::Function) f = (TraceFunction*) _activeItem;
if (t == TraceItem::FunctionCycle) f = (TraceFunction*) _activeItem;
if (!f) return;
TraceFunction* ff;
TraceFunctionList l;
_hc.clear(Configuration::maxListCount());
SubCost realSum = f->inclusive()->subCost(_costType);
if (_showCallers)
l = Coverage::coverage(f, Coverage::Caller, _costType);
else
l = Coverage::coverage(f, Coverage::Called, _costType);
for (ff=l.first();ff;ff=l.next()) {
Coverage* c = (Coverage*) ff->assoziation(Coverage::Rtti);
if (c && (c->inclusive()>0.0))
_hc.addCost(ff, SubCost(realSum * c->inclusive()));
}
for(int i=0;i<_hc.realCount();i++) {
ff = (TraceFunction*) _hc[i];
Coverage* c = (Coverage*) ff->assoziation(Coverage::Rtti);
if (_showCallers)
new CallerCoverageItem(this, c, f, _costType, _groupType);
else
new CalleeCoverageItem(this, c, f, _costType, _groupType);
}
if (_hc.hasMore()) {
// a placeholder for all the functions skipped ...
ff = (TraceFunction*) _hc[_hc.maxSize()-1];
Coverage* c = (Coverage*) ff->assoziation(Coverage::Rtti);
if (_showCallers)
new CallerCoverageItem(this, _hc.count() - _hc.maxSize(),
c, f, _costType, _groupType);
else
new CalleeCoverageItem(this, _hc.count() - _hc.maxSize(),
c, f, _costType, _groupType);
}
}