You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- This was caused because of how MSVC resolves include paths (Class.h was ambiguous) [CL 2258158 by Mike Fricker in Main branch]
106 lines
2.3 KiB
C++
106 lines
2.3 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UnrealHeaderTool.h"
|
|
#include "ParserClass.h"
|
|
#include "Classes.h"
|
|
#include "ClassMaps.h"
|
|
|
|
bool FClass::Inherits(const FClass* SuspectBase) const
|
|
{
|
|
return IsChildOf(SuspectBase);
|
|
}
|
|
|
|
FString FClass::GetNameWithPrefix(EEnforceInterfacePrefix::Type EnforceInterfacePrefix) const
|
|
{
|
|
const TCHAR* Prefix = 0;
|
|
|
|
if (HasAnyClassFlags(CLASS_Interface))
|
|
{
|
|
// Grab the expected prefix for interfaces (U on the first one, I on the second one)
|
|
switch (EnforceInterfacePrefix)
|
|
{
|
|
case EEnforceInterfacePrefix::None:
|
|
// For old-style files: "I" for interfaces, unless it's the actual "Interface" class, which gets "U"
|
|
if (GetFName() == NAME_Interface)
|
|
{
|
|
Prefix = TEXT("U");
|
|
}
|
|
else
|
|
{
|
|
Prefix = TEXT("I");
|
|
}
|
|
break;
|
|
|
|
case EEnforceInterfacePrefix::I:
|
|
Prefix = TEXT("I");
|
|
break;
|
|
|
|
case EEnforceInterfacePrefix::U:
|
|
Prefix = TEXT("U");
|
|
break;
|
|
|
|
default:
|
|
check(false);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Get the expected class name with prefix
|
|
Prefix = GetPrefixCPP();
|
|
}
|
|
|
|
return FString::Printf(TEXT("%s%s"), Prefix, *GetName());
|
|
}
|
|
|
|
FClass* FClass::GetSuperClass() const
|
|
{
|
|
return static_cast<FClass*>(static_cast<const UClass*>(this)->GetSuperClass());
|
|
}
|
|
|
|
FClass* FClass::GetClassWithin() const
|
|
{
|
|
return (FClass*)ClassWithin;
|
|
}
|
|
|
|
TArray<FName> FClass::GetDependentNames() const
|
|
{
|
|
TArray<FName> Result;
|
|
|
|
for (auto Name : *GClassDependentOnMap.FindOrAdd(const_cast<FClass*>(this)))
|
|
{
|
|
Result.Add(Name);
|
|
}
|
|
|
|
return Result;
|
|
}
|
|
|
|
TArray<FClass*> FClass::GetInterfaceTypes() const
|
|
{
|
|
TArray<FClass*> Result;
|
|
for (auto& i : Interfaces)
|
|
{
|
|
Result.Add((FClass*)i.Class);
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
void FClass::GetHideCategories(TArray<FString>& OutHideCategories) const
|
|
{
|
|
static const FName NAME_HideCategories(TEXT("HideCategories"));
|
|
if (HasMetaData(NAME_HideCategories))
|
|
{
|
|
const FString& HideCategories = GetMetaData(NAME_HideCategories);
|
|
HideCategories.ParseIntoArray(&OutHideCategories, TEXT(" "), true);
|
|
}
|
|
}
|
|
|
|
void FClass::GetShowCategories(TArray<FString>& OutShowCategories) const
|
|
{
|
|
static const FName NAME_ShowCategories(TEXT("ShowCategories"));
|
|
if (HasMetaData(NAME_ShowCategories))
|
|
{
|
|
const FString& ShowCategories = GetMetaData(NAME_ShowCategories);
|
|
ShowCategories.ParseIntoArray(&OutShowCategories, TEXT(" "), true);
|
|
}
|
|
}
|