Esempio n. 1
0
void NUTUtil::GetUnitTestClassDefList(TArray<UUnitTest*>& OutUnitTestClassDefaults)
{
	for (TObjectIterator<UClass> It; It; ++It)
	{
		if (It->IsChildOf(UUnitTest::StaticClass()) && *It != UUnitTest::StaticClass() && *It != UClientUnitTest::StaticClass())
		{
			UUnitTest* CurDefault = Cast<UUnitTest>(It->GetDefaultObject());

			if (CurDefault != NULL)
			{
				OutUnitTestClassDefaults.Add(CurDefault);
			}
		}
	}
}
/**
 * Loads all of the code packages completely (for script classes). Then iterates
 * through the UClass-es finding all commandlets and dumping information on them
 */
static void ListAllCommandlets(void)
{
	warnf(TEXT("%-40s    %s"),TEXT("Commandlet"),TEXT("Description"));
	warnf(TEXT("--------------------------------------------------------------------------------"));
	// Now iterate through all UClass-es looking for commandlets
	for (TObjectIterator<UClass> It; It; ++It)
	{
		UCommandlet* DefObject = Cast<UCommandlet>(It->GetDefaultObject());
		if (DefObject != NULL)
		{
			// Ignore commandlets that can't be created
			if (It->HasAnyClassFlags(CLASS_Abstract) == FALSE)
			{
				const FString& Name = GetCommandletName(DefObject);
				warnf(TEXT("%-40s - %s"),*Name,*DefObject->HelpDescription);
			}
		}
	}
}