本文整理汇总了C++中TSharedPtr::AddData方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedPtr::AddData方法的具体用法?C++ TSharedPtr::AddData怎么用?C++ TSharedPtr::AddData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedPtr
的用法示例。
在下文中一共展示了TSharedPtr::AddData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RefreshStats
void FScriptExecutionBlueprint::RefreshStats(const FTracePath& TracePath)
{
TArray<TSharedPtr<FScriptPerfData>> InstanceData;
// Update event stats
for (auto BlueprintEventIter : ChildNodes)
{
// This crawls through and updates all instance stats and pools the results into the blueprint node stats
// as an overall blueprint performance representation.
BlueprintEventIter->RefreshStats(TracePath);
}
// Update instance stats
for (auto InstanceIter : Instances)
{
TSharedPtr<FScriptPerfData> InstancePerfData = InstanceIter->GetOrAddPerfDataByInstanceAndTracePath(InstanceIter->GetName(), TracePath);
InstancePerfData->Reset();
// Update all top level instance stats now the events are up to date.
for (auto InstanceEventIter : InstanceIter->GetChildNodes())
{
TSharedPtr<FScriptPerfData> InstanceEventPerfData = InstanceEventIter->GetOrAddPerfDataByInstanceAndTracePath(InstanceIter->GetName(), TracePath);
// Don't consider one time construction events in the instance runtime totals.
if (InstanceEventIter->IsRuntimeEvent())
{
InstancePerfData->AddData(*InstanceEventPerfData.Get());
}
}
// Add for consolidation at the bottom.
InstanceData.Add(InstancePerfData);
}
// Finally... update the root stats for the owning blueprint.
if (InstanceData.Num() > 0)
{
TSharedPtr<FScriptPerfData> BlueprintData = GetOrAddBlueprintPerfDataByTracePath(TracePath);
BlueprintData->CreateBlueprintStats(InstanceData);
// Now that all stats have been updated/accumulated, update heat level metrics data. (this now also updates the displays in the stats)
UpdateHeatLevelMetrics(BlueprintData);
}
// Update the node stats
UpdatePerfDataForNode();
}