![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CompositeBuffer.h>
Static Public Attributes | |
| static CORE_API const FCompositeBuffer | Null |
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().
|
inlineexplicit |
Construct a composite buffer by concatenating the buffers. Does not enforce ownership.
Buffer parameters may be FSharedBuffer, FCompositeBuffer, or TArray<FSharedBuffer>.
|
default |
Destructor.
| void FCompositeBuffer::CopyTo | ( | FMutableMemoryView | Target, |
| uint64 | Offset = 0 |
||
| ) | const |
Copies a range of the buffer to a contiguous region of memory.
| Target | The view to copy to. Must be no larger than the data available at the offset. |
| Offset | The byte offset in this buffer to start copying from. |
| bool FCompositeBuffer::EqualBytes | ( | const FCompositeBuffer & | Other | ) | const |
Returns true if the bytes of this buffer are equal to the bytes of the other buffer.
|
inline |
Returns the segments that the buffer is composed from.
| uint64 FCompositeBuffer::GetSize | ( | ) | const |
Returns the total size of the composite buffer in bytes.
|
inline |
Returns true if the composite buffer is null.
| bool FCompositeBuffer::IsOwned | ( | ) | const |
Returns true if every segment in the composite buffer is owned.
| void FCompositeBuffer::IterateRange | ( | uint64 | Offset, |
| uint64 | Size, | ||
| TFunctionRef< void(FMemoryView View)> | Visitor | ||
| ) | const |
Invokes a visitor with a view of each segment that intersects with a range.
| Offset | The byte offset in this buffer to start visiting from. |
| Size | The number of bytes in the range to visit. |
| Visitor | The visitor to invoke from zero to GetSegments().Num() times. |
| void FCompositeBuffer::IterateRange | ( | uint64 | Offset, |
| uint64 | Size, | ||
| TFunctionRef< void(FMemoryView View, const FSharedBuffer &ViewOuter)> | Visitor | ||
| ) | const |
| FCompositeBuffer FCompositeBuffer::MakeOwned | ( | ) | && |
| FCompositeBuffer FCompositeBuffer::MakeOwned | ( | ) | const & |
Returns a copy of the buffer where every segment is owned.
| FCompositeBuffer FCompositeBuffer::Mid | ( | uint64 | Offset, |
| uint64 | Size = MAX_uint64 |
||
| ) | const |
Returns the middle part of the buffer by taking the size starting at the offset.
|
inlineexplicit |
Returns true if the composite buffer is not null.
| void FCompositeBuffer::Reset | ( | ) |
Reset this to null.
| FSharedBuffer FCompositeBuffer::ToShared | ( | ) | && |
| FSharedBuffer FCompositeBuffer::ToShared | ( | ) | const & |
Returns the concatenation of the segments into a contiguous buffer.
| FMemoryView FCompositeBuffer::ViewOrCopyRange | ( | uint64 | Offset, |
| uint64 | Size, | ||
| FUniqueBuffer & | CopyBuffer | ||
| ) | const |
Returns a view of the range if contained by one segment, otherwise a view of a copy of the range.
| Offset | The byte offset in this buffer that the range starts at. |
| Size | The number of bytes in the range to view or copy. |
| CopyBuffer | The buffer to write the copy into if a copy is required. |
| Allocator | The optional allocator to use when the copy buffer is required. |
| FMemoryView FCompositeBuffer::ViewOrCopyRange | ( | uint64 | Offset, |
| uint64 | Size, | ||
| FUniqueBuffer & | CopyBuffer, | ||
| TFunctionRef< FUniqueBuffer(uint64 Size)> | Allocator | ||
| ) | const |
|
static |
A null composite buffer.