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

An object class. 更多...

#include <Class.h>

+ 类 UClass 继承关系图:

Public 成员函数

void AddDefaultSubobject (UObject *NewSubobject, UClass *BaseClass)
 Adds a new default instance map item
 
void AddFunctionToFunctionMap (UFunction *Function, FName FuncName)
 Add a function to the function map
 
void AddNativeFunction (const ANSICHAR *InName, FNativeFuncPtr InPointer)
 Add a native function to the internal native function table 更多...
 
void AddNativeFunction (const WIDECHAR *InName, FNativeFuncPtr InPointer)
 Add a native function to the internal native function table, but with a unicode name. 更多...
 
void AssembleReferenceTokenStream (bool bForce=false)
 Assembles the token stream for realtime garbage collection by combining the per class only token stream for each class in the class hierarchy. 更多...
 
FORCEINLINE void CallAddReferencedObjects (UObject *This, FReferenceCollector &Collector) const
 Calls AddReferencedObjects static method on the specified object. 更多...
 
void ClearFunctionMapsCaches ()
 Clears the function name caches, in case things have changed
 
virtual void CreatePersistentUberGraphFrame (UObject *Obj, bool bCreateOnlyIfEmpty=false, bool bSkipSuperClass=false, UClass *OldClass=nullptr) const
 Creates memory to store temporary data
 
virtual void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *InName) override
 Convert a boot-strap registered class into a real one, add to uobject array, etc 更多...
 
virtual void DestroyPersistentUberGraphFrame (UObject *Obj, bool bSkipSuperClass=false) const
 Clears memory to store temporary data
 
void EmitExternalPackageReference ()
 Realtime garbage collection helper function used to emit token containing information about an external package reference.
 
void EmitFixedArrayBegin (int32 Offset, const FName &DebugName, int32 Stride, int32 Count)
 Realtime garbage collection helper function used to indicate the beginning of a fixed array. 更多...
 
void EmitFixedArrayEnd ()
 Realtime garbage collection helper function used to indicated the end of a fixed array.
 
void EmitObjectArrayReference (int32 Offset, const FName &DebugName)
 Realtime garbage collection helper function used to emit token containing information about a an array of UObject references at the passed in offset. 更多...
 
void EmitObjectReference (int32 Offset, const FName &DebugName, EGCReferenceType Kind=GCRT_Object)
 Realtime garbage collection helper function used to emit token containing information about a direct UObject reference at the passed in offset. 更多...
 
uint32 EmitStructArrayBegin (int32 Offset, const FName &DebugName, int32 Stride)
 Realtime garbage collection helper function used to indicate an array of structs at the passed in offset. 更多...
 
void EmitStructArrayEnd (uint32 SkipIndexIndex)
 Realtime garbage collection helper function used to indicate the end of an array of structs. 更多...
 
virtual UObject * FindArchetype (const UClass *ArchetypeClass, const FName ArchetypeName) const
 Finds the object that is used as the parent object when serializing properties, overridden for blueprints
 
UFunction * FindFunctionByName (FName InName, EIncludeSuperFlag::Type IncludeSuper=EIncludeSuperFlag::IncludeSuper) const
 Looks for a given function name
 
virtual void FinishDestroy () override
 Called to finish destroying the object. 更多...
 
virtual UObject * GetArchetypeForCDO () const
 Returns archetype object for CDO
 
virtual void * GetArchetypeForSparseClassData () const
 Returns archetype for sparse class data
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const override
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
virtual UClass * GetAuthoritativeClass ()
 If there are potentially multiple versions of this class (e.g. 更多...
 
FORCEINLINE EClassFlags GetClassFlags () const
 Gets the class flags. 更多...
 
const FString GetConfigName () const
 Translates the hardcoded script config names (engine, editor, input and game) to their global pendants and otherwise uses config(myini) name to look for a game specific implementation and creates one based on the default if it doesn't exist yet. 更多...
 
template<class T >
T * GetDefaultObject () const
 Get the default object from the class and cast to a particular type 更多...
 
UObject * GetDefaultObject (bool bCreateIfNeeded=true) const
 Get the default object from the class 更多...
 
FName GetDefaultObjectName () const
 Get the name of the CDO for the this class 更多...
 
virtual void GetDefaultObjectPreloadDependencies (TArray< UObject * > &OutDeps)
 Returns all objects that should be preloaded before the class default object is serialized at load time. 更多...
 
void GetDefaultObjectSubobjects (TArray< UObject * > &OutDefaultSubobjects)
 Gets all default instanced objects (often components). 更多...
 
int32 GetDefaultsCount ()
 Returns amount of memory used by default object
 
UObject * GetDefaultSubobjectByName (FName ToFind)
 Searches for the default instanced object (often a component) by name
 
virtual FString GetDesc () override
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
void * GetOrCreateSparseClassData ()
 Returns a pointer to the sidecar data structure. 更多...
 
virtual uint8 * GetPersistentUberGraphFrame (UObject *Obj, UFunction *FuncToCheck) const
 Returns memory used to store temporary data on an instance, used by blueprints
 
virtual const TCHAR * GetPrefixCPP () const override
 Returns the struct/ class prefix used for the C++ declaration of this struct/ class. 更多...
 
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite () override
 Save information for StaticAllocateObject in the case of overwriting an existing object. 更多...
 
UScriptStruct * GetSparseClassDataArchetypeStruct () const
 Returns the struct used by the sparse class data archetype
 
virtual UScriptStruct * GetSparseClassDataStruct () const
 Returns a pointer to the type of the sidecar data structure if one is specified.
 
UClass * GetSuperClass () const
 Returns parent class, the parent of a Class is always another class
 
FORCEINLINE bool HasAllClassFlags (EClassFlags FlagsToCheck) const
 Used to safely check whether all of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAnyCastFlag (EClassCastFlags FlagToCheck) const
 Used to safely check whether the passed in flag is set. 更多...
 
FORCEINLINE bool HasAnyClassFlags (EClassFlags FlagsToCheck) const
 Used to safely check whether the passed in flag is set. 更多...
 
virtual bool HasProperty (FProperty *InProperty) const
 Checks if the property exists on this class or a parent class. 更多...
 
bool ImplementsInterface (const class UClass *SomeInterface) const
 This will return whether or not this class implements the passed in class / interface 更多...
 
virtual void InitPropertiesFromCustomList (uint8 *DataPtr, const uint8 *DefaultDataPtr)
 Helper method to assist with initializing object properties from an explicit list. 更多...
 
virtual bool IsAsset () const override
 Returns true if this object is considered an asset.
 
virtual bool IsFunctionImplementedInScript (FName InFunctionName) const
 Determines if the specified function has been implemented in a Blueprint 更多...
 
virtual bool IsNameStableForNetworking () const override
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsStructTrashed () const override
 If true, this class has been cleaned and sanitized (trashed) and should not be used
 
virtual void Link (FArchive &Ar, bool bRelinkExistingProperties) override
 Creates the field/property links and gets structure ready for use at runtime
 
virtual void PostInitInstance (UObject *InObj)
 Called after PostInitProperties during object construction to allow class specific initialization of an object instance.
 
virtual void PostInitProperties () override
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadDefaultObject (UObject *Object)
 Wraps the PostLoad() call for the class default object. 更多...
 
virtual void PurgeClass (bool bRecompilingOnLoad)
 Purges out the properties of this class in preparation for it to be regenerated 更多...
 
void RemoveFunctionFromFunctionMap (UFunction *Function)
 Remove a function from the function map
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None) override
 Rename this object to a unique name, or change its outer. 更多...
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
virtual void SerializeDefaultObject (UObject *Object, FArchive &Ar) final
 serializes the passed in object as this class's default object using the given archive 更多...
 
virtual void SerializeDefaultObject (UObject *Object, FStructuredArchive::FSlot Slot)
 serializes the passed in object as this class's default object using the given archive slot 更多...
 
void SerializeSparseClassData (FStructuredArchive::FSlot Slot)
 serializes the associated sparse class data for the passed in object using the given archive slot. 更多...
 
void SetCppTypeInfoStatic (const FCppClassTypeInfoStatic *InCppTypeInfoStatic)
 Sets C++ type information. 更多...
 
virtual void SetSuperStruct (UStruct *NewSuperStruct) override
 Sets the super struct pointer and updates hash information as necessary. 更多...
 
virtual void SetupObjectInitializer (FObjectInitializer &ObjectInitializer) const
 Allows class to provide data to the object initializer that can affect how native class subobjects are created.
 
void SetUpRuntimeReplicationData ()
 Initializes the ClassReps and NetFields arrays used by replication. 更多...
 
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 成员函数 继承自 UStruct
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 成员函数

static void AssembleReferenceTokenStreams ()
 Assemble reference token streams for all classes if they haven't had it assembled already
 
static UClass * FindCommonBase (const TArray< UClass * > &InClasses)
 Finds the common base class that parents the array of classes passed in. 更多...
 
static UClass * FindCommonBase (UClass *InClassA, UClass *InClassB)
 Finds the common base class that parents the two classes passed in. 更多...
 
static class FFeedbackContext & GetDefaultPropertiesFeedbackContext ()
 Feedback context for default property import
 
static bool IsSafeToSerializeToStructuredArchives (UClass *InClass)
 Helper function for determining if the given class is compatible with structured archive serialization
 

Public 属性

uint32 bCooked:1
 Used to check if the class was cooked or not
 
ClassAddReferencedObjectsType ClassAddReferencedObjects
 Pointer to a static AddReferencedObjects method.
 
EClassCastFlags ClassCastFlags
 Cast flags used to accelerate dynamic_cast<T*> on objects of this type for common T
 
FName ClassConfigName
 Which Name.ini file to load Config variables out of
 
UObject * ClassDefaultObject
 The class default object; used for delta serialization and object initialization
 
EClassFlags ClassFlags
 Class flags; See EClassFlags for more information
 
UObject * ClassGeneratedBy
 This is the blueprint that caused the generation of this class, or null if it is a native compiled-in class
 
TArray< FRepRecord > ClassReps
 List of replication records
 
uint32 ClassUnique:31
 Class pseudo-unique counter; used to accelerate unique instance name generation
 
UClass * ClassWithin
 The required type for the outer of instances of this class
 
int32 FirstOwnedClassRep = 0
 Index of the first ClassRep that belongs to this class. 更多...
 
TArray< FImplementedInterface > Interfaces
 The list of interfaces which this class implements, along with the pointer property that is located at the offset of the interface's vtable. 更多...
 
TArray< FNativeFunctionLookup > NativeFunctionLookupTable
 This class's native functions.
 
TArray< UField * > NetFields
 List of network relevant fields (functions)
 
FGCReferenceTokenStream ReferenceTokenStream
 Reference token stream used by realtime garbage collector, finalized in AssembleReferenceTokenStream
 
FCriticalSection ReferenceTokenStreamCritical
 CS for the token stream. 更多...
 
- Public 属性 继承自 UStruct
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 UObject * CreateDefaultObject ()
 Get the default object from the class, creating it if missing, if requested or under a few other circumstances 更多...
 
- Protected 成员函数 继承自 UStruct
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
 

Protected 属性

void * SparseClassData
 This is where we store the data that is only changed per class instead of per instance
 
UScriptStruct * SparseClassDataStruct
 The struct used to store sparse class data.
 

详细描述

An object class.

成员函数说明

◆ AddNativeFunction() [1/2]

void UClass::AddNativeFunction ( const ANSICHAR *  InName,
FNativeFuncPtr  InPointer 
)

Add a native function to the internal native function table

参数
InNamename of the function
InPointerpointer to the function

◆ AddNativeFunction() [2/2]

void UClass::AddNativeFunction ( const WIDECHAR *  InName,
FNativeFuncPtr  InPointer 
)

Add a native function to the internal native function table, but with a unicode name.

Used when generating code from blueprints, which can have unicode identifiers for functions and properties.

参数
InNamename of the function
InPointerpointer to the function

◆ AssembleReferenceTokenStream()

void UClass::AssembleReferenceTokenStream ( bool  bForce = false)

Assembles the token stream for realtime garbage collection by combining the per class only token stream for each class in the class hierarchy.

This is only done once and duplicate work is avoided by using an object flag.

参数
bForceAssemble the stream even if it has been already assembled (deletes the old one)

◆ CallAddReferencedObjects()

FORCEINLINE void UClass::CallAddReferencedObjects ( UObject *  This,
FReferenceCollector &  Collector 
) const
inline

Calls AddReferencedObjects static method on the specified object.

参数
ThisObject to call ARO on.
CollectorReference collector.

◆ CreateDefaultObject()

virtual UObject * UClass::CreateDefaultObject ( )
protectedvirtual

Get the default object from the class, creating it if missing, if requested or under a few other circumstances

返回
the CDO for this class

被 UDynamicClass 重载.

◆ DeferredRegister()

virtual void UClass::DeferredRegister ( UClass *  UClassStaticClass,
const TCHAR *  PackageName,
const TCHAR *  Name 
)
overridevirtual

Convert a boot-strap registered class into a real one, add to uobject array, etc

参数
UClassStaticClassNow that it is known, fill in UClass::StaticClass() as the class

重载 UObjectBase .

◆ EmitFixedArrayBegin()

void UClass::EmitFixedArrayBegin ( int32  Offset,
const FName &  DebugName,
int32  Stride,
int32  Count 
)

Realtime garbage collection helper function used to indicate the beginning of a fixed array.

All tokens issues between Begin and End will be replayed Count times.

参数
OffsetOffset at which fixed array starts.
DebugNameDebugName for this objects token. Only used in non-shipping builds.
StrideStride of array element, e.g. sizeof(struct) or sizeof(UObject*).
CountFixed array count.

◆ EmitObjectArrayReference()

void UClass::EmitObjectArrayReference ( int32  Offset,
const FName &  DebugName 
)

Realtime garbage collection helper function used to emit token containing information about a an array of UObject references at the passed in offset.

Handles both TArray and TTransArray.

参数
OffsetOffset into object at which array of objects is stored.
DebugNameDebugName for this objects token. Only used in non-shipping builds.

◆ EmitObjectReference()

void UClass::EmitObjectReference ( int32  Offset,
const FName &  DebugName,
EGCReferenceType  Kind = GCRT_Object 
)

Realtime garbage collection helper function used to emit token containing information about a direct UObject reference at the passed in offset.

参数
OffsetOffset into object at which object reference is stored.
DebugNameDebugName for this objects token. Only used in non-shipping builds.
KindOptional parameter the describe the type of the reference.

◆ EmitStructArrayBegin()

uint32 UClass::EmitStructArrayBegin ( int32  Offset,
const FName &  DebugName,
int32  Stride 
)

Realtime garbage collection helper function used to indicate an array of structs at the passed in offset.

参数
OffsetOffset into object at which array of structs is stored
DebugNameDebugName for this objects token. Only used in non-shipping builds.
StrideSize/stride of struct
返回
Index into token stream at which later on index to next token after the array is stored which is used to skip over empty dynamic arrays

◆ EmitStructArrayEnd()

void UClass::EmitStructArrayEnd ( uint32  SkipIndexIndex)

Realtime garbage collection helper function used to indicate the end of an array of structs.

The index following the current one will be written to the passed in SkipIndexIndex in order to be able to skip tokens for empty dynamic arrays.

参数
SkipIndexIndex

◆ FindCommonBase() [1/2]

static UClass * UClass::FindCommonBase ( const TArray< UClass * > &  InClasses)
static

Finds the common base class that parents the array of classes passed in.

参数
InClassesthe array of classes to find the common base for
返回
the common base class or NULL

◆ FindCommonBase() [2/2]

static UClass * UClass::FindCommonBase ( UClass *  InClassA,
UClass *  InClassB 
)
static

Finds the common base class that parents the two classes passed in.

参数
InClassAthe first class to find the common base for
InClassBthe second class to find the common base for
返回
the common base class or NULL

◆ FinishDestroy()

virtual void UClass::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.

重载 UStruct .

◆ GetAssetRegistryTags()

virtual void UClass::GetAssetRegistryTags ( TArray< FAssetRegistryTag > &  OutTags) const
overridevirtual

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

参数
OutTagsA list of key-value pairs associated with this object and their types

重载 UObject .

◆ GetAuthoritativeClass()

virtual UClass * UClass::GetAuthoritativeClass ( )
virtual

If there are potentially multiple versions of this class (e.g.

blueprint generated classes), this function will return the authoritative version, which should be used for references

返回
The version of this class that references should be stored to

◆ GetClassFlags()

FORCEINLINE EClassFlags UClass::GetClassFlags ( ) const
inline

Gets the class flags.

返回
The class flags.

◆ GetConfigName()

const FString UClass::GetConfigName ( ) const

Translates the hardcoded script config names (engine, editor, input and game) to their global pendants and otherwise uses config(myini) name to look for a game specific implementation and creates one based on the default if it doesn't exist yet.

返回
name of the class specific ini file

◆ GetDefaultObject() [1/2]

template<class T >
T * UClass::GetDefaultObject ( ) const
inline

Get the default object from the class and cast to a particular type

返回
the CDO for this class

◆ GetDefaultObject() [2/2]

UObject * UClass::GetDefaultObject ( bool  bCreateIfNeeded = true) const
inline

Get the default object from the class

参数
bCreateIfNeededif true (default) then the CDO is created if it is null
返回
the CDO for this class

◆ GetDefaultObjectName()

FName UClass::GetDefaultObjectName ( ) const

Get the name of the CDO for the this class

返回
The name of the CDO

◆ GetDefaultObjectPreloadDependencies()

virtual void UClass::GetDefaultObjectPreloadDependencies ( TArray< UObject * > &  OutDeps)
inlinevirtual

Returns all objects that should be preloaded before the class default object is serialized at load time.

Only used by the EDL.

参数
OutDepsAll objects that should be preloaded before the class default object is serialized at load time.

◆ GetDefaultObjectSubobjects()

void UClass::GetDefaultObjectSubobjects ( TArray< UObject * > &  OutDefaultSubobjects)

Gets all default instanced objects (often components).

参数
OutDefaultSubobjectsAn array to be filled with default subobjects.

◆ GetOrCreateSparseClassData()

void * UClass::GetOrCreateSparseClassData ( )
inline

Returns a pointer to the sidecar data structure.

This function will create an instance of the data structure if one has been specified and it has not yet been created.

◆ GetPrefixCPP()

virtual const TCHAR * UClass::GetPrefixCPP ( ) const
overridevirtual

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

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

重载 UStruct .

◆ GetRestoreForUObjectOverwrite()

virtual FRestoreForUObjectOverwrite * UClass::GetRestoreForUObjectOverwrite ( )
overridevirtual

Save information for StaticAllocateObject in the case of overwriting an existing object.

StaticAllocateObject will call delete on the result after calling Restore()

返回
An FRestoreForUObjectOverwrite that can restore the object or NULL if this is not necessary.

重载 UObject .

◆ HasAllClassFlags()

FORCEINLINE bool UClass::HasAllClassFlags ( EClassFlags  FlagsToCheck) const
inline

Used to safely check whether all of the passed in flags are set.

参数
FlagsToCheckClass flags to check for
返回
true if all of the passed in flags are set (including no flags passed in), false otherwise

◆ HasAnyCastFlag()

FORCEINLINE bool UClass::HasAnyCastFlag ( EClassCastFlags  FlagToCheck) const
inline

Used to safely check whether the passed in flag is set.

参数
FlagToCheckthe cast flag to check for (value should be one of the EClassCastFlags enums)
返回
true if the passed in flag is set, false otherwise (including no flag passed in)

◆ HasAnyClassFlags()

FORCEINLINE bool UClass::HasAnyClassFlags ( EClassFlags  FlagsToCheck) const
inline

Used to safely check whether the passed in flag is set.

参数
FlagsToCheckClass flag(s) to check for
返回
true if the passed in flag is set, false otherwise (including no flag passed in, unless the FlagsToCheck is CLASS_AllFlags)

◆ HasProperty()

virtual bool UClass::HasProperty ( FProperty *  InProperty) const
virtual

Checks if the property exists on this class or a parent class.

参数
InPropertyThe property to check if it is contained in this or a parent class.
返回
True if the property exists on this or a parent class.

◆ ImplementsInterface()

bool UClass::ImplementsInterface ( const class UClass *  SomeInterface) const

This will return whether or not this class implements the passed in class / interface

参数
SomeClass- the interface to check and see if this class implements it

◆ InitPropertiesFromCustomList()

virtual void UClass::InitPropertiesFromCustomList ( uint8 *  DataPtr,
const uint8 *  DefaultDataPtr 
)
inlinevirtual

Helper method to assist with initializing object properties from an explicit list.

参数
InStructthe current scope for which the given property list applies
DataPtrdestination address (where to start copying values to)
DefaultDataPtrsource address (where to start copying the defaults data from)

◆ IsFunctionImplementedInScript()

virtual bool UClass::IsFunctionImplementedInScript ( FName  InFunctionName) const
virtual

Determines if the specified function has been implemented in a Blueprint

参数
InFunctionNameThe name of the function to test
返回
True if the specified function exists and is implemented in a blueprint generated class

◆ PostInitProperties()

virtual void UClass::PostInitProperties ( )
overridevirtual

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

This is called before any serialization or other setup has happened.

重载 UObject .

◆ PostLoad()

virtual void UClass::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.

重载 UStruct .

被 UWidgetBlueprintGeneratedClass 重载.

◆ PostLoadDefaultObject()

virtual void UClass::PostLoadDefaultObject ( UObject *  Object)
inlinevirtual

Wraps the PostLoad() call for the class default object.

参数
Objectthe default object to call PostLoad() on

◆ PurgeClass()

virtual void UClass::PurgeClass ( bool  bRecompilingOnLoad)
virtual

Purges out the properties of this class in preparation for it to be regenerated

参数
bRecompilingOnLoad- true if we are recompiling on load

In editor, properties are not freed until DestroyPropertiesPendingDestruction is called.

被 UDynamicClass , 以及 UWidgetBlueprintGeneratedClass 重载.

◆ Rename()

virtual bool UClass::Rename ( const TCHAR *  NewName = nullptr,
UObject *  NewOuter = nullptr,
ERenameFlags  Flags = REN_None 
)
overridevirtual

Rename this object to a unique name, or change its outer.

警告
Unless ForceNoResetLoaders is passed in, this will cause a flush of all level streaming.
参数
NewNameThe new name of the object, if null then NewOuter should be set
NewOuterNew Outer this object will be placed within, if null it will use the current outer
FlagsFlags to specify what happens during the rename

重载 UObject .

◆ Serialize()

virtual void UClass::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.

重载 UStruct .

被 UWidgetBlueprintGeneratedClass 重载.

◆ SerializeDefaultObject() [1/2]

virtual void UClass::SerializeDefaultObject ( UObject *  Object,
FArchive &  Ar 
)
inlinefinalvirtual

serializes the passed in object as this class's default object using the given archive

参数
Objectthe object to serialize as default
Arthe archive to serialize from

◆ SerializeDefaultObject() [2/2]

virtual void UClass::SerializeDefaultObject ( UObject *  Object,
FStructuredArchive::FSlot  Slot 
)
virtual

serializes the passed in object as this class's default object using the given archive slot

参数
Objectthe object to serialize as default
Slotthe structured archive slot to serialize from

◆ SerializeSparseClassData()

void UClass::SerializeSparseClassData ( FStructuredArchive::FSlot  Slot)

serializes the associated sparse class data for the passed in object using the given archive slot.

This should only be called if the class has an associated sparse data structure.

参数
Slotthe structured archive slot to serialize from

◆ SetCppTypeInfoStatic()

void UClass::SetCppTypeInfoStatic ( const FCppClassTypeInfoStatic *  InCppTypeInfoStatic)
inline

Sets C++ type information.

Should not be NULL.

◆ SetSuperStruct()

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

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.

重载 UStruct .

◆ SetUpRuntimeReplicationData()

void UClass::SetUpRuntimeReplicationData ( )

Initializes the ClassReps and NetFields arrays used by replication.

This happens lazily based on the CLASS_ReplicationDataIsSetUp flag, and will generally occur in Link or PostLoad. It's possible that replicated UFunctions will load after their owning class, so UFunction::PostLoad will clear the flag on its owning class to force lazy initialization next time the data is needed. Also happens after blueprint compiliation.

◆ TagSubobjects()

virtual void UClass::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

重载 UStruct .

类成员变量说明

◆ FirstOwnedClassRep

int32 UClass::FirstOwnedClassRep = 0

Index of the first ClassRep that belongs to this class.

Anything before that was defined by / belongs to parent classes.

◆ Interfaces

TArray<FImplementedInterface> UClass::Interfaces

The list of interfaces which this class implements, along with the pointer property that is located at the offset of the interface's vtable.

If the interface class isn't native, the property will be null.

◆ ReferenceTokenStreamCritical

FCriticalSection UClass::ReferenceTokenStreamCritical

CS for the token stream.

Token stream can assemble code can sometimes be called from two threads throuh a web of async loading calls.


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