本文整理汇总了C++中TSet::Find方法的典型用法代码示例。如果您正苦于以下问题:C++ TSet::Find方法的具体用法?C++ TSet::Find怎么用?C++ TSet::Find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSet
的用法示例。
在下文中一共展示了TSet::Find方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InternalCheckPeriodicEffectStacking
void FGAGameEffectContainer::InternalCheckPeriodicEffectStacking(const FGAGameEffectHandle& HandleIn)
{
UGAGameEffectSpec* Spec = HandleIn.GetEffectSpec();
//sEGAEffectStacking Stacking = Spec->EffectStacking;
EGAEffectAggregation Aggregation = Spec->EffectAggregation;
EGAEffectStacking Stacking = HandleIn.GetEffectSpec()->EffectStacking;
UE_LOG(GameAttributes, Log, TEXT("Stacking Type: %s"), *EnumToString::GetStatckingAsString(Stacking));
FGAGameEffectHandle* Handle = nullptr;
switch (Aggregation)
{
case EGAEffectAggregation::AggregateByInstigator:
{
TMap<FName, TSet<FGAGameEffectHandle>>* EffectHandle = InstigatorEffectHandles.Find(HandleIn.GetContextRef().Instigator.Get());
TSet<FGAGameEffectHandle>* HandleSet = nullptr;
if (EffectHandle)
{
HandleSet = EffectHandle->Find(HandleIn.GetEffectSpec()->GetFName());
if (HandleSet)
{
Handle = HandleSet->Find(HandleIn);
}
}
}
case EGAEffectAggregation::AggregateByTarget:
{
TSet<FGAGameEffectHandle>* HandleSet = TargetEffectByType.Find(HandleIn.GetEffectSpec()->GetFName());
if (HandleSet)
{
Handle = HandleSet->Find(HandleIn);
}
break;
}
}
switch (Stacking)
{
case EGAEffectStacking::Add:
{
break;
}
case EGAEffectStacking::Duration:
{
break;
}
case EGAEffectStacking::Intensity:
{
break;
}
case EGAEffectStacking::Override:
{
break;
}
case EGAEffectStacking::StrongerOverride:
{
InternalApplyPeriodic(HandleIn);
break;
}
}
InternalApplyEffectByAggregation(HandleIn);
}
示例2: CaclulateTilesAbsolutePositions
void UWorldComposition::CaclulateTilesAbsolutePositions()
{
for (FWorldCompositionTile& Tile : Tiles)
{
TSet<FName> VisitedParents;
Tile.Info.AbsolutePosition = FIntPoint::ZeroValue;
FWorldCompositionTile* ParentTile = &Tile;
do
{
// Sum relative offsets
Tile.Info.AbsolutePosition+= ParentTile->Info.Position;
VisitedParents.Add(ParentTile->PackageName);
FName NextParentTileName = FName(*ParentTile->Info.ParentTilePackageName);
// Detect loops in parent->child hierarchy
FWorldCompositionTile* NextParentTile = FindTileByName(NextParentTileName);
if (NextParentTile && VisitedParents.Find(NextParentTileName) != nullptr)
{
UE_LOG(LogWorldComposition, Warning, TEXT("World composition tile (%s) has a cycled parent (%s)"), *Tile.PackageName.ToString(), *NextParentTileName.ToString());
NextParentTile = nullptr;
ParentTile->Info.ParentTilePackageName = FName(NAME_None).ToString();
}
ParentTile = NextParentTile;
}
while (ParentTile);
}
}
示例3: HandleAddTrackSubMenuNew
void FSequencerObjectBindingNode::HandleAddTrackSubMenuNew(FMenuBuilder& AddTrackMenuBuilder, TArray<TArray<UProperty*> > KeyablePropertyPaths)
{
// [PostProcessSettings] [Bloom1Tint] [X]
// [PostProcessSettings] [Bloom1Tint] [Y]
// [PostProcessSettings] [ColorGrading]
// Create property menu data based on keyable property paths
TSet<UProperty*> PropertiesTraversed;
TArray<PropertyMenuData> KeyablePropertyMenuData;
for (auto KeyablePropertyPath : KeyablePropertyPaths)
{
PropertyMenuData KeyableMenuData;
KeyableMenuData.PropertyPath = KeyablePropertyPath;
// If the path is greater than 1, keep track of the actual properties (not channels) and only add these properties once since we can't do single channel keying of a property yet.
if (KeyablePropertyPath.Num() > 1) //@todo
{
if (PropertiesTraversed.Find(KeyablePropertyPath[1]) != nullptr)
{
continue;
}
KeyableMenuData.MenuName = FObjectEditorUtils::GetCategoryFName(KeyablePropertyPath[1]).ToString();
PropertiesTraversed.Add(KeyablePropertyPath[1]);
}
else
{
// No sub menus items, so skip
continue;
}
KeyablePropertyMenuData.Add(KeyableMenuData);
}
// Sort on the menu name
KeyablePropertyMenuData.Sort([](const PropertyMenuData& A, const PropertyMenuData& B)
{
int32 CompareResult = A.MenuName.Compare(B.MenuName);
return CompareResult < 0;
});
// Add menu items
for (int32 MenuDataIndex = 0; MenuDataIndex < KeyablePropertyMenuData.Num(); )
{
TArray<TArray<UProperty*> > KeyableSubMenuPropertyPaths;
KeyableSubMenuPropertyPaths.Add(KeyablePropertyMenuData[MenuDataIndex].PropertyPath);
for (; MenuDataIndex < KeyablePropertyMenuData.Num()-1; )
{
if (KeyablePropertyMenuData[MenuDataIndex].MenuName == KeyablePropertyMenuData[MenuDataIndex+1].MenuName)
{
++MenuDataIndex;
KeyableSubMenuPropertyPaths.Add(KeyablePropertyMenuData[MenuDataIndex].PropertyPath);
}
else
{
break;
}
}
const int32 PropertyNameIndexStart = 1; // Strip off the struct property name
const int32 PropertyNameIndexEnd = 2; // Stop at the property name, don't descend into the channels
AddTrackMenuBuilder.AddSubMenu(
FText::FromString(KeyablePropertyMenuData[MenuDataIndex].MenuName),
FText::GetEmpty(),
FNewMenuDelegate::CreateSP(this, &FSequencerObjectBindingNode::AddPropertyMenuItems, KeyableSubMenuPropertyPaths, PropertyNameIndexStart, PropertyNameIndexEnd));
++MenuDataIndex;
}
}