Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Misc
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Misc/InlineValue.h |
| Include | #include "Misc/InlineValue.h" |
Syntax
template<typename BaseType, uint16 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
| Type | Name | Description | |
|---|---|---|---|
TInlineValue () |
Default construction to an empty container | ||
TInlineValue
(
T&& In |
Construction from any type relating to BaseType. | ||
TInlineValue
(
TInlineValue&& In |
Move construction/assignment | ||
TInlineValue
(
const TInlineValue& In |
Copy construction/assignment is disabled | ||
TInlineValue
(
EInPlace, |
In-place construction of BaseType from a set of arguments. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Emplace
(
ArgsType&&... Args |
Emplace a new type (deriving from BaseType) into this inline value | |
| const BaseType & | Get
(
const BaseType& Default |
Get the wrapped object, or a user-specified default | |
| BaseType * | GetPtr
(
BaseType* Default |
Get a pointer the wrapped object, or a user-specified default | |
| BaseType & | GetValue () |
Access the wrapped object's base type | |
| bool | IsValid () |
Check if this container is wrapping a valid object | |
| void * | Reserve space for a structure derived from BaseType, of the size and alignment specified . | ||
| void | Reset () |
Reset this container back to its empty state | |
| void | Reset
(
TInlineValue&& In |
Reset this container to wrap a new type |
Operators
| Type | Name | Description | |
|---|---|---|---|
| BaseType & | operator* () |
||
| TEnableIf< TPointerIsConvertibleFromTo< typenameTDecay< T >::Type, BaseType >::Value, TInlineValue &... | operator=
(
T&& In |
Move assignment from any type relating to BaseType. | |
| TInlineValue & | operator=
(
const TInlineValue& In |
||
| TInlineValue & | operator=
(
TInlineValue&& In |
||
| BaseType * | operator-> () |
Enums
| Type | Name | Description | |
|---|---|---|---|
| API/Runtime/Core/Misc/TInlineValue_1 | ~We cannot allow an allocation of less than the size of a pointer |