UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > Class Template Reference

#include <InlineValue.h>

Public Member Functions

 TInlineValue ()
 
template<typename T , typename = typename TEnableIf<TPointerIsConvertibleFromTo<typename TDecay<T>::Type, BaseType>::Value>::Type>
 TInlineValue (T &&In)
 
template<typename... ArgTypes>
 TInlineValue (EInPlace, ArgTypes &&... Args)
 
 ~TInlineValue ()
 
 TInlineValue (TInlineValue &&In)
 
TInlineValueoperator= (TInlineValue &&In)
 
 TInlineValue (const TInlineValue &In)=delete
 
TInlineValueoperator= (const TInlineValue &In)=delete
 
template<typename T >
TEnableIf< TPointerIsConvertibleFromTo< typenameTDecay< T >::Type, BaseType >::Value, TInlineValue & >::Type operator= (T &&In)
 
void Reset (TInlineValue &&In)
 
void Reset ()
 
template<typename T , typename... ArgsType>
void Emplace (ArgsType &&... Args)
 
UE_FORCEINLINE_HINT bool IsValid () const
 
BaseType & GetValue () const
 
UE_FORCEINLINE_HINT const BaseType & Get (const BaseType &Default) const
 
UE_FORCEINLINE_HINT BaseType * GetPtr (BaseType *Default=nullptr) const
 
UE_FORCEINLINE_HINT BaseType & operator* () const
 
UE_FORCEINLINE_HINT BaseType * operator-> () const
 
voidReserve (uint32 InSize, uint32 InAlignment)
 

Detailed Description

template<typename BaseType, uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
class TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >

A container type that houses an instance of BaseType in inline memory where it is <= MaxInlineSize, or in a separate heap allocation where it's > MaxInlineSize.

Can be viewed as a TUniquePtr with a small allocation optimization.

Constructor & Destructor Documentation

◆ TInlineValue() [1/5]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::TInlineValue ( )
inline

Default construction to an empty container

◆ TInlineValue() [2/5]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
template<typename T , typename = typename TEnableIf<TPointerIsConvertibleFromTo<typename TDecay<T>::Type, BaseType>::Value>::Type>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::TInlineValue ( T &&  In)
inline

Construction from any type relating to BaseType.

◆ TInlineValue() [3/5]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
template<typename... ArgTypes>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::TInlineValue ( EInPlace  ,
ArgTypes &&...  Args 
)
inline

In-place construction of BaseType from a set of arguments.

◆ ~TInlineValue()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::~TInlineValue ( )
inline

Destructor

◆ TInlineValue() [4/5]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::TInlineValue ( TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > &&  In)
inline

Move construction/assignment

◆ TInlineValue() [5/5]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::TInlineValue ( const TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > &  In)
delete

Copy construction/assignment is disabled

Member Function Documentation

◆ Emplace()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
template<typename T , typename... ArgsType>
void TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::Emplace ( ArgsType &&...  Args)
inline

Emplace a new type (deriving from BaseType) into this inline value

◆ Get()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
UE_FORCEINLINE_HINT const BaseType & TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::Get ( const BaseType &  Default) const
inline

Get the wrapped object, or a user-specified default

Returns
The object, or the user-specified default

◆ GetPtr()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
UE_FORCEINLINE_HINT BaseType * TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::GetPtr ( BaseType *  Default = nullptr) const
inline

Get a pointer the wrapped object, or a user-specified default

Returns
A pointer to the object, or the user-specified default

◆ GetValue()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
BaseType & TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::GetValue ( ) const
inline

Access the wrapped object's base type

Returns
A reference to the object. Will assert where IsValid() is false.

◆ IsValid()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
UE_FORCEINLINE_HINT bool TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::IsValid ( ) const
inline

Check if this container is wrapping a valid object

◆ operator*()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
UE_FORCEINLINE_HINT BaseType & TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::operator* ( ) const
inline

◆ operator->()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
UE_FORCEINLINE_HINT BaseType * TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::operator-> ( ) const
inline

◆ operator=() [1/3]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue & TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::operator= ( const TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > &  In)
delete

◆ operator=() [2/3]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
template<typename T >
TEnableIf< TPointerIsConvertibleFromTo< typenameTDecay< T >::Type, BaseType >::Value, TInlineValue & >::Type TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::operator= ( T &&  In)
inline

Move assignment from any type relating to BaseType.

◆ operator=() [3/3]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
TInlineValue & TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::operator= ( TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > &&  In)
inline

◆ Reserve()

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
void * TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::Reserve ( uint32  InSize,
uint32  InAlignment 
)
inline

Reserve space for a structure derived from BaseType, of the size and alignment specified .

Note
Does not initialize the memory in anyway

◆ Reset() [1/2]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
void TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::Reset ( )
inline

Reset this container back to its empty state

◆ Reset() [2/2]

template<typename BaseType , uint16 DesiredMaxInlineSize = 64, uint8 DefaultAlignment = 8>
void TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment >::Reset ( TInlineValue< BaseType, DesiredMaxInlineSize, DefaultAlignment > &&  In)
inline

Reset this container to wrap a new type


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