engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 成员函数 | 友元 | 所有成员列表
UStruct类 参考

Base class for all UObject types that contain fields. 更多...

#include <Class.h>

+ 类 UStruct 继承关系图:

Public 成员函数

void CollectBytecodeAndPropertyReferencedObjects ()
 Collects UObjects referenced by bytecode and properties for faster GC access
 
void CollectBytecodeReferencedObjects (TArray< UObject * > &OutReferencedObjects)
 Collects UObjects referenced by bytecode 更多...
 
void CollectPropertyReferencedObjects (TArray< UObject * > &OutReferencedObjects)
 Collects UObjects referenced by properties 更多...
 
virtual FProperty * CustomFindProperty (const FName InName) const
 Look up a property by an alternate name if it was not found in the first search, this is overridden for user structs
 
FORCEINLINE void DeleteUnresolvedScriptProperties ()
 Deletes the UnresolvedScriptProperties array
 
void DestroyChildPropertiesAndResetPropertyLinks ()
 Destroys all properties owned by this struct
 
virtual void DestroyStruct (void *Dest, int32 ArrayDim=1) const
 Destroy a struct in memory. 更多...
 
FProperty * FindPropertyByName (FName InName) const
 Searches property link chain for a property with the specified name
 
virtual void FinishDestroy () override
 Called to finish destroying the object. 更多...
 
virtual FString GetAuthoredNameForField (const FField *Field) const
 Returns a human readable string for a given field, overridden for user defined structs
 
virtual FString GetAuthoredNameForField (const UField *Field) const
 Returns a human readable string for a given field, overridden for user defined structs
 
virtual UStruct * GetInheritanceSuper () const
 Returns the structure used for inheritance, may be changed by child types
 
FORCEINLINE int32 GetMinAlignment () const
 Alignment of structure in memory, structure will be at least this large
 
virtual const TCHAR * GetPrefixCPP () const
 Returns the struct/ class prefix used for the C++ declaration of this struct/ class. 更多...
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps) override
 Called during cooking. 更多...
 
FORCEINLINE int32 GetPropertiesSize () const
 Total size of all UProperties, the allocated structure may be larger due to alignment
 
FORCEINLINE int32 GetStructureSize () const
 Returns actual allocated size of structure in memory
 
UStruct * GetSuperStruct () const
 Struct this inherits from, may be null
 
virtual void InitializeStruct (void *Dest, int32 ArrayDim=1) const
 Initialize a struct over uninitialized memory. 更多...
 
void InstanceSubobjectTemplates (void *Data, void const *DefaultData, UStruct *DefaultStruct, UObject *Owner, FObjectInstancingGraph *InstanceGraph)
 Creates new copies of components 更多...
 
template<class T >
bool IsChildOf () const
 Returns true if this struct either is class T, or is a child of class T. 更多...
 
bool IsChildOf (const UStruct *SomeBase) const
 Returns true if this struct either is SomeBase, or is a child of SomeBase. 更多...
 
virtual bool IsStructTrashed () const
 If true, this class has been cleaned and sanitized (trashed) and should not be used
 
virtual void Link (FArchive &Ar, bool bRelinkExistingProperties)
 Creates the field/property links and gets structure ready for use at runtime
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void RegisterDependencies () override
 Force any base classes to be registered first
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
virtual void SerializeBin (FArchive &Ar, void *Data) const final
 Serializes struct properties, does not handle defaults
 
virtual void SerializeBin (FStructuredArchive::FSlot Slot, void *Data) const
 Serializes struct properties, does not handle defaults
 
void SerializeBinEx (FStructuredArchive::FSlot Slot, void *Data, void const *DefaultData, UStruct *DefaultStruct) const
 Serializes the class properties that reside in Data if they differ from the corresponding values in DefaultData 更多...
 
virtual EExprToken SerializeExpr (int32 &iCode, FArchive &Ar)
 Serialize an expression to an archive. 更多...
 
virtual void SerializeTaggedProperties (FArchive &Ar, uint8 *Data, UStruct *DefaultsStruct, uint8 *Defaults, const UObject *BreakRecursionIfFullyLoad=nullptr) const final
 Serializes list of properties, using property tags to handle mismatches
 
virtual void SerializeTaggedProperties (FStructuredArchive::FSlot Slot, uint8 *Data, UStruct *DefaultsStruct, uint8 *Defaults, const UObject *BreakRecursionIfFullyLoad=nullptr) const
 Serializes list of properties, using property tags to handle mismatches
 
void SetPropertiesSize (int32 NewSize)
 Modifies the property size after it's been recomputed
 
virtual void SetSuperStruct (UStruct *NewSuperStruct)
 Sets the super struct pointer and updates hash information as necessary. 更多...
 
void SetUnresolvedScriptProperties (FUnresolvedScriptPropertiesArray &InUnresolvedProperties)
 Sets the UnresolvedScriptProperties array
 
void StaticLink (bool bRelinkExistingProperties=false)
 Static wrapper for Link, using a dummy archive
 
virtual void TagSubobjects (EObjectFlags NewFlags) override
 Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多...
 

Public 属性

FField * ChildProperties
 Pointer to start of linked list of child fields
 
UField * Children
 Pointer to start of linked list of child fields
 
FProperty * DestructorLink
 In memory only: Linked list of properties requiring destruction. 更多...
 
int32 MinAlignment
 Alignment of structure in memory, structure will be at least this large
 
FProperty * PostConstructLink
 In memory only: Linked list of properties requiring post constructor initialization
 
int32 PropertiesSize
 Total size of all UProperties, the allocated structure may be larger due to alignment
 
FProperty * PropertyLink
 In memory only: Linked list of properties from most-derived to base
 
FProperty * RefLink
 In memory only: Linked list of object reference properties from most-derived to base
 
TArray< uint8 > Script
 Script bytecode associated with this object
 
TArray< UObject * > ScriptAndPropertyObjectReferences
 Array of object references embedded in script code and referenced by FProperties. 更多...
 
FUnresolvedScriptPropertiesArray * UnresolvedScriptProperties
 Contains a list of script properties that couldn't be resolved at load time
 
const struct FUnversionedStructSchema * UnversionedSchema = nullptr
 Cached schema for optimized unversioned property serialization, owned by this.
 

Protected 成员函数

virtual bool ArePropertyGuidsAvailable () const
 Returns if we have access to property guids
 
virtual FGuid FindPropertyGuidFromName (const FName InName) const
 Find property guid
 
virtual FName FindPropertyNameFromGuid (const FGuid &PropertyGuid) const
 Returns the property name from the guid
 
void LoadTaggedPropertiesFromText (FStructuredArchive::FSlot Slot, uint8 *Data, UStruct *DefaultsStruct, uint8 *Defaults, const UObject *BreakRecursionIfFullyLoad) const
 Serializes list of properties to a te, using property tags to handle mismatches
 
void SerializeProperties (FArchive &Ar)
 Serializes properties of this struct
 

友元

class UObjectBaseUtility
 

详细描述

Base class for all UObject types that contain fields.

成员函数说明

◆ CollectBytecodeReferencedObjects()

void UStruct::CollectBytecodeReferencedObjects ( TArray< UObject * > &  OutReferencedObjects)

Collects UObjects referenced by bytecode

参数
OutReferencedObjectsbuffer to store the referenced objects in (not cleared by this function)

◆ CollectPropertyReferencedObjects()

void UStruct::CollectPropertyReferencedObjects ( TArray< UObject * > &  OutReferencedObjects)

Collects UObjects referenced by properties

参数
OutReferencedObjectsbuffer to store the referenced objects in (not cleared by this function)

◆ DestroyStruct()

virtual void UStruct::DestroyStruct ( void *  Dest,
int32  ArrayDim = 1 
) const
virtual

Destroy a struct in memory.

This may be done by calling the native destructor and then the constructor or individually reinitializing properties

参数
DestPointer to memory to destory
ArrayDimNumber of elements in the array
StrideStride of the array. If this default (0), then we will pull the size from the struct

被 UScriptStruct 重载.

◆ FinishDestroy()

virtual void UStruct::FinishDestroy ( )
overridevirtual

Called to finish destroying the object.

After UObject::FinishDestroy is called, the object's memory should no longer be accessed.

警告
Because properties are destroyed here, Super::FinishDestroy() should always be called at the end of your child class's FinishDestroy() method, rather than at the beginning.

重载 UObject .

被 UClass 重载.

◆ GetPrefixCPP()

virtual const TCHAR * UStruct::GetPrefixCPP ( ) const
inlinevirtual

Returns the struct/ class prefix used for the C++ declaration of this struct/ class.

返回
Prefix character used for C++ declaration of this struct/ class.

被 UClass 重载.

◆ GetPreloadDependencies()

virtual void UStruct::GetPreloadDependencies ( TArray< UObject * > &  OutDeps)
overridevirtual

Called during cooking.

Must return all objects that will be Preload()ed when this is serialized at load time. Only used by the EDL.

参数
OutDepsall objects that will be preloaded when this is serialized at load time

重载 UObject .

◆ InitializeStruct()

virtual void UStruct::InitializeStruct ( void *  Dest,
int32  ArrayDim = 1 
) const
virtual

Initialize a struct over uninitialized memory.

This may be done by calling the native constructor or individually initializing properties

参数
DestPointer to memory to initialize
ArrayDimNumber of elements in the array
StrideStride of the array, If this default (0), then we will pull the size from the struct

被 UScriptStruct 重载.

◆ InstanceSubobjectTemplates()

void UStruct::InstanceSubobjectTemplates ( void *  Data,
void const *  DefaultData,
UStruct *  DefaultStruct,
UObject *  Owner,
FObjectInstancingGraph *  InstanceGraph 
)

Creates new copies of components

参数
Datapointer to the address of the subobject referenced by this FProperty
DefaultDatapointer to the address of the default value of the subbject referenced by this FProperty
DefaultStructthe struct corresponding to the buffer pointed to by DefaultData
Ownerthe object that contains the component currently located at Data
InstanceGraphcontains the mappings of instanced objects and components to their templates

◆ IsChildOf() [1/2]

template<class T >
bool UStruct::IsChildOf ( ) const
inline

Returns true if this struct either is class T, or is a child of class T.

This will not crash on null structs

◆ IsChildOf() [2/2]

bool UStruct::IsChildOf ( const UStruct *  SomeBase) const

Returns true if this struct either is SomeBase, or is a child of SomeBase.

This will not crash on null structs

◆ PostLoad()

virtual void UStruct::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

被 UClass , 以及 UWidgetBlueprintGeneratedClass 重载.

◆ Serialize()

virtual void UStruct::Serialize ( FArchive &  Ar)
overridevirtual

Handles reading, writing, and reference collecting using FArchive.

This implementation handles all FProperty serialization, but can be overridden for native variables.

重载 UObject .

被 UScriptStruct, UClass , 以及 UWidgetBlueprintGeneratedClass 重载.

◆ SerializeBinEx()

void UStruct::SerializeBinEx ( FStructuredArchive::FSlot  Slot,
void *  Data,
void const *  DefaultData,
UStruct *  DefaultStruct 
) const

Serializes the class properties that reside in Data if they differ from the corresponding values in DefaultData

参数
Arthe archive to use for serialization
Datapointer to the location of the beginning of the property data
DefaultDatapointer to the location of the beginning of the data that should be compared against
DefaultStructthe struct corresponding to the block of memory located at DefaultData

◆ SerializeExpr()

virtual EExprToken UStruct::SerializeExpr ( int32 &  iCode,
FArchive &  Ar 
)
virtual

Serialize an expression to an archive.

Returns expression token

◆ SetSuperStruct()

virtual void UStruct::SetSuperStruct ( UStruct *  NewSuperStruct)
virtual

Sets the super struct pointer and updates hash information as necessary.

Note that this is not sufficient to actually reparent a struct, it simply sets a pointer.

被 UClass 重载.

◆ TagSubobjects()

virtual void UStruct::TagSubobjects ( EObjectFlags  NewFlags)
overridevirtual

Tags objects that are part of the same asset with the specified object flag, used for GC checking

参数
ObjectFlagsObject Flags to enable on the related objects

重载 UObject .

被 UClass 重载.

类成员变量说明

◆ DestructorLink

FProperty* UStruct::DestructorLink

In memory only: Linked list of properties requiring destruction.

Note this does not include things that will be destroyed byt he native destructor

◆ ScriptAndPropertyObjectReferences

TArray<UObject*> UStruct::ScriptAndPropertyObjectReferences

Array of object references embedded in script code and referenced by FProperties.

Mirrored for easy access by realtime garbage collection code


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