UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TCheckedObjPtr< T > Class Template Reference

#include <Archive.h>

Public Member Functions

 TCheckedObjPtr ()
 
 TCheckedObjPtr (T *InObject)
 
TCheckedObjPtroperator= (T *InObject)
 
UE_FORCEINLINE_HINT T * operator-> () const
 
UE_FORCEINLINE_HINT T *& Get ()
 
UE_FORCEINLINE_HINT bool IsValid () const
 
UE_FORCEINLINE_HINT bool IsError () const
 

Friends

class FArchive
 

Detailed Description

template<class T>
class TCheckedObjPtr< T >

TCheckedObjPtr

Wrapper for UObject pointers, which checks that the base class is accurate, upon serializing (to prevent illegal casting)

Constructor & Destructor Documentation

◆ TCheckedObjPtr() [1/2]

template<class T >
TCheckedObjPtr< T >::TCheckedObjPtr ( )
inline

◆ TCheckedObjPtr() [2/2]

template<class T >
TCheckedObjPtr< T >::TCheckedObjPtr ( T *  InObject)
inline

Member Function Documentation

◆ Get()

template<class T >
UE_FORCEINLINE_HINT T *& TCheckedObjPtr< T >::Get ( )
inline

Retrieves a writable/serializable reference to the pointer

Returns
Returns a reference to the pointer

◆ IsError()

template<class T >
UE_FORCEINLINE_HINT bool TCheckedObjPtr< T >::IsError ( ) const
inline

Whether or not there was an error during the previous serialization. This occurs if an object was successfully serialized, but with the wrong base class (which net serialization may have to recover from, if there was supposed to be data serialized along with the object)

Returns
Whether or not there was an error

◆ IsValid()

template<class T >
UE_FORCEINLINE_HINT bool TCheckedObjPtr< T >::IsValid ( ) const
inline

Whether or not the pointer is valid/non-null

Returns
Whether or not the pointer is valid

◆ operator->()

template<class T >
UE_FORCEINLINE_HINT T * TCheckedObjPtr< T >::operator-> ( ) const
inline

Returns the object pointer, for accessing members of the object

Returns
Returns the object pointer

◆ operator=()

template<class T >
TCheckedObjPtr & TCheckedObjPtr< T >::operator= ( T *  InObject)
inline

Assigns a value to the object pointer

Parameters
InObjectThe value to assign to the pointer

Friends And Related Symbol Documentation

◆ FArchive

template<class T >
friend class FArchive
friend

The documentation for this class was generated from the following file: