本文整理汇总了C++中UClass::HasAllClassFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ UClass::HasAllClassFlags方法的具体用法?C++ UClass::HasAllClassFlags怎么用?C++ UClass::HasAllClassFlags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UClass
的用法示例。
在下文中一共展示了UClass::HasAllClassFlags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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?"));
}
}
}
示例2: getClassMap
unreal::UIntPtr unreal::helpers::ClassMap_obj::wrap(unreal::UIntPtr inUObject) {
if (inUObject == 0) return 0;
UObject *obj = (UObject *) inUObject;
UClass *cls = obj->GetClass();
auto& map = getClassMap();
while (cls != nullptr) {
if (cls->HasAllClassFlags(CLASS_Native)) {
auto it = map.find(cls);
if (it != map.end()) {
return (it->second)(inUObject);
}
}
cls = cls->GetSuperClass();
}
UE_LOG(LogTemp,Fatal,TEXT("No haxe wrapper was found for the uobject from class %s nor from any of its superclasses"), *obj->GetClass()->GetName());
// won't get here
return 0;
}