engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
FReferenceCollector类 参考abstract

FReferenceCollector. 更多...

#include <UObjectGlobals.h>

+ 类 FReferenceCollector 继承关系图:

Public 成员函数

template<class UObjectType >
void AddReferencedObject (const UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds const object reference, this reference can still be nulled out if forcefully collected. 更多...
 
template<class UObjectType >
void AddReferencedObject (UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds object reference. 更多...
 
template<class UObjectType >
void AddReferencedObjects (TArray< const UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds references to an array of const objects, these objects can still be nulled out if forcefully collected. 更多...
 
template<class UObjectType >
void AddReferencedObjects (TArray< UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds references to an array of objects. 更多...
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType *, ValueType, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds references to a map of objects. 更多...
 
template<class UObjectType >
void AddReferencedObjects (TSet< UObjectType * > &ObjectSet, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 Adds references to a set of objects. 更多...
 
virtual void AllowEliminatingReferences (bool bAllow)
 Allows reference elimination by this collector.
 
FReferenceCollectorArchive & GetInternalPersistentFrameReferenceCollectorArchive ()
 INTERNAL USE ONLY: returns the persistent frame collector archive associated with this collector. 更多...
 
virtual class FProperty * GetSerializedProperty () const
 Gets the property that is currently being serialized
 
FReferenceCollectorArchive & GetVerySlowReferenceCollectorArchive ()
 Returns the collector archive associated with this collector. 更多...
 
virtual bool IsIgnoringArchetypeRef () const =0
 If true archetype references should not be added to this collector.
 
virtual bool IsIgnoringTransient () const =0
 If true transient objects should not be added to this collector.
 
virtual bool MarkWeakObjectReferenceForClearing (UObject **WeakReference)
 Marks a specific object reference as a weak reference. 更多...
 
virtual void SetSerializedProperty (class FProperty *Inproperty)
 Sets the property that is currently being serialized
 

Protected 成员函数

virtual void HandleObjectReference (UObject *&InObject, const UObject *InReferencingObject, const FProperty *InReferencingProperty)=0
 Handle object reference. 更多...
 
virtual void HandleObjectReferences (UObject **InObjects, const int32 ObjectNum, const UObject *InReferencingObject, const FProperty *InReferencingProperty)
 Handle multiple object references. 更多...
 

详细描述

FReferenceCollector.

Helper class used by the garbage collector to collect object references.

成员函数说明

◆ AddReferencedObject() [1/2]

template<class UObjectType >
void FReferenceCollector::AddReferencedObject ( const UObjectType *&  Object,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds const object reference, this reference can still be nulled out if forcefully collected.

参数
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ AddReferencedObject() [2/2]

template<class UObjectType >
void FReferenceCollector::AddReferencedObject ( UObjectType *&  Object,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds object reference.

参数
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ AddReferencedObjects() [1/4]

template<class UObjectType >
void FReferenceCollector::AddReferencedObjects ( TArray< const UObjectType * > &  ObjectArray,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds references to an array of const objects, these objects can still be nulled out if forcefully collected.

参数
ObjectArrayReferenced objects array.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ AddReferencedObjects() [2/4]

template<class UObjectType >
void FReferenceCollector::AddReferencedObjects ( TArray< UObjectType * > &  ObjectArray,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds references to an array of objects.

参数
ObjectArrayReferenced objects array.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ AddReferencedObjects() [3/4]

template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void FReferenceCollector::AddReferencedObjects ( TMapBase< KeyType *, ValueType, Allocator, KeyFuncs > &  Map,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds references to a map of objects.

参数
ObjectArrayReferenced objects map.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ AddReferencedObjects() [4/4]

template<class UObjectType >
void FReferenceCollector::AddReferencedObjects ( TSet< UObjectType * > &  ObjectSet,
const UObject *  ReferencingObject = nullptr,
const FProperty *  ReferencingProperty = nullptr 
)
inline

Adds references to a set of objects.

参数
ObjectSetReferenced objects set.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

◆ GetInternalPersistentFrameReferenceCollectorArchive()

FReferenceCollectorArchive & FReferenceCollector::GetInternalPersistentFrameReferenceCollectorArchive ( )
inline

INTERNAL USE ONLY: returns the persistent frame collector archive associated with this collector.

NOTE THAT COLLECTING REFERENCES THROUGH SERIALIZATION IS VERY SLOW.

◆ GetVerySlowReferenceCollectorArchive()

FReferenceCollectorArchive & FReferenceCollector::GetVerySlowReferenceCollectorArchive ( )
inline

Returns the collector archive associated with this collector.

NOTE THAT COLLECTING REFERENCES THROUGH SERIALIZATION IS VERY SLOW.

◆ HandleObjectReference()

virtual void FReferenceCollector::HandleObjectReference ( UObject *&  InObject,
const UObject *  InReferencingObject,
const FProperty *  InReferencingProperty 
)
protectedpure virtual

Handle object reference.

Called by AddReferencedObject.

参数
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

在 FGCCollector< Options >, FSlateObjectReferenceCollector, FReferenceFinder, TDefaultReferenceCollector< ReferenceProcessorType, bIgnoringArchetypeRef, bIgnoringTransient > , 以及 FPurgingReferenceCollector 内被实现.

◆ HandleObjectReferences()

virtual void FReferenceCollector::HandleObjectReferences ( UObject **  InObjects,
const int32  ObjectNum,
const UObject *  InReferencingObject,
const FProperty *  InReferencingProperty 
)
inlineprotectedvirtual

Handle multiple object references.

Called by AddReferencedObjects. DEFAULT IMPLEMENTAION IS SLOW as it calls HandleObjectReference multiple times. In order to optimize it, provide your own implementation.

参数
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

被 FGCCollector< Options >, FPurgingReferenceCollector , 以及 TDefaultReferenceCollector< ReferenceProcessorType, bIgnoringArchetypeRef, bIgnoringTransient > 重载.

◆ MarkWeakObjectReferenceForClearing()

virtual bool FReferenceCollector::MarkWeakObjectReferenceForClearing ( UObject **  WeakReference)
inlinevirtual

Marks a specific object reference as a weak reference.

This does not affect GC but will be freed at a later point The default behavior returns false as weak references must be explicitly supported

被 FGCCollector< Options > 重载.


该类的文档由以下文件生成: