本文整理汇总了C++中FArchive::IsModifyingWeakAndStrongReferences方法的典型用法代码示例。如果您正苦于以下问题:C++ FArchive::IsModifyingWeakAndStrongReferences方法的具体用法?C++ FArchive::IsModifyingWeakAndStrongReferences怎么用?C++ FArchive::IsModifyingWeakAndStrongReferences使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FArchive
的用法示例。
在下文中一共展示了FArchive::IsModifyingWeakAndStrongReferences方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Serialize
bool FEdGraphPinType::Serialize(FArchive& Ar)
{
if (Ar.UE4Ver() < VER_UE4_EDGRAPHPINTYPE_SERIALIZATION)
{
return false;
}
Ar << PinCategory;
Ar << PinSubCategory;
// See: FArchive& operator<<( FArchive& Ar, FWeakObjectPtr& WeakObjectPtr )
// The PinSubCategoryObject should be serialized into the package.
if(!Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() || Ar.IsPersistent())
{
UObject* Object = PinSubCategoryObject.Get(true);
Ar << Object;
if( Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences() )
{
PinSubCategoryObject = Object;
}
}
Ar << bIsArray;
Ar << bIsReference;
Ar << bIsWeakPointer;
if (Ar.UE4Ver() >= VER_UE4_MEMBERREFERENCE_IN_PINTYPE)
{
Ar << PinSubCategoryMemberReference;
}
else if (Ar.IsLoading() && Ar.IsPersistent())
{
if ((PinCategory == TEXT("delegate")) || (PinCategory == TEXT("mcdelegate")))
{
if (const UFunction* Signature = Cast<const UFunction>(PinSubCategoryObject.Get()))
{
PinSubCategoryMemberReference.MemberName = Signature->GetFName();
PinSubCategoryMemberReference.MemberParent = Signature->GetOwnerClass();
PinSubCategoryObject = NULL;
}
else
{
ensure(true);
}
}
}
if (Ar.UE4Ver() >= VER_UE4_SERIALIZE_PINTYPE_CONST)
{
Ar << bIsConst;
}
else if (Ar.IsLoading())
{
bIsConst = false;
}
return true;
}
示例2: SerializeItem
void ULazyObjectProperty::SerializeItem( FArchive& Ar, void* Value, void const* Defaults ) const
{
// We never serialize our reference while the garbage collector is harvesting references
// to objects, because we don't want lazy pointers to keep objects from being garbage collected
if( !Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() )
{
UObject* ObjectValue = GetObjectPropertyValue(Value);
Ar << *(FLazyObjectPtr*)Value;
if ((Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences()) && ObjectValue != GetObjectPropertyValue(Value))
{
CheckValidObject(Value);
}
}
}
示例3: SerializeItem
void UAssetObjectProperty::SerializeItem( FArchive& Ar, void* Value, int32 MaxReadBytes, void const* Defaults ) const
{
// We never serialize our reference while the garbage collector is harvesting references
// to objects, because we don't want asset pointers to keep objects from being garbage collected
if( !Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() )
{
FAssetPtr OldValue = *(FAssetPtr*)Value;
Ar << *(FAssetPtr*)Value;
if (Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences())
{
if (OldValue.GetUniqueID() != ((FAssetPtr*)Value)->GetUniqueID())
{
CheckValidObject(Value);
}
}
}
}
示例4: SerializeItem
void UWeakObjectProperty::SerializeItem( FArchive& Ar, void* Value, int32 MaxReadBytes, void const* Defaults ) const
{
UObject* ObjectValue = GetObjectPropertyValue(Value);
Ar << *(FWeakObjectPtr*)Value;
if ((Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences()) && ObjectValue != GetObjectPropertyValue(Value))
{
CheckValidObject(Value);
}
}
示例5: SerializeItem
void UAssetObjectProperty::SerializeItem( FArchive& Ar, void* Value, void const* Defaults ) const
{
// We never serialize our reference while the garbage collector is harvesting references
// to objects, because we don't want asset pointers to keep objects from being garbage collected
// Allow persistent archives so they can keep track of string references. (e.g. FArchiveSaveTagImports)
if( !Ar.IsObjectReferenceCollector() || Ar.IsModifyingWeakAndStrongReferences() || Ar.IsPersistent() )
{
FAssetPtr OldValue = *(FAssetPtr*)Value;
Ar << *(FAssetPtr*)Value;
if (Ar.IsLoading() || Ar.IsModifyingWeakAndStrongReferences())
{
if (OldValue.GetUniqueID() != ((FAssetPtr*)Value)->GetUniqueID())
{
CheckValidObject(Value);
}
}
}
}