![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SharedBuffer.h>
Public Member Functions | |
| FUniqueBuffer ()=default | |
| CORE_API | FUniqueBuffer (FBufferOwner *Owner) |
| FUniqueBuffer (FUniqueBuffer &&)=default | |
| FUniqueBuffer & | operator= (FUniqueBuffer &&)=default |
| FUniqueBuffer (const FUniqueBuffer &)=delete | |
| FUniqueBuffer & | operator= (const FUniqueBuffer &)=delete |
| CORE_API void | Reset () |
| void * | GetData () |
| const void * | GetData () const |
| uint64 | GetSize () const |
| FMutableMemoryView | GetView () |
| FMemoryView | GetView () const |
| operator FMutableMemoryView () | |
| operator FMemoryView () const | |
| operator bool () const | |
| bool | IsNull () const |
| bool | IsOwned () const |
| CORE_API FUniqueBuffer | MakeOwned () && |
| bool | IsMaterialized () const |
| CORE_API void | Materialize () const |
| CORE_API FSharedBuffer | MoveToShared () |
| bool | operator== (const FUniqueBuffer &BufferB) const |
| bool | operator!= (const FUniqueBuffer &BufferB) const |
Static Public Member Functions | |
| static CORE_API FUniqueBuffer | Alloc (uint64 Size) |
| static CORE_API FUniqueBuffer | AllocZeroed (uint64 Size) |
| static CORE_API FUniqueBuffer | Clone (FMemoryView View) |
| static CORE_API FUniqueBuffer | Clone (const void *Data, uint64 Size) |
| static CORE_API FUniqueBuffer | MakeView (FMutableMemoryView View) |
| static CORE_API FUniqueBuffer | MakeView (void *Data, uint64 Size) |
| template<typename DeleteFunctionType , decltype(Invoke(std::declval< DeleteFunctionType >(), std::declval< void * >())) * = nullptr> | |
| static FUniqueBuffer | TakeOwnership (void *Data, uint64 Size, DeleteFunctionType &&DeleteFunction) |
| template<typename DeleteFunctionType , decltype(Invoke(std::declval< DeleteFunctionType >(), std::declval< void * >(), std::declval< uint64 >())) * = nullptr> | |
| static FUniqueBuffer | TakeOwnership (void *Data, uint64 Size, DeleteFunctionType &&DeleteFunction) |
Friends | |
| class | FSharedBuffer |
| const FOwnerPtrType & | ToPrivateOwnerPtr (const FUniqueBuffer &Buffer) |
| FOwnerPtrType | ToPrivateOwnerPtr (FUniqueBuffer &&Buffer) |
| uint32 | GetTypeHash (const FUniqueBuffer &Buffer) |
A reference to a single-ownership mutable buffer.
Ownership can be transferred by moving to FUniqueBuffer or it can be converted to an immutable shared buffer with MoveToShared().
|
default |
Construct a null unique buffer.
|
explicit |
Construct a unique buffer from a new unreferenced buffer owner.
|
default |
|
delete |
|
static |
Make an uninitialized owned buffer of the specified size.
|
static |
Make a zeroed owned buffer of the specified size.
|
static |
|
static |
Make an owned clone of the input.
|
inline |
Returns a pointer to the start of the buffer.
|
inline |
|
inline |
Returns the size of the buffer in bytes.
|
inline |
Returns a view of the buffer.
|
inline |
|
inline |
Returns true if the referenced buffer has been materialized.
|
inline |
Returns true if this does not point to a buffer owner.
A null buffer is always owned, materialized, and empty.
|
inline |
Returns true if this keeps the referenced buffer alive.
| FUniqueBuffer FUniqueBuffer::MakeOwned | ( | ) | && |
Returns a buffer that is owned, by cloning if not owned.
|
static |
Make a non-owned view of the input.
|
static |
| void FUniqueBuffer::Materialize | ( | ) | const |
Materialize the buffer by making its data and size available.
The buffer is automatically materialized by GetData, GetSize, GetView.
| FSharedBuffer FUniqueBuffer::MoveToShared | ( | ) |
Convert this to an immutable shared buffer, leaving this null.
Steals the buffer owner from the unique buffer.
|
inlineexplicit |
Returns true if this points to a buffer owner.
|
inline |
|
inline |
|
inline |
|
delete |
|
default |
|
inline |
| void FUniqueBuffer::Reset | ( | ) |
Reset this to null.
|
inlinestatic |
Make an owned buffer by taking ownership of the input.
| DeleteFunction | Called with Data to free memory when the last shared reference is released. |
|
inlinestatic |
Make an owned buffer by taking ownership of the input.
| DeleteFunction | Called with (Data, Size) to free memory when the last shared reference is released. |
|
friend |
|
friend |
|
friend |
|
friend |