Navigation
API > API/Runtime > API/Runtime/Core
FCompositeBuffer is a non-contiguous buffer composed of zero or more immutable shared buffers.
A composite buffer is most efficient when its segments are consumed as they are, but it can be flattened into a contiguous buffer when necessary, by calling ToShared(). Ownership of segment buffers is not changed on construction, but if ownership of segments is required then that can be guaranteed by calling MakeOwned().
| Name | FCompositeBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Memory/CompositeBuffer.h |
| Include Path | #include "Memory/CompositeBuffer.h" |
Syntax
class FCompositeBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCompositeBuffer
(
BufferTypes&&... Buffers |
Construct a composite buffer by concatenating the buffers. | Memory/CompositeBuffer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FCompositeBuffer() |
Destructor. | Memory/CompositeBuffer.h |
Typedefs
| Name | Type | Remarks | Include Path | ||||
|---|---|---|---|---|---|---|---|
| CanAppendBufferType | std::bool_constant< std::is_same_v< FCompositeBuffer, BufferType > | std::is_same_v< FSharedBuffer, BufferType > | TIsTArray_V< BufferType > > | Memory/CompositeBuffer.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Null | const FCompositeBuffer | A null composite buffer. | Memory/CompositeBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Segments | TArray< FSharedBuffer, TInlineAllocator< 1 > > | Memory/CompositeBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CopyTo
(
FMutableMemoryView Target, |
Copies a range of the buffer to a contiguous region of memory. | Memory/CompositeBuffer.h | |
bool EqualBytes
(
const FCompositeBuffer& Other |
Returns true if the bytes of this buffer are equal to the bytes of the other buffer. | Memory/CompositeBuffer.h | |
TConstArrayView< FSharedBuffer > GetSegments() |
Returns the segments that the buffer is composed from. | Memory/CompositeBuffer.h | |
uint64 GetSize() |
Returns the total size of the composite buffer in bytes. | Memory/CompositeBuffer.h | |
bool IsNull() |
Returns true if the composite buffer is null. | Memory/CompositeBuffer.h | |
bool IsOwned() |
Returns true if every segment in the composite buffer is owned. | Memory/CompositeBuffer.h | |
void IterateRange
(
uint64 Offset, |
Invokes a visitor with a view of each segment that intersects with a range. | Memory/CompositeBuffer.h | |
void IterateRange
(
uint64 Offset, |
Memory/CompositeBuffer.h | ||
| Returns a copy of the buffer where every segment is owned. | Memory/CompositeBuffer.h | ||
| Memory/CompositeBuffer.h | |||
FCompositeBuffer Mid
(
uint64 Offset, |
Returns the middle part of the buffer by taking the size starting at the offset. | Memory/CompositeBuffer.h | |
void Reset() |
Reset this to null. | Memory/CompositeBuffer.h | |
| Returns the concatenation of the segments into a contiguous buffer. | Memory/CompositeBuffer.h | ||
| Memory/CompositeBuffer.h | |||
FMemoryView ViewOrCopyRange
(
uint64 Offset, |
Returns a view of the range if contained by one segment, otherwise a view of a copy of the range. | Memory/CompositeBuffer.h | |
FMemoryView ViewOrCopyRange
(
uint64 Offset, |
Memory/CompositeBuffer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static int32 GetBufferCount
(
const FCompositeBuffer& Buffer |
Memory/CompositeBuffer.h | ||
static int32 GetBufferCount
(
BufferType&& Buffer |
Memory/CompositeBuffer.h | ||
static int32 GetBufferCount
(
const FSharedBuffer& Buffer |
Memory/CompositeBuffer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Returns true if the composite buffer is not null. | Memory/CompositeBuffer.h |