本文整理汇总了C++中It函数的典型用法代码示例。如果您正苦于以下问题:C++ It函数的具体用法?C++ It怎么用?C++ It使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了It函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: CloseAllAssetEditors
bool FAssetEditorManager::CloseAllAssetEditors()
{
bool bAllEditorsClosed = true;
for (TMultiMap<IAssetEditorInstance*, UObject*>::TIterator It(OpenedEditors); It; ++It)
{
IAssetEditorInstance* Editor = It.Key();
if (Editor != NULL)
{
if ( !Editor->CloseWindow() )
{
bAllEditorsClosed = false;
}
}
}
return bAllEditorsClosed;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:17,代码来源:AssetEditorManager.cpp
示例2: check
void FShaderPipelineType::Initialize()
{
check(!bInitialized);
TSet<FName> UsedNames;
for (TLinkedList<FShaderPipelineType*>::TIterator It(FShaderPipelineType::GetTypeList()); It; It.Next())
{
const auto* PipelineType = *It;
// Validate stages
for (int32 Index = 0; Index < SF_NumFrequencies; ++Index)
{
check(!PipelineType->AllStages[Index] || PipelineType->AllStages[Index]->GetFrequency() == (EShaderFrequency)Index);
}
auto& Stages = PipelineType->GetStages();
// #todo-rco: Do we allow mix/match of global/mesh/material stages?
// Check all shaders are the same type, start from the top-most stage
const FGlobalShaderType* GlobalType = Stages[0]->GetGlobalShaderType();
const FMeshMaterialShaderType* MeshType = Stages[0]->GetMeshMaterialShaderType();
const FMaterialShaderType* MateriallType = Stages[0]->GetMaterialShaderType();
for (int32 Index = 1; Index < Stages.Num(); ++Index)
{
if (GlobalType)
{
checkf(Stages[Index]->GetGlobalShaderType(), TEXT("Invalid combination of Shader types on Pipeline %s"), PipelineType->Name);
}
else if (MeshType)
{
checkf(Stages[Index]->GetMeshMaterialShaderType(), TEXT("Invalid combination of Shader types on Pipeline %s"), PipelineType->Name);
}
else if (MateriallType)
{
checkf(Stages[Index]->GetMaterialShaderType(), TEXT("Invalid combination of Shader types on Pipeline %s"), PipelineType->Name);
}
}
FName PipelineName = PipelineType->GetFName();
checkf(!UsedNames.Contains(PipelineName), TEXT("Two Pipelines with the same name %s found!"), PipelineType->Name);
UsedNames.Add(PipelineName);
}
bInitialized = true;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:46,代码来源:Shader.cpp
示例3: GetOutdatedTypes
void FShaderType::GetOutdatedTypes(TArray<FShaderType*>& OutdatedShaderTypes, TArray<const FVertexFactoryType*>& OutdatedFactoryTypes)
{
for(TLinkedList<FShaderType*>::TIterator It(GetTypeList()); It; It.Next())
{
FShaderType* Type = *It;
Type->GetOutdatedCurrentType(OutdatedShaderTypes, OutdatedFactoryTypes);
}
for (int32 TypeIndex = 0; TypeIndex < OutdatedShaderTypes.Num(); TypeIndex++)
{
UE_LOG(LogShaders, Warning, TEXT(" Recompiling %s"), OutdatedShaderTypes[TypeIndex]->GetName());
}
for (int32 TypeIndex = 0; TypeIndex < OutdatedFactoryTypes.Num(); TypeIndex++)
{
UE_LOG(LogShaders, Warning, TEXT(" Recompiling %s"), OutdatedFactoryTypes[TypeIndex]->GetName());
}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:17,代码来源:Shader.cpp
示例4:
TArray<const FShaderPipelineType*> FShaderPipelineType::GetShaderPipelineTypesByFilename(const TCHAR* Filename)
{
TArray<const FShaderPipelineType*> PipelineTypes;
for (TLinkedList<FShaderPipelineType*>::TIterator It(FShaderPipelineType::GetTypeList()); It; It.Next())
{
auto* PipelineType = *It;
for (auto* ShaderType : PipelineType->Stages)
{
if (FPlatformString::Strcmp(Filename, ShaderType->GetShaderFilename()) == 0)
{
PipelineTypes.AddUnique(PipelineType);
break;
}
}
}
return PipelineTypes;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:17,代码来源:Shader.cpp
示例5: GetDefaultPawnClassForController
AActor* AGameModeBase::ChoosePlayerStart_Implementation(AController* Player)
{
// Choose a player start
APlayerStart* FoundPlayerStart = nullptr;
UClass* PawnClass = GetDefaultPawnClassForController(Player);
APawn* PawnToFit = PawnClass ? PawnClass->GetDefaultObject<APawn>() : nullptr;
TArray<APlayerStart*> UnOccupiedStartPoints;
TArray<APlayerStart*> OccupiedStartPoints;
for (TActorIterator<APlayerStart> It(GetWorld()); It; ++It)
{
APlayerStart* PlayerStart = *It;
if (PlayerStart->IsA<APlayerStartPIE>())
{
// Always prefer the first "Play from Here" PlayerStart, if we find one while in PIE mode
FoundPlayerStart = PlayerStart;
break;
}
else
{
FVector ActorLocation = PlayerStart->GetActorLocation();
const FRotator ActorRotation = PlayerStart->GetActorRotation();
if (!GetWorld()->EncroachingBlockingGeometry(PawnToFit, ActorLocation, ActorRotation))
{
UnOccupiedStartPoints.Add(PlayerStart);
}
else if (GetWorld()->FindTeleportSpot(PawnToFit, ActorLocation, ActorRotation))
{
OccupiedStartPoints.Add(PlayerStart);
}
}
}
if (FoundPlayerStart == nullptr)
{
if (UnOccupiedStartPoints.Num() > 0)
{
FoundPlayerStart = UnOccupiedStartPoints[FMath::RandRange(0, UnOccupiedStartPoints.Num() - 1)];
}
else if (OccupiedStartPoints.Num() > 0)
{
FoundPlayerStart = OccupiedStartPoints[FMath::RandRange(0, OccupiedStartPoints.Num() - 1)];
}
}
return FoundPlayerStart;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:45,代码来源:GameModeBase.cpp
示例6: ASSERT
///////////////////////////////////////////////////////////////////////////////
// Descripcion:
// - Guarda los items almacenados en disco.
// Parametros:
// - hFile. Handle al fichero donde almacenar.
// - udOffset. Offset donde depositar la info.
// Devuelve:
// Notas:
// - No se usara un metodo que recorra previamente el vector de slots para
// hallar el numero de items equipados por motivos de optimizacion.
///////////////////////////////////////////////////////////////////////////////
void
CEquipmentSlots::Save(const FileDefs::FileHandle& hFile,
dword& udOffset)
{
// SOLO si parametros correctos
ASSERT(hFile);
// Se guarda el numero de slots de equipamiento con datos de forma temporal
iCFileSystem* const pFileSys = SYSEngine::GetFileSystem();
ASSERT(pFileSys);
word uwNumItems = 0;
const dword udNumItemsOffset = udOffset;
udOffset += pFileSys->Write(hFile, udOffset, (sbyte *)(&uwNumItems), sizeof(word));
// Se itera por la lista de items guardandolos
iCWorld* const pWorld = SYSEngine::GetWorld();
ASSERT(pWorld);
byte ubSlotIt = 0;
EquipSlotsVectorIt It(m_EquipSlotsInfo.EquipSlots.begin());
for (; It != m_EquipSlotsInfo.EquipSlots.end(); ++It, ++ubSlotIt) {
// ¿Slot con informacion?
if (*It) {
// Se guardan datos
// Identificador slot
const RulesDefs::eIDEquipmentSlot Slot = RulesDefs::eIDEquipmentSlot(ubSlotIt);
udOffset += pFileSys->Write(hFile,
udOffset,
(sbyte *)(&Slot),
sizeof(RulesDefs::eIDEquipmentSlot));
// Datos del item equipado
CItem* const pItem = pWorld->GetItem(*It);
ASSERT(pItem);
pItem->Save(hFile, udOffset);
// Se incrementa contador
++uwNumItems;
}
}
// Se guarda el valor final del numero de slots de equipamiento con datos
if (uwNumItems > 0) {
pFileSys->Write(hFile, udNumItemsOffset, (sbyte *)(&uwNumItems), sizeof(word));
}
}
开发者ID:Frodrig,项目名称:CrisolEngine,代码行数:56,代码来源:CEquipmentSlots.cpp
示例7: FComponentPropertySkipper
void UActorComponent::DetermineUCSModifiedProperties()
{
UCSModifiedProperties.Empty();
if (CreationMethod == EComponentCreationMethod::SimpleConstructionScript)
{
class FComponentPropertySkipper : public FArchive
{
public:
FComponentPropertySkipper()
: FArchive()
{
ArIsSaving = true;
}
virtual bool ShouldSkipProperty(const UProperty* InProperty) const override
{
return ( InProperty->HasAnyPropertyFlags(CPF_Transient | CPF_ContainsInstancedReference | CPF_InstancedReference)
|| !InProperty->HasAnyPropertyFlags(CPF_Edit | CPF_Interp));
}
} PropertySkipper;
UClass* ComponentClass = GetClass();
UObject* ComponentArchetype = GetArchetype();
for (TFieldIterator<UProperty> It(ComponentClass); It; ++It)
{
UProperty* Property = *It;
if( Property->ShouldSerializeValue(PropertySkipper) )
{
for( int32 Idx=0; Idx<Property->ArrayDim; Idx++ )
{
uint8* DataPtr = Property->ContainerPtrToValuePtr <uint8>((uint8*)this, Idx);
uint8* DefaultValue = Property->ContainerPtrToValuePtrForDefaults<uint8>(ComponentClass, (uint8*)ComponentArchetype, Idx);
if (!Property->Identical( DataPtr, DefaultValue))
{
UCSModifiedProperties.Add(FSimpleMemberReference());
FMemberReference::FillSimpleMemberReference<UProperty>(Property, UCSModifiedProperties.Last());
break;
}
}
}
}
}
}
开发者ID:mysheng8,项目名称:UnrealEngine,代码行数:45,代码来源:ActorComponent.cpp
示例8: UnMarkAllObjects
void UnMarkAllObjects(EObjectMark Marks)
{
if (Marks == OBJECTMARK_ALLMARKS)
{
MarkAnnotation.RemoveAllAnnotations();
}
else
{
const TMap<const UObjectBase *, FObjectMark>& Map = MarkAnnotation.GetAnnotationMap();
for (TMap<const UObjectBase *, FObjectMark>::TConstIterator It(Map); It; ++It)
{
if(It.Value().Marks & Marks)
{
MarkAnnotation.AddAnnotation((UObject*)It.Key(),FObjectMark(EObjectMark(It.Value().Marks & ~Marks)));
}
}
}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:18,代码来源:UObjectMarks.cpp
示例9: FindExpiredSessions
void FSessionManager::FindExpiredSessions( const FDateTime& Now )
{
bool Dirty = false;
for (TMap<FGuid, TSharedPtr<FSessionInfo> >::TIterator It(Sessions); It; ++It)
{
if (Now > It.Value()->GetLastUpdateTime() + FTimespan::FromSeconds(10.0))
{
It.RemoveCurrent();
Dirty = true;
}
}
if (Dirty)
{
SessionsUpdatedDelegate.Broadcast();
}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:18,代码来源:SessionManager.cpp
示例10: ASSERT
///////////////////////////////////////////////////////////////////////////////
// Descripcion:
// - Metodo encargado de recorrer todos los items asociados a selectores para
// enviarles la notificacion acerca de si el item esta o no visible.
// Parametros:
// - bVisible.
// Devuelve:
// Notas:
// - Este metodo sera utilizado como metodo de apoyo en las operaciones
// de scroll.
///////////////////////////////////////////////////////////////////////////////
void
CGUIWBaseItemSelector::SetItemsInSelectorsVisibles(const bool bVisible)
{
// SOLO si instancia inicializada
ASSERT(IsInitOk());
// Procede a notificar la visibilidad de los items
VisualizableItemListIt It(m_InterfazInfo.VisualizableItems.begin());
for (; It != m_InterfazInfo.VisualizableItems.end(); ++It) {
// ¿Tiene item asociado?
if ((*It)->hItem) {
// Si, se manda la notificacion que proceda
CItem* const pItem = SYSEngine::GetWorld()->GetItem((*It)->hItem);
ASSERT(pItem);
pItem->VisibleInScreen(bVisible);
}
}
}
开发者ID:Frodrig,项目名称:CrisolEngine,代码行数:29,代码来源:CGUIWBaseItemSelector.cpp
示例11: GetOpponents
/** Gets the closest enemy to a world location that can be pursued */
AMagicBattleSoccerCharacter* AMagicBattleSoccerGameState::GetClosestOpponentToLocation(AMagicBattleSoccerCharacter* Player, FVector Location)
{
const TArray<AMagicBattleSoccerCharacter*>& Opponents = GetOpponents(Cast<AMagicBattleSoccerPlayerState>(Player->PlayerState));
AMagicBattleSoccerGameMode* GameMode = Cast<AMagicBattleSoccerGameMode>(GetWorld()->GetAuthGameMode());
AMagicBattleSoccerCharacter* ClosestOpponent = nullptr;
float ClosestOpponentDistance = 0.0f;
for (TArray<AMagicBattleSoccerCharacter*>::TConstIterator It(Opponents.CreateConstIterator()); It; ++It)
{
float d = FVector::DistSquared((*It)->GetActorLocation(), Location);
if (nullptr == ClosestOpponent || d < ClosestOpponentDistance && GameMode->CanBePursued(*It))
{
ClosestOpponent = *It;
ClosestOpponentDistance = d;
}
}
return ClosestOpponent;
}
开发者ID:Gamieon,项目名称:UBattleSoccerPrototype,代码行数:19,代码来源:MagicBattleSoccerGameState.cpp
示例12: WriteRow
bool FDataTableExporterJSON::WriteRow(const void* InRowData)
{
if (!DataTable->RowStruct)
{
return false;
}
for (TFieldIterator<UProperty> It(DataTable->RowStruct); It; ++It)
{
UProperty* BaseProp = *It;
check(BaseProp);
const void* Data = BaseProp->ContainerPtrToValuePtr<void>(InRowData, 0);
WriteStructEntry(InRowData, BaseProp, Data);
}
return true;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:18,代码来源:DataTableJSON.cpp
示例13: HandleRemoveInterceptor
void FMessageRouter::HandleRemoveInterceptor( IMessageInterceptorRef Interceptor, FName MessageType )
{
if (MessageType == NAME_All)
{
for (TMap<FName, TArray<IMessageInterceptorPtr> >::TIterator It(ActiveInterceptors); It; ++It)
{
TArray<IMessageInterceptorPtr>& Interceptors = It.Value();
Interceptors.Remove(Interceptor);
}
}
else
{
TArray<IMessageInterceptorPtr>& Interceptors = ActiveInterceptors.FindOrAdd(MessageType);
Interceptors.Remove(Interceptor);
}
Tracer->TraceRemovedInterceptor(Interceptor, MessageType);
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:18,代码来源:MessageRouter.cpp
示例14: It
///////////////////////////////////////////////////////////////////////////////
// Descripcion:
// - Elimina la alineacion de todas aquellas entidades que se hallen alineadas
// en el map recibido.
// - Al eliminar alineacion, tambien se establecera orden nula.
// Parametros:
// - Map. Map de alineacion
// Devuelve:
// Notas:
///////////////////////////////////////////////////////////////////////////////
void
CCombatSystem::RemoveAlingment(AlingmentMap& Map)
{
// Procede a eliminar contenido de alineacion
AlingmentMapIt It(Map.begin());
while (It != Map.end()) {
// Se desvincula modulo como observer de la criatura
CCriature* const pCriature = m_pWorld->GetCriature(It->first);
if (pCriature) {
pCriature->RemoveObserver(this);
pCriature->m_ActOrder = CCriature::AO_NONE;
}
// Se borra nodo en memoria y map
delete It->second;
It = Map.erase(It);
}
}
开发者ID:Frodrig,项目名称:CrisolEngine,代码行数:28,代码来源:CCombatSystem.cpp
示例15: Tick
void FJavascriptUMGViewportClient::Tick(float InDeltaTime)
{
if (!GIntraFrameDebuggingGameThread)
{
// Begin Play
if (!GameScene->GetWorld()->bBegunPlay)
{
for (FActorIterator It(GameScene->GetWorld()); It; ++It)
{
It->BeginPlay();
}
GameScene->GetWorld()->bBegunPlay = true;
}
// Tick
GameScene->GetWorld()->Tick(LEVELTICK_All, InDeltaTime);
}
}
开发者ID:Jeezymang,项目名称:Unreal.js-core,代码行数:18,代码来源:JavascriptGameViewport.cpp
示例16: DefaultUserDefinedStructs
void FUserDefinedStructureCompilerUtils::DefaultUserDefinedStructs(UObject* Object, FCompilerResultsLog& MessageLog)
{
if (Object && FStructureEditorUtils::UserDefinedStructEnabled())
{
for (TFieldIterator<UProperty> It(Object->GetClass()); It; ++It)
{
if (const UProperty* Property = (*It))
{
uint8* Mem = Property->ContainerPtrToValuePtr<uint8>(Object);
if (!FStructureEditorUtils::Fill_MakeStructureDefaultValue(Property, Mem))
{
MessageLog.Warning(*FString::Printf(*LOCTEXT("MakeStructureDefaultValue_Error", "MakeStructureDefaultValue parsing error. Object: %s, Property: %s").ToString(),
*Object->GetName(), *Property->GetName()));
}
}
}
}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:18,代码来源:UserDefinedStructureCompilerUtils.cpp
示例17: RemoveExpiredTextureResources
void FDynamicResourceMap::RemoveExpiredTextureResources()
{
// We attempt to purge every 10Mb of accumulated textures.
static const uint64 PurgeAfterAddingNewBytes = 1024 * 1024 * 10; // 10Mb
if ( TextureMemorySincePurge >= PurgeAfterAddingNewBytes )
{
for ( TextureResourceMap::TIterator It(TextureMap); It; ++It )
{
if ( It.Key().IsStale() )
{
It.RemoveCurrent();
}
}
TextureMemorySincePurge = 0;
}
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:18,代码来源:SlateRHIResourceManager.cpp
示例18: UE_LOG
void FStreamableManager::OnPostGarbageCollect()
{
// now lets make sure it actually worked
for (TStreamableMap::TIterator It(StreamableItems); It; ++It)
{
FStreamable* Existing = It.Value();
if (Existing->bAsyncUnloadRequestOutstanding && Existing->RelatedRequests.Num() == 0)
{
if (Existing->WeakTarget.Get())
{
// This is reasonable if someone else has made a hard reference to it
UE_LOG(LogStreamableManager, Verbose, TEXT("Failed to unload %s."), *It.Key().ToString());
}
delete Existing;
It.RemoveCurrent();
}
}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:18,代码来源:StreamableManager.cpp
示例19: OnPostGarbageCollect
void UUnrealEdEngine::OnPostGarbageCollect()
{
// Refresh Editor browsers after GC in case objects where removed. Note that if the user is currently
// playing in a PIE level, we don't want to interrupt performance by refreshing the Generic Browser window.
if( GIsEditor && !GIsPlayInEditorWorld )
{
FEditorDelegates::RefreshAllBrowsers.Broadcast();
}
// Clean up any GCed packages in the PackageToNotifyState
for( TMap<TWeakObjectPtr<UPackage>,uint8>::TIterator It(PackageToNotifyState); It; ++It )
{
if( It.Key().IsValid() == false )
{
It.RemoveCurrent();
}
}
}
开发者ID:johndpope,项目名称:UE4,代码行数:18,代码来源:UnrealEdEngine.cpp
示例20:
bool FKeyHandleMap::operator==(const FKeyHandleMap& Other) const
{
if (KeyHandlesToIndices.Num() != Other.KeyHandlesToIndices.Num())
{
return false;
}
for (TMap<FKeyHandle, int32>::TConstIterator It(KeyHandlesToIndices); It; ++It)
{
int32 const* OtherVal = Other.KeyHandlesToIndices.Find(It.Key());
if (!OtherVal || *OtherVal != It.Value() )
{
return false;
}
}
return true;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:18,代码来源:CurveBase.cpp
注:本文中的It函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论