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.
Collects UObjects referenced by bytecode
| OutReferencedObjects | buffer to store the referenced objects in (not cleared by this function) |
Collects UObjects referenced by properties
| OutReferencedObjects | buffer to store the referenced objects in (not cleared by this function) |
|
virtual |
Destroy a struct in memory.
This may be done by calling the native destructor and then the constructor or individually reinitializing properties
| Dest | Pointer to memory to destory |
| ArrayDim | Number of elements in the array |
| Stride | Stride of the array. If this default (0), then we will pull the size from the struct |
被 UScriptStruct 重载.
|
overridevirtual |
Called to finish destroying the object.
After UObject::FinishDestroy is called, the object's memory should no longer be accessed.
重载 UObject .
被 UClass 重载.
|
inlinevirtual |
Returns the struct/ class prefix used for the C++ declaration of this struct/ class.
被 UClass 重载.
Called during cooking.
Must return all objects that will be Preload()ed when this is serialized at load time. Only used by the EDL.
| OutDeps | all objects that will be preloaded when this is serialized at load time |
重载 UObject .
|
virtual |
Initialize a struct over uninitialized memory.
This may be done by calling the native constructor or individually initializing properties
| Dest | Pointer to memory to initialize |
| ArrayDim | Number of elements in the array |
| Stride | Stride of the array, If this default (0), then we will pull the size from the struct |
被 UScriptStruct 重载.
| void UStruct::InstanceSubobjectTemplates | ( | void * | Data, |
| void const * | DefaultData, | ||
| UStruct * | DefaultStruct, | ||
| UObject * | Owner, | ||
| FObjectInstancingGraph * | InstanceGraph | ||
| ) |
Creates new copies of components
| Data | pointer to the address of the subobject referenced by this FProperty |
| DefaultData | pointer to the address of the default value of the subbject referenced by this FProperty |
| DefaultStruct | the struct corresponding to the buffer pointed to by DefaultData |
| Owner | the object that contains the component currently located at Data |
| InstanceGraph | contains the mappings of instanced objects and components to their templates |
|
inline |
Returns true if this struct either is class T, or is a child of class T.
This will not crash on null structs
| 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
|
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 重载.
|
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 重载.
| 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
| Ar | the archive to use for serialization |
| Data | pointer to the location of the beginning of the property data |
| DefaultData | pointer to the location of the beginning of the data that should be compared against |
| DefaultStruct | the struct corresponding to the block of memory located at DefaultData |
|
virtual |
Serialize an expression to an archive.
Returns expression token
|
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 重载.
|
overridevirtual |
| 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
Array of object references embedded in script code and referenced by FProperties.
Mirrored for easy access by realtime garbage collection code