本文整理汇总了C++中UClass::GetFullName方法的典型用法代码示例。如果您正苦于以下问题:C++ UClass::GetFullName方法的具体用法?C++ UClass::GetFullName怎么用?C++ UClass::GetFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UClass
的用法示例。
在下文中一共展示了UClass::GetFullName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImportText_Internal
const TCHAR* UClassProperty::ImportText_Internal( const TCHAR* Buffer, void* Data, int32 PortFlags, UObject* Parent, FOutputDevice* ErrorText ) const
{
const TCHAR* Result = UObjectProperty::ImportText_Internal( Buffer, Data, PortFlags, Parent, ErrorText );
if( Result )
{
// Validate metaclass.
UClass* C = (UClass*)GetObjectPropertyValue(Data);
if (C && (!dynamic_cast<UClass*>(C) || !C->IsChildOf(MetaClass)))
{
// the object we imported doesn't implement our interface class
ErrorText->Logf(TEXT("Invalid object '%s' specified for property '%s'"), *C->GetFullName(), *GetName());
SetObjectPropertyValue(Data, NULL);
Result = NULL;
}
}
return Result;
}
示例2: CompareClasses
bool FContentComparisonHelper::CompareClasses(const FString& InBaseClassName, const TArray<FString>& InBaseClassesToIgnore, int32 InRecursionDepth)
{
TMap<FString,TArray<FContentComparisonAssetInfo> > ClassToAssetsMap;
UClass* TheClass = (UClass*)StaticFindObject(UClass::StaticClass(), ANY_PACKAGE, *InBaseClassName, true);
if (TheClass != NULL)
{
TArray<UClass*> IgnoreBaseClasses;
for (int32 IgnoreIdx = 0; IgnoreIdx < InBaseClassesToIgnore.Num(); IgnoreIdx++)
{
UClass* IgnoreClass = (UClass*)StaticFindObject(UClass::StaticClass(), ANY_PACKAGE, *(InBaseClassesToIgnore[IgnoreIdx]), true);
if (IgnoreClass != NULL)
{
IgnoreBaseClasses.Add(IgnoreClass);
}
}
for( TObjectIterator<UClass> It; It; ++It )
{
UClass* TheAssetClass = *It;
if ((TheAssetClass->IsChildOf(TheClass) == true) &&
(TheAssetClass->HasAnyClassFlags(CLASS_Abstract) == false))
{
bool bSkipIt = false;
for (int32 CheckIdx = 0; CheckIdx < IgnoreBaseClasses.Num(); CheckIdx++)
{
UClass* CheckClass = IgnoreBaseClasses[CheckIdx];
if (TheAssetClass->IsChildOf(CheckClass) == true)
{
// UE_LOG(LogEngineUtils, Warning, TEXT("Skipping class derived from other content comparison class..."));
// UE_LOG(LogEngineUtils, Warning, TEXT("\t%s derived from %s"), *TheAssetClass->GetFullName(), *CheckClass->GetFullName());
bSkipIt = true;
}
}
if (bSkipIt == false)
{
TArray<FContentComparisonAssetInfo>* AssetList = ClassToAssetsMap.Find(TheAssetClass->GetFullName());
if (AssetList == NULL)
{
TArray<FContentComparisonAssetInfo> TempAssetList;
ClassToAssetsMap.Add(TheAssetClass->GetFullName(), TempAssetList);
AssetList = ClassToAssetsMap.Find(TheAssetClass->GetFullName());
}
check(AssetList);
// Serialize object with reference collector.
const int32 MaxRecursionDepth = 6;
InRecursionDepth = FMath::Clamp<int32>(InRecursionDepth, 1, MaxRecursionDepth);
TMap<UObject*,bool> RecursivelyGatheredReferences;
RecursiveObjectCollection(TheAssetClass, 0, InRecursionDepth, RecursivelyGatheredReferences);
// Add them to the asset list
for (TMap<UObject*,bool>::TIterator GatheredIt(RecursivelyGatheredReferences); GatheredIt; ++GatheredIt)
{
UObject* Object = GatheredIt.Key();
if (Object)
{
bool bAddIt = true;
if (ReferenceClassesOfInterest.Num() > 0)
{
FString CheckClassName = Object->GetClass()->GetName();
if (ReferenceClassesOfInterest.Find(CheckClassName) == NULL)
{
bAddIt = false;
}
}
if (bAddIt == true)
{
int32 NewIndex = AssetList->AddZeroed();
FContentComparisonAssetInfo& Info = (*AssetList)[NewIndex];
Info.AssetName = Object->GetFullName();
Info.ResourceSize = Object->GetResourceSize(EResourceSizeMode::Inclusive);
}
}
}
}
}
}
}
else
{
UE_LOG(LogEngineUtils, Warning, TEXT("Failed to find class: %s"), *InBaseClassName);
return false;
}
#if 0
// Log them all out
UE_LOG(LogEngineUtils, Log, TEXT("CompareClasses on %s"), *InBaseClassName);
for (TMap<FString,TArray<FContentComparisonAssetInfo>>::TIterator It(ClassToAssetsMap); It; ++It)
{
FString ClassName = It.Key();
TArray<FContentComparisonAssetInfo>& AssetList = It.Value();
UE_LOG(LogEngineUtils, Log, TEXT("\t%s"), *ClassName);
for (int32 AssetIdx = 0; AssetIdx < AssetList.Num(); AssetIdx++)
{
FContentComparisonAssetInfo& Info = AssetList(AssetIdx);
UE_LOG(LogEngineUtils, Log, TEXT("\t\t%s,%f"), *(Info.AssetName), Info.ResourceSize/1024.0f);
}
//.........这里部分代码省略.........