Navigation
API > API/Runtime > API/Runtime/Core
A reference to a shared-ownership immutable buffer.
| Name | FSharedBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Memory/SharedBuffer.h |
| Include Path | #include "Memory/SharedBuffer.h" |
Syntax
class FSharedBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedBuffer
(
const FWeakOwnerPtrType& WeakOwner |
Memory/SharedBuffer.h | ||
FSharedBuffer
(
FOwnerPtrType&& SharedOwner |
Memory/SharedBuffer.h | ||
FSharedBuffer
(
FBufferOwner* Owner |
Construct a shared buffer from a new unreferenced buffer owner. | Memory/SharedBuffer.h | |
| Construct a null shared buffer. | Memory/SharedBuffer.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOwnerPtrType | UE::SharedBuffer::Private::TBufferOwnerPtr< UE::SharedBuffer::Private::FSharedOps > | Memory/SharedBuffer.h | |
| FWeakOwnerPtrType | UE::SharedBuffer::Private::TBufferOwnerPtr< UE::SharedBuffer::Private::FWeakOps > | Memory/SharedBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Owner | FOwnerPtrType | Memory/SharedBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const void * GetData() |
Returns a pointer to the start of the buffer. | Memory/SharedBuffer.h | |
uint64 GetSize() |
Returns the size of the buffer in bytes. | Memory/SharedBuffer.h | |
FMemoryView GetView() |
Returns a view of the buffer. | Memory/SharedBuffer.h | |
bool IsMaterialized() |
Returns true if the referenced buffer has been materialized. | Memory/SharedBuffer.h | |
bool IsNull () |
Returns true if this does not point to a buffer owner. | Memory/SharedBuffer.h | |
bool IsOwned() |
Returns true if this keeps the referenced buffer alive. | Memory/SharedBuffer.h | |
| Returns a buffer that is owned, by cloning if not owned. | Memory/SharedBuffer.h | ||
| Memory/SharedBuffer.h | |||
void Materialize () |
Materialize the buffer by making its data and size available. | Memory/SharedBuffer.h | |
| Convert this to a unique buffer, leaving this null. | Memory/SharedBuffer.h | ||
void Reset() |
Reset this to null. | Memory/SharedBuffer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FSharedBuffer Clone
(
const void* Data, |
Memory/SharedBuffer.h | ||
static FSharedBuffer Clone
(
FMemoryView View |
Make an owned clone of the input. | Memory/SharedBuffer.h | |
static FSharedBuffer MakeView
(
const void* Data, |
Memory/SharedBuffer.h | ||
static FSharedBuffer MakeView
(
const void* Data, |
Memory/SharedBuffer.h | ||
static FSharedBuffer MakeView
(
FMemoryView View, |
Memory/SharedBuffer.h | ||
static FSharedBuffer MakeView
(
FMemoryView View, |
Make a view of the input within its outer buffer. Ownership matches OuterBuffer. | Memory/SharedBuffer.h | |
static FSharedBuffer MakeView
(
const void* Data, |
Memory/SharedBuffer.h | ||
static FSharedBuffer MakeView
(
FMemoryView View |
Make a non-owned view of the input. | Memory/SharedBuffer.h | |
static FSharedBuffer TakeOwnership
(
const void* Data, |
Make an owned buffer by taking ownership of the input. | Memory/SharedBuffer.h | |
static FSharedBuffer TakeOwnership
(
const void* Data, |
Make an owned buffer by taking ownership of the input. | Memory/SharedBuffer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Returns true if this points to a buffer owner. | Memory/SharedBuffer.h | |
operator FMemoryView() |
Memory/SharedBuffer.h | ||
bool operator!=
(
const FSharedBuffer& BufferB |
Memory/SharedBuffer.h | ||
bool operator==
(
const FSharedBuffer& BufferB |
Memory/SharedBuffer.h |