TInlineValue

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.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/InlineValue.h

Include

#include "Misc/InlineValue.h"

Syntax

template<typename BaseType, uint8 DesiredMaxInlineSize, uint8 DefaultAlignment>
class TInlineValue

Remarks

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.

Constructors

Name Description

Public function

TInlineValue()

Default construction to an empty container

Public function

TInlineValue

(
    T&& In
)

Construction from any type relating to BaseType.

Public function

TInlineValue

(
    TInlineValue&& In
)

Move construction/assignment

Public function

TInlineValue

(
    const TInlineValue& In
)

Copy construction/assignment is disabled

Destructors

Name Description

Public function

~TInlineValue()

Destructor

Functions

Name Description

Public function

void

 

Emplace

(
    ArgsType&&... Args
)

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

Public function Const

const BaseTy...

 

Get

(
    const BaseType& Default
)

Get the wrapped object, or a user-specified default

Public function

BaseType ...

 

GetPtr

(
    BaseType* Default
)

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

Public function Const

const BaseTy...

 

GetPtr

(
    const BaseType* Default
)

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

Public function

BaseType &

 

GetValue()

Access the wrapped object's base type

Public function Const

const BaseTy...

 

GetValue()

Access the wrapped object's base type

Public function Const

bool

 

IsValid()

Check if this container is wrapping a valid object

Public function

void *

 

Reserve

(
    uint32 InSize,
    uint32 InAlignment
)

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

Public function

void

 

Reset()

Reset this container back to its empty state

Public function

void

 

Reset

(
    TInlineValue&& In
)

Reset this container to wrap a new type

Operators

Name Description

Public function

BaseType &

 

operator*()

Public function Const

const BaseTy...

 

operator*()

Public function

TInlineValue...

 

operator=

(
    TInlineValue&& In
)

Public function

TInlineValue...

 

operator=

(
    const TInlineValue& In
)

Public function

TEnableIf< T...

 

operator=

(
    T&& In
)

Move assignment from any type relating to BaseType.

Public function

BaseType ...

 

operator->()

Public function Const

const BaseTy...

 

operator->()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss