Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Memory
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Memory/CompositeBuffer.h |
| Include | #include "Memory/CompositeBuffer.h" |
Syntax
class FCompositeBuffer
Remarks
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().
Constructors
| Type | Name | Description | |
|---|---|---|---|
FCompositeBuffer
(
BufferTypes&&... Buffers |
Construct a composite buffer by concatenating the buffers. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | CopyTo
(
FMutableMemoryView Target, |
Copies a range of the buffer to a contiguous region of memory. | |
| bool | EqualBytes
(
const FCompositeBuffer& Other |
Returns true if the bytes of this buffer are equal to the bytes of the other buffer. | |
| TConstArrayView< FSharedBuffer > | GetSegments () |
Returns the segments that the buffer is composed from. | |
| uint64 | GetSize () |
Returns the total size of the composite buffer in bytes. | |
| bool | IsNull () |
Returns true if the composite buffer is null. | |
| bool | IsOwned () |
Returns true if every segment in the composite buffer is owned. | |
| void | IterateRange
(
uint64 Offset, |
Invokes a visitor with a view of each segment that intersects with a range. | |
| void | IterateRange
(
uint64 Offset, |
||
| FCompositeBuffer | MakeOwned () |
||
| FCompositeBuffer | MakeOwned () |
Returns a copy of the buffer where every segment is owned. | |
| FCompositeBuffer | Returns the middle part of the buffer by taking the size starting at the offset. | ||
| void | Reset () |
Reset this to null. | |
| FSharedBuffer | ToShared () |
Returns the concatenation of the segments into a contiguous buffer. | |
| FSharedBuffer | ToShared () |
||
| FMemoryView | ViewOrCopyRange
(
uint64 Offset, |
Returns a view of the range if contained by one segment, otherwise a view of a copy of the range. | |
| FMemoryView | ViewOrCopyRange
(
uint64 Offset, |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Returns true if the composite buffer is not null. |
Typedefs
| Name | Description |
|---|---|
| CanAppendBufferType |
Constants
| Name | Description |
|---|---|
| Null | A null composite buffer. |