本文整理汇总了C++中HasAnyFlags函数的典型用法代码示例。如果您正苦于以下问题:C++ HasAnyFlags函数的具体用法?C++ HasAnyFlags怎么用?C++ HasAnyFlags使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HasAnyFlags函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: finishVerify
bool VerifyServiceTask::checkFiles()
{
if (HasAnyFlags(m_uiOldStatus, UserCore::Item::ItemInfoI::STATUS_DOWNLOADING))
{
gcString path;
if (checkMcfDownload(path))
finishVerify(UserCore::Misc::VerifyComplete::V_DOWNLOAD, path.c_str());
else
finishVerify(UserCore::Misc::VerifyComplete::V_DOWNLOAD);
return false;
}
else if (HasAnyFlags(m_uiOldStatus, (UserCore::Item::ItemInfoI::STATUS_INSTALLED|UserCore::Item::ItemInfoI::STATUS_INSTALLING)))
{
m_hMcf->getProgEvent() += delegate(this, &VerifyServiceTask::onProgress);
m_hMcf->getErrorEvent() += delegate(this, &VerifyServiceTask::onError);
bool completeMcf = false;
if (m_McfBuild == 0)
m_McfBuild = getItemInfo()->getInstalledBuild();
setTier(VERIFYMCF);
if (!checkMcf(completeMcf))
return false;
setTier(VERIFYINSTALL);
if (!checkInstall(completeMcf))
return false;
setTier(DOWNLOADMISSINGFILES);
if (completeMcf == false && !downloadMissingFiles())
return false;
setTier(INSTALLMISSINGFILES);
if (!installMissingFiles())
return false;
}
else
{
getItemInfo()->delSFlag(UserCore::Item::ItemInfoI::STATUS_READY);
finishVerify(UserCore::Misc::VerifyComplete::V_RESET);
return false;
}
return true;
}
示例2: PostInitProperties
void UParticleModuleParameterDynamic::PostInitProperties()
{
Super::PostInitProperties();
if (!HasAnyFlags(RF_ClassDefaultObject | RF_NeedLoad))
{
// Structure to hold one-time initialization
struct FConstructorStatics
{
FName NAME_None;
FConstructorStatics()
: NAME_None(TEXT("None"))
{
}
};
static FConstructorStatics ConstructorStatics;
UDistributionFloatConstant* NewParam1 = NewObject<UDistributionFloatConstant>(this, TEXT("DistributionParam1")); NewParam1->Constant = 1.0f;
UDistributionFloatConstant* NewParam2 = NewObject<UDistributionFloatConstant>(this, TEXT("DistributionParam2")); NewParam2->Constant = 1.0f;
UDistributionFloatConstant* NewParam3 = NewObject<UDistributionFloatConstant>(this, TEXT("DistributionParam3")); NewParam3->Constant = 1.0f;
UDistributionFloatConstant* NewParam4 = NewObject<UDistributionFloatConstant>(this, TEXT("DistributionParam4")); NewParam4->Constant = 1.0f;
DynamicParams.Add(FEmitterDynamicParameter(ConstructorStatics.NAME_None, false, EDPV_UserSet, NewParam1));
DynamicParams.Add(FEmitterDynamicParameter(ConstructorStatics.NAME_None, false, EDPV_UserSet, NewParam2));
DynamicParams.Add(FEmitterDynamicParameter(ConstructorStatics.NAME_None, false, EDPV_UserSet, NewParam3));
DynamicParams.Add(FEmitterDynamicParameter(ConstructorStatics.NAME_None, false, EDPV_UserSet, NewParam4));
}
}
示例3: Serialize
void UClassProperty::Serialize( FArchive& Ar )
{
Super::Serialize( Ar );
Ar << MetaClass;
#if USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING
if (Ar.IsLoading() || Ar.IsObjectReferenceCollector())
{
if (ULinkerPlaceholderClass* PlaceholderClass = Cast<ULinkerPlaceholderClass>(MetaClass))
{
PlaceholderClass->AddReferencingProperty(this);
}
}
#endif // USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING
if( !(MetaClass||HasAnyFlags(RF_ClassDefaultObject)) )
{
// If we failed to load the MetaClass and we're not a CDO, that means we relied on a class that has been removed or doesn't exist.
// The most likely cause for this is either an incomplete recompile, or if content was migrated between games that had native class dependencies
// that do not exist in this game. We allow blueprint classes to continue, because compile on load will error out, and stub the class that was using it
UClass* TestClass = dynamic_cast<UClass*>(GetOwnerStruct());
if( TestClass && TestClass->HasAllClassFlags(CLASS_Native) && !TestClass->HasAllClassFlags(CLASS_NewerVersionExists) && (TestClass->GetOutermost() != GetTransientPackage()) )
{
checkf(false, TEXT("Class property tried to serialize a missing class. Did you remove a native class and not fully recompile?"));
}
}
}
示例4: Super
APawn::APawn(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.TickGroup = TG_PrePhysics;
AutoPossessAI = EAutoPossessAI::PlacedInWorld;
if (HasAnyFlags(RF_ClassDefaultObject) && GetClass() == APawn::StaticClass())
{
AIControllerClass = LoadClass<AController>(NULL, *((UEngine*)(UEngine::StaticClass()->GetDefaultObject()))->AIControllerClassName.ToString(), NULL, LOAD_None, NULL);
}
else
{
AIControllerClass = ((APawn*)APawn::StaticClass()->GetDefaultObject())->AIControllerClass;
}
bCanBeDamaged = true;
SetRemoteRoleForBackwardsCompat(ROLE_SimulatedProxy);
bReplicates = true;
NetPriority = 3.0f;
NetUpdateFrequency = 100.f;
bReplicateMovement = true;
BaseEyeHeight = 64.0f;
AllowedYawError = 10.99f;
bCollideWhenPlacing = true;
SpawnCollisionHandlingMethod = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButDontSpawnIfColliding;
bProcessingOutsideWorldBounds = false;
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;
bInputEnabled = true;
}
示例5: Super
UGUIWidget::UGUIWidget(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
OpenCloseTween = ObjectInitializer.CreateDefaultSubobject<UTweeningBoolean>(this, "OpenCloseTweenDefault");
if ( OpenCloseTween )
{
if ( HasAnyFlags(RF_ClassDefaultObject | RF_ArchetypeObject) )
{
FTweeningBooleanParameters Params;
Params.TweenParamsIn = FTweenParameters(EEaseType::Linear, 0.f);
Params.TweenParamsOut = FTweenParameters(EEaseType::Linear, 0.f);
Params.bInitialValue = true;
OpenCloseTween->SetParams( Params );
}
else
{
//OpenCloseTween->OnValueChanged.AddUObject( this, &UGUIWidget::OnOpenClose );
OpenCloseTween->OnTweening.AddUObject( this, &UGUIWidget::OnOpenCloseTweening );
OpenCloseTween->OnFinished.AddUObject( this, &UGUIWidget::OnOpenCloseFinished );
}
}
Tweener = ObjectInitializer.CreateDefaultSubobject<UTweener>(this, "TweenerDefault");
BooleanTweener = ObjectInitializer.CreateDefaultSubobject<UBooleanTweener>(this, "BooleanTweenerDefault");
StateMachine = ObjectInitializer.CreateDefaultSubobject<UTweeningStateMachine>(this, "StateMachineDefault");
}
示例6: checkf
void UActorComponent::DoDeferredRenderUpdates_Concurrent()
{
checkf(!HasAnyFlags(RF_Unreachable), TEXT("%s"), *GetFullName());
checkf(!IsTemplate(), TEXT("%s"), *GetFullName());
checkf(!IsPendingKill(), TEXT("%s"), *GetFullName());
if(!IsRegistered())
{
UE_LOG(LogActorComponent, Log, TEXT("UpdateComponent: (%s) Not registered, Aborting."), *GetPathName());
return;
}
if(bRenderStateDirty)
{
SCOPE_CYCLE_COUNTER(STAT_PostTickComponentRecreate);
RecreateRenderState_Concurrent();
checkf(!bRenderStateDirty, TEXT("Failed to route CreateRenderState_Concurrent (%s)"), *GetFullName());
}
else
{
SCOPE_CYCLE_COUNTER(STAT_PostTickComponentLW);
if(bRenderTransformDirty)
{
// Update the component's transform if the actor has been moved since it was last updated.
SendRenderTransform_Concurrent();
}
if(bRenderDynamicDataDirty)
{
SendRenderDynamicData_Concurrent();
}
}
}
示例7: Super
UGameplayAbility::UGameplayAbility(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
CostGameplayEffect = NULL;
CooldownGameplayEffect = NULL;
{
static FName FuncName = FName(TEXT("K2_ShouldAbilityRespondToEvent"));
UFunction* ShouldRespondFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintShouldAbilityRespondToEvent = ShouldRespondFunction && ShouldRespondFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
{
static FName FuncName = FName(TEXT("K2_CanActivateAbility"));
UFunction* CanActivateFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintCanUse = CanActivateFunction && CanActivateFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
{
static FName FuncName = FName(TEXT("K2_ActivateAbility"));
UFunction* ActivateFunction = GetClass()->FindFunctionByName(FuncName);
HasBlueprintActivate = ActivateFunction && ActivateFunction->GetOuter()->IsA(UBlueprintGeneratedClass::StaticClass());
}
#if WITH_EDITOR
/** Autoregister abilities with the blueprint debugger in the editor.*/
if (!HasAnyFlags(RF_ClassDefaultObject))
{
UBlueprint* BP = Cast<UBlueprint>(GetClass()->ClassGeneratedBy);
if (BP && (BP->GetWorldBeingDebugged() == nullptr || BP->GetWorldBeingDebugged() == GetWorld()))
{
BP->SetObjectBeingDebugged(this);
}
}
#endif
}
示例8: PostInitProperties
void ANavigationData::PostInitProperties()
{
Super::PostInitProperties();
if (IsPendingKill() == true)
{
return;
}
if (HasAnyFlags(RF_ClassDefaultObject))
{
if (RuntimeGeneration == ERuntimeGenerationType::LegacyGeneration)
{
RuntimeGeneration = bRebuildAtRuntime_DEPRECATED ? ERuntimeGenerationType::Dynamic : ERuntimeGenerationType::Static;
}
}
else
{
bNetLoadOnClient = (*GEngine->NavigationSystemClass != nullptr) && (GEngine->NavigationSystemClass->GetDefaultObject<UNavigationSystem>()->ShouldLoadNavigationOnClient(this));
UWorld* WorldOuter = GetWorld();
if (WorldOuter != NULL && WorldOuter->GetNavigationSystem() != NULL)
{
WorldOuter->GetNavigationSystem()->RequestRegistration(this);
}
RenderingComp = ConstructRenderingComponent();
}
}
示例9: checkf
void UObject::SetLinker( FLinkerLoad* LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting )
{
FLinkerIndexPair Existing = LinkerAnnotation.GetAnnotation(this);
Existing.CheckInvariants();
// Detach from existing linker.
if( Existing.Linker && bShouldDetachExisting )
{
checkf(!HasAnyFlags(RF_NeedLoad|RF_NeedPostLoad), TEXT("Detaching from existing linker for %s while object %s needs loaded"), *Existing.Linker->GetArchiveName(), *GetFullName());
check(Existing.Linker->ExportMap[Existing.LinkerIndex].Object!=NULL);
check(Existing.Linker->ExportMap[Existing.LinkerIndex].Object==this);
Existing.Linker->ExportMap[Existing.LinkerIndex].Object = NULL;
}
if (Existing.Linker == LinkerLoad)
{
bShouldDetachExisting = false; // no change so don't call notify
}
LinkerAnnotation.AddAnnotation(this,FLinkerIndexPair(LinkerLoad,LinkerIndex));
if (bShouldDetachExisting)
{
#if WITH_EDITOR
PostLinkerChange();
#else
UE_CLOG(Existing.Linker && LinkerLoad, LogUObjectLinker, Fatal,
TEXT("It is only legal to change linkers in the editor. Trying to change linker on %s from %s (Existing->LinkerRoot=%s) to %s (LinkerLoad->LinkerRoot=%s)"),
*GetFullName(),
*Existing.Linker->Filename,
*GetNameSafe(Existing.Linker->LinkerRoot),
*LinkerLoad->Filename,
*GetNameSafe(LinkerLoad->LinkerRoot));
#endif
}
}
示例10: Initialize
void UUserWidget::Initialize()
{
// If it's not initialized initialize it, as long as it's not the CDO, we never initialize the CDO.
if ( !bInitialized && !HasAnyFlags(RF_ClassDefaultObject) )
{
bInitialized = true;
// Only do this if this widget is of a blueprint class
UWidgetBlueprintGeneratedClass* BGClass = Cast<UWidgetBlueprintGeneratedClass>(GetClass());
if ( BGClass != nullptr )
{
BGClass->InitializeWidget(this);
}
// Map the named slot bindings to the available slots.
WidgetTree->ForEachWidget([&] (UWidget* Widget) {
if ( UNamedSlot* NamedWidet = Cast<UNamedSlot>(Widget) )
{
for ( FNamedSlotBinding& Binding : NamedSlotBindings )
{
if ( Binding.Content && Binding.Name == NamedWidet->GetFName() )
{
NamedWidet->ClearChildren();
NamedWidet->AddChild(Binding.Content);
return;
}
}
}
});
// TODO Find a way to remove the bindings from the table. Currently they're still needed.
// Clear the named slot bindings table.
//NamedSlotBindings.Reset();
}
}
示例11: Super
UGameplayDebuggerSettings::UGameplayDebuggerSettings(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
if (HasAnyFlags(RF_ClassDefaultObject))
{
/*read base default values from Engine config file. It can be overridden (locally) by Editor settings*/
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView1"), CustomViewNames.GameView1, GEngineIni);
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView2"), CustomViewNames.GameView2, GEngineIni);
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView3"), CustomViewNames.GameView3, GEngineIni);
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView4"), CustomViewNames.GameView4, GEngineIni);
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView5"), CustomViewNames.GameView5, GEngineIni);
GConfig->GetString(TEXT("GameplayDebuggerSettings"), TEXT("NameForGameView5"), CustomViewNames.GameView5, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("OverHead"), OverHead, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("Basic"), Basic, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("BehaviorTree"), BehaviorTree, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("EQS"), EQS, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("EnableEQSOnHUD"), EnableEQSOnHUD, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("Perception"), Perception, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("GameView1"), GameView1, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("GameView2"), GameView2, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("GameView3"), GameView3, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("GameView4"), GameView4, GEngineIni);
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("GameView5"), GameView5, GEngineIni);
#if ADD_LEVEL_EDITOR_EXTENSIONS
bExtendViewportMenu = false;
GConfig->GetBool(TEXT("GameplayDebuggerSettings"), TEXT("bExtendViewportMenu"), bExtendViewportMenu, GEngineIni);
#endif
}
}
示例12: checkInstallComplex
bool VSCheckInstall::checkInstallComplex(bool completeMcf)
{
if (HasAnyFlags(getItemInfo()->getStatus(), UserCore::Item::ItemInfoI::STATUS_INSTALLCOMPLEX) == false)
return false;
auto pItem = getItemInfo();
auto pParent = getParentItemInfo();
if (pParent)
{
if (!pParent->getInstalledModId().isOk() || pParent->getInstalledModId() != pItem->getId())
{
if (completeMcf)
setResult(RES_COMPLETE);
else
setResult(RES_DOWNLOADMISSING);
return true;
}
}
else if (pItem->getInstalledModId().isOk())
{
setResult(RES_COMPLETE);
return true;
}
return false;
}
示例13: GetMutableBodyActor
void UAIPerceptionComponent::CleanUp()
{
if (bCleanedUp == false)
{
UAIPerceptionSystem* AIPerceptionSys = UAIPerceptionSystem::GetCurrent(GetWorld());
if (AIPerceptionSys != nullptr)
{
AIPerceptionSys->UnregisterListener(*this);
AActor* MutableBodyActor = GetMutableBodyActor();
if (MutableBodyActor)
{
AIPerceptionSys->UnregisterSource(*MutableBodyActor);
}
}
if (HasAnyFlags(RF_BeginDestroyed) == false)
{
AActor* Owner = GetOwner();
if (Owner != nullptr)
{
Owner->OnEndPlay.RemoveDynamic(this, &UAIPerceptionComponent::OnOwnerEndPlay);
}
}
bCleanedUp = true;
}
}
示例14: UpdateDrawing
void AEQSTestingPawn::UpdateDrawing()
{
#if WITH_EDITORONLY_DATA
if (HasAnyFlags(RF_ClassDefaultObject) == true)
{
return;
}
UBillboardComponent* SpriteComponent = FindComponentByClass<UBillboardComponent>();
if (SpriteComponent != NULL)
{
SpriteComponent->MarkRenderStateDirty();
}
if (EdRenderComp != NULL && EdRenderComp->bVisible)
{
EdRenderComp->MarkRenderStateDirty();
#if WITH_EDITOR
if (GEditor != NULL)
{
GEditor->RedrawLevelEditingViewports();
}
#endif // WITH_EDITOR
}
#endif // WITH_EDITORONLY_DATA
}
示例15: SaveProfiles
void UDeviceProfileManager::SaveProfiles(bool bSaveToDefaults)
{
if( !HasAnyFlags( RF_ClassDefaultObject ) )
{
if(bSaveToDefaults)
{
for (int32 DeviceProfileIndex = 0; DeviceProfileIndex < Profiles.Num(); ++DeviceProfileIndex)
{
UDeviceProfile* CurrentProfile = CastChecked<UDeviceProfile>(Profiles[DeviceProfileIndex]);
CurrentProfile->UpdateDefaultConfigFile();
}
}
else
{
TArray< FString > DeviceProfileMapArray;
for (int32 DeviceProfileIndex = 0; DeviceProfileIndex < Profiles.Num(); ++DeviceProfileIndex)
{
UDeviceProfile* CurrentProfile = CastChecked<UDeviceProfile>(Profiles[DeviceProfileIndex]);
FString DeviceProfileTypeNameCombo = FString::Printf(TEXT("%s,%s"), *CurrentProfile->GetName(), *CurrentProfile->DeviceType);
DeviceProfileMapArray.Add(DeviceProfileTypeNameCombo);
CurrentProfile->SaveConfig(CPF_Config, *DeviceProfileFileName);
}
GConfig->SetArray(TEXT("DeviceProfiles"), TEXT("DeviceProfileNameAndTypes"), DeviceProfileMapArray, DeviceProfileFileName);
GConfig->Flush(false, DeviceProfileFileName);
}
ManagerUpdatedDelegate.Broadcast();
}
}